我使用以下命令创建了一个图像文件:
dd if=/dev/zero of=linux.img bs=16M count=1024
cfdisk linux.img
mkfs.ext4 linux.img
Run Code Online (Sandbox Code Playgroud)
并按照《Linux From Scratch 11.3》一书的说明安装了 Linux 系统。我可以通过 chroot 访问该系统,但是当我尝试使用以下命令运行它时:
qemu-system-x86_64 -hda linux.img -vga std -m 4G
Run Code Online (Sandbox Code Playgroud)
系统的初始化被该问题标题中描述的错误中断。我的文件/boot/grub/grub.cfg
如下所示:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext4
#set root=(hd0,2)
menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3" {
linux /boot/vmlinuz-6.1.11-lfs-11.3 root=/dev/hda1 ro
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
在 grub 启动屏幕后取消注释set root=(hd0,2)' and trying the values
hd0,0 or
hd0,1 hd0,X not found` 行。(the system not even initialize with this, and I got the error
将菜单项选项中以 linux 开头的行中的根值更改为 …