r/linuxfromscratch • • Mar 13 '26

[LFS] Kernel panic "Unable to mount root fs on unknown-block(0,0)" on real hardware, works in QEMU

[LFS] Kernel panic "Unable to mount root fs on unknown-block(0,0)" on real hardware, works in QEMU

So I finally finished my LFS 13.0 systemd build and I'm trying to boot it on real hardware from a USB drive. In QEMU it boots fine (using serial console to see output), but on my actual laptop I get a kernel panic: VFS: Unable to mount root fs on unknown-block(0,0).

My setup:

  • LFS 13.0 systemd, kernel 6.18.10
  • Booting from USB drive, root is on /dev/sda3 (ext4)
  • GRUB loads fine, kernel starts, then panics
  • Laptop is an Acer with an Intel GPU
  • No initramfs (I know, working on it)

Things I've already tried:

  • Using UUID instead of /dev/sda3
  • Adding rootdelay=10 to kernel cmdline
  • Verified CONFIG_EXT4_FS=y, CONFIG_USB_STORAGE=y, CONFIG_ATA=y, CONFIG_SATA_AHCI=y
  • Built a basic initramfs with dracut but getting dependency errors during generation

The weird part is QEMU boots fine with the same USB. Only fails on the actual machine. Anyone dealt with this before?

10 Upvotes

23 comments sorted by

View all comments

Show parent comment

2

u/testfire10 Mar 13 '26

You cannot use UUID if you aren’t using initramfs

1

u/[deleted] Mar 13 '26

I've used part UUID without an initramfs.

You can get the Part UUID from running blkid and passing in your drive with it's partition id.

blkid /dev/sdc4 In it's output you'll see PARTUUID="". What ever is in the string is your part uuid and would go in the grub config. (Best success using this)

Make sure your partition is labled with LFSROOT or update the --label with your root fs label Begin /boot/grub/grub.cfg set default=0 set timeout=5

insmod ext2

menuentry "GNU/Linux, Linux 6.13.9-lfs-12.3 nomodeset"{ search --no-floppy --label LFSROOT --set=root linux /boot/vmlinuz-6.13.9-lfs-12.3 rootwait root=PARTUUID=ecb913d1-02 ro net.ifnames=0 biosdevname=0 nomodeset }

menuentry "GNU/Linux, Linux 6.13.9-lfs-12.3" { search --no-floppy --label LFSROOT --set=root linux /boot/vmlinuz-6.13.9-lfs-12.3 rootwait root=PARTUUID=ecb913d1-02 ro net.ifnames=0 biosdevname=0 }