r/linuxfromscratch • u/purelyannoying • 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
View all comments
Show parent comment
1
u/purelyannoying Mar 13 '26
here it is
```
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${env_block}" ] ; then
set env_block="(${root})${env_block}"
export env_block
load_env -f "${env_block}"
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
if [ "${env_block}" ] ; then
save_env -f "${env_block}" next_entry
else
save_env next_entry
fi
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
if [ "${env_block}" ] ; then
save_env -f "${env_block}" saved_entry
else
save_env saved_entry
fi
fi
}
function load_video {
if [ x$grub_platform = xefi ]; then
insmod efi_gop
insmod efi_uga
elif [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if loadfont unicode ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_GB
insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'GNU/Linux' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-14206321-03f8-46da-8957-50e58a3a607c' {
}
submenu 'Advanced options for GNU/Linux' $menuentry_id_option 'gnulinux-advanced-14206321-03f8-46da-8957-50e58a3a607c' {
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 14206321-03f8-46da-8957-50e58a3a607c
search --no-floppy --fs-uuid --set=root 14206321-03f8-46da-8957-50e58a3a607c
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 14206321-03f8-46da-8957-50e58a3a607c
search --no-floppy --fs-uuid --set=root 14206321-03f8-46da-8957-50e58a3a607c
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
insmod bli
fi
### END /etc/grub.d/25_bli ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
fi
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
```