我尝试使用Debian安装一个新的Debian 10系统:
mount /dev/sda5 /mnt/chroot
debootstrap --variant=minbase buster /mnt/chroot ftp.au.debian.org到目前为止,这个鞋带看起来不错。现在切换到色度
mount --bind /dev /mnt/chroot/dev
mount --bind /proc /mnt/chroot/dev
mount --bind /sys /mnt/chroot/dev
chroot /mnt/chroot/
apt-get update
apt-get --no-install-recommends install busybox linux-image-amd64 systemd-sysv pciutils usbutils
passwd这也没有错误地完成。安装的内核是/vmlinuz -> boot/vmlinuz-4.19.0-11-amd64,内核模块在/lib/modules/4.19.0-11-amd64中。
现在,通过GRUB重新启动新安装,使用
insmod all_video; search --label test; linux /vmlinuz root=LABEL=test; initrd /initrd.img我得到了
uname -r
4.9.0-13-amd64它不是由kernel安装的内核(4.19.0-11)!相反,当我运行debootstrap时,它是来自父系统的4.9.0-13内核。重要的是,新安装没有任何匹配的4.9.0-13内核模块,因此新系统缺少了一组设备驱动程序。
如果我用
insmod all_video; set root=(hd1,gpt5); linux /vmlinuz root=/dev/sda5; initrd /initrd.img; boot相反,我使用新内核启动新系统。
有什么想法,这可能是从哪里来的,以及如何解决?
非常感谢。
发布于 2020-10-14 08:52:22
你使用的GRUB命令,
insmod all_video; search --label test; linux /vmlinuz root=LABEL=test; initrd /initrd.img从默认的GRUB根获取内核(/vmlinuz)和initramfs (/initrd.img),这是父系统的。
这就是为什么指定
insmod all_video; set root=(hd1,gpt5); linux /vmlinuz root=/dev/sda5; initrd /initrd.img相反,这不是标签问题,而是设置GRUB根来使用新系统的分区,然后从那里加载内核和initramfs。
要解决这个问题,假设您希望/dev/sda5中的安装成为新的默认设置,最好的解决方案是启动它(使用上面的第二个GRUB命令行),然后从引导系统安装GRUB,运行Debian 10。
https://unix.stackexchange.com/questions/614438
复制相似问题