Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 06-29-2020, 12:32 PM   #1
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 42

Rep: Reputation: Disabled
Kernel panic: device not found


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

# 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

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

# 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:

I've also added a picture of the kernel panic trace leading up to the error.
Attached Thumbnails
Click image for larger version

Name:	20200629_kernelpanic.jpg
Views:	9
Size:	250.9 KB
ID:	33539  

Last edited by budrz89; 06-29-2020 at 01:53 PM.
Old 06-29-2020, 02:09 PM   #2
Registered: Sep 2018
Location: Midwest, USA
Distribution: Arch,LFS,BLFS
Posts: 70

Rep: Reputation: Disabled
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.

Last edited by arch-linq; 06-29-2020 at 02:25 PM.
Old 06-29-2020, 03:47 PM   #3
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 42

Original Poster
Rep: Reputation: Disabled
@arch-linq, I did follow that hint

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?
Old 06-30-2020, 03:41 PM   #4
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 388

Rep: Reputation: 254Reputation: 254Reputation: 254
Did you actually enable NVME support in your kernel?

In Linux 5.7, that's a category of its own under Device Drivers.
Old 06-30-2020, 03:49 PM   #5
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 42

Original Poster
Rep: Reputation: Disabled
@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!


kernel panic, lfs

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 12 04-25-2019 07:33 AM
No suitable device found: no device found for connection System eth0 eribudi Linux - Networking 8 07-07-2014 11:08 AM
Directory not found; -xzvf not found; Makefile not found RealGomer Linux - Software 4 09-20-2010 10:02 AM
Port:0x180 failed (device not found ) Port:0 failed (device not found ) aaliya Linux - Hardware 0 10-05-2006 05:46 AM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 03:35 AM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration