On Tue, Jul 25, 2017 at 06:09:43PM +0200, John D. Hefele wrote:
> Hello lfs support community!
> 
> I have recently went through the majority of the lfs book, and up until
> the final step, everything has gone great. At every opportunity I tested
> the system, and did not experience and serious issues. However, I am
> now having problems with the final step of rebooting the system. Namely, my
> problem is that after the grub menu is loaded, I am greeted by a black
> screen filled with text and a message stating:
> 
> VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
> 

A black screen with white text is perfectly normal (we don't go in
for fancy boot splash screens, it's more important to be able to
ready any messages.

Obviously that last error message is not normal.  The interesting
thing is that no device seems to exist.

> Before sending this email, I checked FAQ and found this:
> 
> Kernel panic: VFS: unable to mount root fs
>    There are several reasons why the kernel might be unable to mount
> the root filesystem.
>       - Did you specify the correct partition in /boot/grub/menu.lst?

So, the FAQ is old - you are right that grub2 uses grub.cfg.  At
this point a linux kernel has loaded (I assume your host system
still boots, therefore the failing kernel must be for LFS.

And that means that your stanza for this kernel in grub.cfg is
probably good enough.

>       - Is support for the hard drive enabled in the kernel. For SCSI
> this means support for the specific SCSI adapter.


>       - Is support for the hard drive compiled into the kernel, not just
> as a module. (Modules are stored on the filesystem. If a driver needed
> to access the filesystem is stored as a module on that filesystem, well
> ... you know ... ;)
>       - Is support for the filesystem compiled into the kernel. Again,
> not a module. Support for ext2 is enabled by default, but others like
> ext3, reiser, jfs, and xfs are not.
> 
> To address the first point, I am fairly certain I specified the correct
> partition in /boot/grub/grub.cfg (above it is written menu.lst but I
> suppose that is a minor detail). I am booting from a uefi system.
> Because of this, to set up grub I followed the hint at
> http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt.
> 
> To address the 2nd through 4th points I tried numerous setups of the
> kernel. I followed the setup exactly from the hint above, I copied
> .config file of my home system, and I even tried enabling all options
> through the make allyesconfig command while disabling "support for uevent
> helper". So far, no luck.
> 

[...]
> Below is all the relative information I could think of to solve the
> problem. Please let me know if I should provide something else. From
> here, I have really no idea how to precede. So any suggestions would
> be very welcome.
> 
> Cheers,
> John David
> 
> 

> Here is my etc/fstab file. As you can see, the there is a uefi partition.
> 
> # Begin /etc/fstab
> 
> # file system  mount-point  type     options             dump  fsck
> #                                                              order
> 
> /dev/sda4     /            ext4    defaults            1     1
> /dev/sda3     swap         swap    pri=1               0     0
> 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
> /dev/sda1      /boot/efi    vfat    defaults             0     1
> efivarfs       /sys/firmware/efi/efivars  efivarfs   defaults 0 1
> # End /etc/fstab
> 
Seems reasonable.
> 
> This is from the fdisk -l command. dev/sda4 is my LFS partition
> 
> Disk /dev/loop0: 80.5 MiB, 84393984 bytes, 164832 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop1: 79.5 MiB, 83349504 bytes, 162792 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop2: 79.5 MiB, 83349504 bytes, 162792 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 

I've no idea why you are showing those, nor what they are.
They don't seem to be related to anything below.

> Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disklabel type: gpt
> Disk identifier: 81486A44-3CDC-49E2-8B1B-E52C0A0596D6
> 
> Device          Start        End    Sectors   Size Type
> /dev/sda1        2048    1050623    1048576   512M EFI System
> /dev/sda2     1050624 1834608639 1833558016 874.3G Linux filesystem
> /dev/sda3  1937008640 1953523711   16515072   7.9G Linux swap
> /dev/sda4  1834608640 1937008639  102400000  48.8G Linux filesystem
> 

This confirms that your fstab for sda4 seems reasonable.

> And finally, this is from lshw...
> striker1
>    description: Notebook
>    product: Inspiron 7559 (0706)
>    vendor: Dell Inc.
>    version: 1.2.0
>    serial: CWY6KD2
>    width: 64 bits
>    capabilities: smbios-3.0 dmi-3.0 vsyscall32
>    configuration: boot=normal chassis=notebook family=Inspiron
> sku=0706 uuid=44454C4C-5700-1059-8036-C3C04F4B4432
>  *-core
>       description: Motherboard
>       product: 0H0CC0
>       vendor: Dell Inc.
>       physical id: 0
>       version: A00
>       serial: .CWY6KD2.CN4864367J01Z8.
>       slot: Inspiron

We don't usually bother with lshw - lspci (with some verbosity) is
usually better for tuning the kernel config.  In particular, it can
tell you which kernel driver is being used for each item.  You may
then need to google for the name of the config option which builds
that driver.

A less-efficient alternative is to begin by looking at which modules
are loaded and in use (lsmod).  I'm a bit surprised that
'allyesconfig' did not work.

Both ATA and SATA drives have used /dev/sdX for a few years, and I
don't know anything about your hardware.  If it really is SCSI, you
would need to build some SCSI driver.  But if it is common SATA or
ATA, the following config options ought to be enough if you can't
get the details of what is in use :

CONFIG_SCSI
CONFIG_SCSI_DMA
CONFIG_BLK_DEV_SD (other options needed if cdrom is present)
CONFIG_ATA and all options
CONFIG_SATA and all options

It's probably easiest to start with your current config, then in
menuconfig search for those options using '/' and set them all to
'y'.

ĸen
-- 
I live in a city. I know sparrows from starlings.  After that
everything is a duck as far as I'm concerned.  -- Monstrous Regiment
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to