Issue on boot for LFS System: VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
For the past few days, I have been going through the book "Linux from Scratch" (the link is attached below). It was smooth sailing until the 8th chapter of the book when it was time to install the kernel and grub. I had a UEFI system, so I had to follow a modified list of instructions (which is also linked below). Upon reboot, I would be greeted by the grub screen, allot of text would run down the screen and then it would freeze on this error message...
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 I checked around on the internet, and found a few people with the same problem, but it seems like something hardware dependent with varying solutions. Listed on the book's website is a fax, with this same problem reported. It is shown below... Kernel panic: VFS: unable to mount root fs There are several reasons why the kernel might be unable to mountthe root filesystem. - Did you specify the correct partition in /boot/grub/menu.lst? - 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. I am fairly certain that I specified the correct partition. Below is output from lshw -class disk -class storage and my grub.cfg file (It is referred to menu.lst above, but that is for a different version of grub) *-storage description: SATA controller product: Sunrise Point-H SATA Controller [AHCI mode] vendor: Intel Corporation physical id: 17 bus info: pci@0000:00:17.0 version: 31 width: 32 bits clock: 66MHz capabilities: storage msi pm ahci_1.0 bus_master cap_list configuration: driver=ahci latency=0 resources: irq:318 memory:df430000-df431fff memory:df434000-df4340ff ioport:f090(size=8) ioport:f080(size=4) ioport:f060(size=32) memory:df43300 *-disk description: ATA Disk product: ST1000LM014-1EJ1 vendor: Seagate physical id: 0.0.0 bus info: scsi@1:0.0.0 logical name: /dev/sda version: DEMG serial: W7735PQF size: 931GiB (1TB) capabilities: gpt-1.00 partitioned partitioned:gpt configuration: ansiversion=5 guid=81486a44-3cdc-49e2-8b1b-e52c0a0596d6 logicalsectorsize=512 sectorsize=4096 # Begin /boot/grub/grub.cfg set default=0 set timeout=5 insmod gzio insmod part_gpt insmod ext4 set root=(hd0,gpt4) # hd[x] is the drive of the LFS partion and gpt[y] is the partition insmod efi_gop insmod efi_uga insmod font if loadfont /grub/unicode.pf2; then loadfont /grub/unicode.pf2 set gfxmode=auto insmod gfxterm set gfxpayload=keep terminal_output gfxterm fi menuentry "GNU/Linux, Linux 4.9.9-lfs-8.0" { linux /boot/vmlinuz-4.9.9-lfs-8.0; root=/dev/sda4 ro } To address the 2nd through 4th points of the faq reply above, I tried numerous setups of the kernel. I followed the setup exactly as described in the hint linked below. I also tried copied .config file of my host system (an ubuntu 16.04 running on a 4.10 core), and I even tried enabling all options through the make allyesconfig command while disabling "support for uevent helper" (It was written in the book that this could cause errors if enabled). So far, no luck. Below is an excerpt of my .config file (it was far too large to put in this post)... # Controllers with non-SFF native interface # CONFIG_SATA_AHCI=y CONFIG_SATA_AHCI_PLATFORM=y CONFIG_SATA_INIC162X=y CONFIG_SATA_ACARD_AHCI=y CONFIG_SATA_SIL24=y CONFIG_ATA_SFF=y # # SFF controllers with custom DMA interface # # CONFIG_PDC_ADMA is not set CONFIG_SATA_QSTOR=y CONFIG_SATA_SX4=y CONFIG_ATA_BMDMA=y # # SATA SFF controllers with BMDMA # CONFIG_ATA_PIIX=y CONFIG_SATA_DWC=y CONFIG_SATA_DWC_OLD_DMA=y CONFIG_SATA_DWC_DEBUG=y CONFIG_SATA_DWC_VDEBUG=y CONFIG_SATA_MV=y CONFIG_SATA_NV=y CONFIG_SATA_PROMISE=y CONFIG_SATA_SIL=y CONFIG_SATA_SIS=y CONFIG_SATA_SVW=y CONFIG_SATA_ULI=y CONFIG_SATA_VIA=y CONFIG_SATA_VITESSE=y Below are some more useful files, and the links discussed above. At this point, I have no idea how to precede at this point, so I am wide open to any suggestions. http://www.linuxfromscratch.org/ http://www.linuxfromscratch.org/hint...s/lfs-uefi.txt 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 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 This is from the fdisk -l command. dev/sda4 is my LFS partition 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 I have a Dell Inspiron 15 7000 series laptop |
Hi and welcome to LQ,
You gave a lot of information. That's good. But your post is difficult to follow because you didn't use the CODE constructs. It is the "#" icon in the advanced editor. Anyway, from what I see an obvious mistake is the "set root=(hd0,gpt4)" in the grub.cfg. But it might be correct if it was inside an if..else construct in grub.cfg. So, I will ask you to please post your full grub.cfg using the CODE constructs. And please tell us how did you generate the grub.cfg. Did you write it from scratch? Or did you use grub-mkconfig? |
Hi,
Here is my grub.cfg file using code constructs, sorry for the noobiness :D Code:
# Begin /boot/grub/grub.cfg http://www.linuxfromscratch.org/hint...s/lfs-uefi.txt |
Thanks for the update. Just one thing: the link you posted is broken. This is the correct one: http://www.linuxfromscratch.org/hint...s/lfs-uefi.txt.
Ok, so I will suggest you mount your / filesystem for the LFS, mount all the tmpfs... and chroot in there. Then install grub using grub-mkconfig and grub-install. Check this out: https://docs.slackware.com/howtos:sl...slackware#grub. Just follow the part on GRUB. The grub-install command as described in the link will output lots of stuff and it will run efibootmgr (make sure it is installed) at the end. If efibootmgr returns errors you will see it and you can post the errors here. |
Success!!!! Finally.... The problem was the semicolon in the linux line. For some reason, it was present in the tutorial that I followed...
http://www.linuxfromscratch.org/hint...s/lfs-uefi.txt Now, on to BLFS. There, I will be trying to making a light system for running astronomical simulations in a cloud computing environment (Specifically Microsoft Azure). |
All times are GMT -5. The time now is 08:28 PM. |