Re: VFS: Cannot open root device

"Bruce Dubbs" ([email protected] via blfs-support Mailing List) <[email protected]> Fri, 5 Sep 2025 14:23:55 -0500
Newsgroups gmane.linux.lfs.beyond.support
Message-ID <[email protected]>
On 9/5/25 6:25 AM, Xi Ruoyao ([email protected] via blfs-support Mailing List) wrote:
> On Fri, 2025-09-05 at 11:15 +0000, Cliff mcDiarmid wrote:
>> Hello
>>
>> I've never had any issue so far recompiling the kernel for LFS.   Still
>> there's always a first.
>>
>> After enabling some modules in an existing kernel(6.12.5) I get the following
>> error when rebooting:
>>
>> VFS: Cannot open root device
>> "/dev/nvme0n1p4" or unknown block (0,0): error -6
>> Please append a correct "root=" boot option
>> List of of all bdev filesystems  etc etc
> 
> Here the lines you replaced with "etc etc" are important, look at them
> carefully.  We enabled DRM panic and VESA framebuffer in LFS
> specifically to make the kernel able to show them clearly on such a
> "cannot open root device."
> 
> Possibilities are you incorrectly changed CONFIG_EXT4 to M, incorrectly
> changed CONFIG_NVME to M, incorrectly turned off CONFIG_EFI_PARTITION,
> or you have two NVME disks and their numbering changed between two
> boots.

Those are some good suggestions.  Another issue may be the hard drive layout.  The 
number of drives and the partitioning layout can sometime cause problems.  I have 
started using options in grub.cfg like 'root=PARTLABEL=lfs124'.  You can easily set 
the partition label using fdisk or gdisk and then grub should be able to search for 
the correct partition.

You can also use PARTUUID, be be aware that the partition uuid and the file system 
uuid are different.  GRUB dies not recognize file system uuids.

   -- Bruce

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-support
Unsubscribe: See the above information page