void linux 的自定义内核,无法启动,nvme 驱动器

void linux 的自定义内核,无法启动,nvme 驱动器

我正在尝试为 void linux 构建 4.13.2 内核来获取 Vega 驱动程序,但无法启动它。

构建过程:

cp /boot/config-4.12 .config
yes "" | make oldconfig
make nconfig
    Changed processor type
    Include ext4 by default
    Made sure AMD drivers are included
make -j32 bzImage modules
make modules_install
System.map /boot/System.map-4.13.2 
arch/x86/boot/bzImage /boot/vmlinuz-4.13.2 
.config /boot/config-4.13.2 
dracut -f /boot/initramfs-4.13.2.img 4.13.2
update-grub

我尝试根据现有配置进行配置,该配置可以正常启动。

一段时间后,它会进入 dracut 调试 shell。 dmesg 充满“正在扫描所有 btrfs 设备”,直到出现“无法启动”消息。既不存在/dev/nvme*也不/dev/disk/by-uuid存在。

文件系统表:

/dev/nvme0n1p1  swap    swap    sw 0 0
/dev/nvme0n1p2  /       ext4    defaults 0 1
/dev/nvme0n1p3  /home   ext4    defaults 0 2
tmpfs           /tmp    tmpfs   defaults,nosuid,nodev 0 0

我在创建 initramfs 时确实遇到了一些错误,但我不明白它们之间的关系:

> dracut -f /boot/initramfs-4.13.2.img 4.13.2
dracut: Executing: /usr/bin/dracut -f /boot/initramfs-4.13.2.img 4.13.2
dracut: dracut module 'bootchart' will not be installed, because command '/sbin/bootchartd' could not be found!
dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'url-lib' will not be installed, because command 'curl' could not be found!
dracut: dracut module 'plymouth' will not be installed, because command 'plymouthd' could not be found!
dracut: dracut module 'plymouth' will not be installed, because command 'plymouth' could not be found!
dracut: dracut module 'plymouth' will not be installed, because command 'plymouth-set-default-theme' could not be found!
dracut: dracut module 'lvmmerge' will not be installed, because command 'lvm' could not be found!
dracut: 90crypt: Could not find any command of '/systemd-cryptsetup cryptsetup'!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'lvm' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'crypt-gpg' will not be installed, because command 'gpg' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: *** Including module: bash ***
dracut: *** Including module: dash ***
dracut: *** Including module: i18n ***
dracut: *** Including module: drm ***
dracut-install: ERROR: installing '=drivers/gpu/drm'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.jgsVnm/initramfs --kerneldir /lib/modules/4.13.2/ -m -s drm_crtc_init =drivers/gpu/drm
dracut: *** Including module: btrfs ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Store current command line parameters ***
dracut: *** Creating image file '/boot/initramfs-4.13.2.img' ***
dracut: *** Creating initramfs image file '/boot/initramfs-4.13.2.img' done ***

我不确定下一步是什么?

答案1

我通过跳过 initramfs 并将所需的内核模块包含到内核中来使其工作。

lspci -kk | grep "Kernel modules" | sort | uniq可以列出当前正在使用的模块以及它们和默认配置,我可以启动并运行它。

基于本指南:https://www.dotslashlinux.com/2017/04/29/booting-the-linux-kernel-without-an-initrd-initramfs/

相关内容