在 ubuntu 20.04 中更新 initramfs 时出错

在 ubuntu 20.04 中更新 initramfs 时出错

我正在 Ubuntu 上安装 Linux 内核(版本 5.6.0-rc+)。为此我编译了内核如下:

  • sudo make ARCH=x86_64 x86_64_defconfig
  • sudo make -j256
  • sudo make modules
  • sudo make modules_install
  • sudo make install

最后一条命令的输出如下:

sh ./arch/x86/boot/install.sh 5.6.0-rc6+ arch/x86/boot/bzImage \
    System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.6.0-rc6+ /boot/vmlinuz-5.6.0-rc6+
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.6.0-rc6+ /boot/vmlinuz-5.6.0-rc6+
update-initramfs: Generating /boot/initrd.img-5.6.0-rc6+
find: ‘/var/tmp/mkinitramfs_M0HzSl/lib/modules/5.6.0-rc6+/kernel’: No such file or directory
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.6.0-rc6+ /boot/vmlinuz-5.6.0-rc6+
run-parts: executing /etc/kernel/postinst.d/update-notifier 5.6.0-rc6+ /boot/vmlinuz-5.6.0-rc6+
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.6.0-rc6+ /boot/vmlinuz-5.6.0-rc6+
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.11.0+
Found initrd image: /boot/initrd.img-5.11.0+
Found linux image: /boot/vmlinuz-5.6.0-rc6+
Found initrd image: /boot/initrd.img-5.6.0-rc6+
Found linux image: /boot/vmlinuz-5.4.0-81-generic
Found initrd image: /boot/initrd.img-5.4.0-81-generic
Found linux image: /boot/vmlinuz-5.4.0-72-generic
Found initrd image: /boot/initrd.img-5.4.0-72-generic
Adding boot menu entry for UEFI Firmware Settings
done

现在,当我启动新安装的内核时,它会这样说Initramfs unpacking failed!并进入initramfs提示符。根据exit提示,initramfs它表明问题是模块未加载。另外,请注意我上面附加的输出,该update-initramfs命令未成功。所以,我认为内核无法启动的原因是update-initramfs.但不确定。

那么有人可以建议失败的原因是什么吗update-initramfs

谢谢。

相关内容