Hello guys
I was building LFS.
At first, I used version 9.0-systemd of the manual, but encountered some errors during the installation of systemd that I couldn't resolve. So, I switched to the 11.3 version of the manual.
The earlier parts went smoothly, but when I reached section 10.4, after creating the GRUB configuration file and rebooting, I saw the LFS system option in the GRUB menu. However, when I selected that option, I received the error message "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)."
I searched online for information but couldn't find a detailed explanation of the cause of this error. It only mentioned that the path to "/root" was incorrect. I installed LFS on VMware and took a snapshot before encountering the error, so I double-checked my partitioning and grub.cfg file, and I believe they are correct.
According to the manual, the "/" partition can be used as "/boot," so I didn't create a separate "/boot" partition. My "/" partition is on sdb2.
Here is my grub.cfg file:
Code:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext4
set root=(hd1,2)
menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3" {
linux /boot/vmlinuz-6.1.11-lfs-11.3 root=/dev/sdb2 ro
}
Before rebooting, I executed the following command:
Code:
riko@IBM5200:~$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Disk model: VMware Virtual S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A4E58CE4-46C9-4E08-9A21-AA1034BC5B3C
Device Start End Sectors Size Type
/dev/sdb1 2048 206847 204800 100M Linux filesystem
/dev/sdb2 206848 22962175 22755328 10.9G BIOS boot
/dev/sdb3 22962176 27285503 4323328 2.1G Linux filesystem
/dev/sdb4 27285504 41940991 14655488 7G Linux filesystem
riko@IBM5200:~$ sudo grub-install /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.
A few possibilities come to mind:
1. It could be an incorrect BIOS boot setting.
2. It might be due to a misconfiguration during the compilation of the Linux kernel. (I followed the instructions in the manual strictly for the menuconfig options.)
3. Could it be related to switching between LFS manual versions midway? I encountered an unresolved error in section 6.72 (systemd-241) of the 8.1 version of the manual, so I switched to version 11.1 for the remaining steps. However, it seems unlikely that this would affect normal booting before that point.
This issue has been bothering me for several days, and I would greatly appreciate any assistance.