LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Kernel panic: device not found (https://www.linuxquestions.org/questions/linux-from-scratch-13/kernel-panic-device-not-found-4175677832/)

budrz89 06-29-2020 12:32 PM

Kernel panic: device not found
 
1 Attachment(s)
Hi,

I just completed my LFS (version 9.1, sysvinit) project with pkgutils installed, but I can't seem to boot into my system. I get a kernel panic about VFS device "nvme0n1p3" not found type of error.

On this computer, I can choose between using AHCI or RAID or disable it completely in my BIOS settings, and right now I have the AHCI set in my BIOS. My grub.cfg is

Code:

# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod gzio
insmod part_gpt
insmod ext2
#set root=(hd[x], gpt[y])
# hd[x] is the drive of the LFS partion and gpt[y] is the partition
set root=(hd0,gpt3)

insmod efi_gop
insmod efi_uga
insmod font
if loadfont /boot/grub/fonts/unicode.pf2; then
  loadfont /boot/grub/fonts/unicode.pf2
  set gfxmode=auto
  insmod gfxterm
  set gfxpayload=keep
  terminal_output gfxterm
fi

menuentry "GNU/Linux, Linux 5.5.9-lfs-9.1"  {
  linux  /boot/vmlinuz-5.5.9-lfs-9.1 root=/dev/nvme0n1p3 ro
  initrd  /boot/microcode.img
}

and my fstab is

Code:

# Begin /etc/fstab

# file system      mount-point                type    options          dump  fsck
#                                                                                order

/dev/nvme0n1p2      /boot/efi                  vfat    defaults              0    1
/dev/nvme0n1p3      /                          ext4    defaults              0    1
/dev/nvme0n1p4      swap                        swap    pri=1                0    0
/dev/nvme0n1p5      /var                        ext4    defaults            0    2
/dev/nvme0n1p6      /usr                        ext4    defaults            0    2
/dev/nvme0n1p7      /opt                        ext4    defaults            0    2
/dev/nvme0n1p8      /home                        ext4    defaults            0    2
proc                /proc                        proc    nosuid,noexec,nodev 0    0
sysfs              /sys                        sysfs    nosuid,noexec,nodev 0    0
devpts              /dev/pts                    devpts  gid=5,mode=620      0    0
tmpfs              /run                        tmpfs    defaults            0    0
devtmpfs            /dev                        devtmpfs mode=0755,nosuid    0    0
efivarfs            /sys/firmware/efi/efivars    efivarfs  defaults          0    1

# End /etc/fstab

I even tried using UUID in fstab (instead of device names) as well as the root=UUID=... kernel parameter in grub.cfg, but then it would kernel panic about a VFS error unknown root option "UUID=". I do realize that "initrd" is not part of LFS but BLFS, but I thought it would help to have it if I was going to use the UUID root option in grub.cfg. However, it still wouldn't boot even after using early kernel loading.

I can't seem to figure out what I'm doing wrong here. I'll appreciate any suggestions or tips that can help me figure this out.

** EDIT **
I do have the NVMe configured into my kernel as described here:

https://wiki.gentoo.org/wiki/NVMe

I've also added a picture of the kernel panic trace leading up to the error.

arch-linq 06-29-2020 02:09 PM

I'd use the host grub to boot it. If it was the only OS on the ssd I'd use the uefi hint available at the main lfs menu.

budrz89 06-29-2020 03:47 PM

@arch-linq, I did follow that hint

http://www.linuxfromscratch.org/hint...s/lfs-uefi.txt

with some modifications for my system. The only thing is that they're using /dev/sda[x] but I need NVMe so /dev/nvme0n1p[x] should be the LFS partition, is it not?

TheRealGrogan 06-30-2020 03:41 PM

Did you actually enable NVME support in your kernel?

In Linux 5.7, that's a category of its own under Device Drivers.

budrz89 06-30-2020 03:49 PM

@TheRealGrogan, you were right and actually I was thinking about this earlier today. Turns out that I had CONFIG_BLK_DEV_NVME=m instead of 'y'.

Now I can boot into my fresh installed LFS! :)

Thanks everyone for your help!


All times are GMT -5. The time now is 06:45 PM.