r/linuxfromscratch • u/B99fanboy • Feb 14 '21
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I have managed to reach the point of almost completing lfs, my boot throws this error.What could have gone wrong?
EDIT : I'm on a VM. Here is the screenshot.y root is on /dev/vdb2. Here is my grub.cfg. I'm using UEFI boot. Here is my kernel configuration. I have enabled builtin ext4 support, set the root on grub.

EDIT 2 : Solved guys, I can now boot and log in. I was missing virtualization modules before.
I still have little problems, but I have done it! YAY!
5
Upvotes
4
u/veedant Feb 14 '21
Check your root filesystem, and make sure you specify a root= option in kernel parameters. IN
menuconfigmake sure that ext4 ( or btrfs if that is what you use) is enabled and that there is aroot=option passed. Ifroot=/dev/sdXydoes not work, then pass a PARTUUID to the kernel usingroot=PARTUUID=in the params. You can choose how you specify your parameters, they just need to be passed to the kernel. You can build them directly into the kernel yourself by going toProcessor Type and Featuresinmake menuconfigand enabling theBuilt-in Kernel Command Lineoption. Then enter theroot=option into the box below. To find a partition's PARTUUID executeblkid | grep sdXyat a shell and copy down the partuuid into the params. Be sure that it is the PARTUUID and not the Filesystem's UUID, because otherwise... Well, let's just say it will not end well. Cheers.1
u/ciplc Feb 14 '21
Are you in a VM?
1
u/noureddine-taleb Feb 14 '21
it happens to me, I fixed it by booting to a working system with the same rootfs and supply the kernel with « break=postmount » params then get an emergency shell that I used to see all current loaded modules that are used to mount rootfs, with the command « lsmod » then I build all those modules into the broken kernel, and it works