View previous topic :: View next topic |
Author |
Message |
elandiga_varg n00b
Joined: 04 May 2015 Posts: 4 Location: Canada
|
Posted: Mon May 04, 2015 6:13 pm Post subject: Kernel panic: VFS unable to mount root fs on (0,0) |
|
|
After attempting to boot from a fresh install, I get the following error message:
Code: | Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) |
I read that this usually means that the correct drivers for the HDD controller or the bus used by the HDD controller are not loaded, so I made sure to compile the drivers listed by lspci -kvm in-kernel, and I still get the same error.
Here is the output of lspci -kvm:
http://paste2.org/k106Mnnd
Here is my kernel config file:
http://paste2.org/g24POj6e
Here is my /etc/fstab file:
Code: | # /etc/fstab: static file system information.
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/BOOT /boot ext2 noauto,noatime 1 2
PARTUUID=0c71f26c-01 / ext4 noatime 0 1
PARTUUID=b4f48be2-06 none swap sw 0 0
PARTUUID=b4f48be2-07 /home ext4 defaults 0 2
/dev/cdrom /mnt/cdrom auto noauto,user 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
|
And here is my grub2 entry for Gentoo:
Code: | menuentry "Gentoo Linux (on /dev/sdb1)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-d0d140d1-08ad-40f5-82fc-3e2ef0b4ae22' {
set root='(hd1,1)'
linux /vmlinuz root=PARTUUID=0c71f26c-01 rootdelay=7
} |
I set the rootdelay in my grub configuration because my installation is located on a USB stick, and I need the EHCI and XHCI drivers to be loaded before the root filesystem is mounted (they are also compiled in-kernel rather than as modules).
I'm at a loss, I've recompiled my kernel at least 10 times and I can no longer see any reason why I am unable to boot.
Thanks for your help.
Last edited by elandiga_varg on Mon May 04, 2015 6:32 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Mon May 04, 2015 6:32 pm Post subject: |
|
|
elandiga_varg,
Welcome to Gentoo.
Close.
Code: | CONFIG_USB_STORAGE=m | is needed to be loaded to mount your root filesystem but as its a module you need to mount root to be able to load it.
You probably need Code: | CONFIG_CHR_DEV_SG=m | as built it too.
The drivers listed in lspci -k are only used for your PCI devices. With root on USB all the USB storage support you need must also be built into the kernel. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
elandiga_varg n00b
Joined: 04 May 2015 Posts: 4 Location: Canada
|
Posted: Mon May 04, 2015 6:53 pm Post subject: |
|
|
I recompiled my kernel with the following:
Code: | CONFIG_USB_STORAGE=y |
and
Code: | CONFIG_CHR_DEV_SG=y |
but I still get the same kernel panic. At this point I'm wondering if setting the root filesystem as a PARTUUID might not be supported by either GRUB or the kernel? Since I can't set UUIDs without an initramfs, and I can't have an initramfs if my installation is on a USB because I need rootdelay, I thought that the way to go would be PARTUUIDs especially that /dev/sdx nomenclature is so volatile.
Here is my new kernel config:
http://paste2.org/GPMvvvGK |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Mon May 04, 2015 7:25 pm Post subject: |
|
|
elandiga_varg,
UUID is a filesystem property. To use that you need the userspace mount tool.
PARTUID is a partition property. The kernel can handle that on its own.
UUID is not the same as PARTUUID. For example
Code: | $ sudo /sbin/blkid
/dev/sda1: UUID="9392926d-6408-6e7a-8663-82834138a597" TYPE="linux_raid_member" PARTUUID="0553caf4-01" | Thats on an MSDOS disk.
A photo of your panic screen would be good. Are you sure its still unknown-block (0,0) ?
Is there a list of block devices that the kernel can see?
Code: | menuentry "Gentoo Linux (on /dev/sdb1)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-d0d140d1-08ad-40f5-82fc-3e2ef0b4ae22' {
set root='(hd1,1)'
linux /vmlinuz root=PARTUUID=0c71f26c-01 rootdelay=7
} | may not be correct either. It all depends on your BIOS.
Tells grub that the things you want to load are in the second partition an the second HDD discovered by the BIOS.
You certainly have a kernel loading but is it the one you think it is?
My boot from USB system sees the USB drive as the first drive when I select to boot from it.
I'm not sure if you can use PARTUUID= in fstab. I use the filesystem UUIDs there. Anyway, thats not the issue at the moment since root isn't mounted, /tc/fstab cannot be read.
-- edit --
You can have an initrd if you want but you need to modify the init script it contains. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
elandiga_varg n00b
Joined: 04 May 2015 Posts: 4 Location: Canada
|
Posted: Mon May 04, 2015 7:50 pm Post subject: |
|
|
So it's possible to use UUIDs in the /etc/fstab even without an initramfs? That's helpful, I might change the entries in /etc/fstab back to UUIDs.
Here is a picture of the kernel panic screen:
http://i.imgur.com/4zdIanA.jpg
I can see that the kernel "3.18.11-gentoo" is detected, which means that the correct kernel is being loaded from the correct partition. It also shows that the error is still unknown-block (0,0). |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Mon May 04, 2015 8:11 pm Post subject: |
|
|
elandiga_varg,
elandiga_varg wrote: | I'm at a loss, I've recompiled my kernel at least 10 times and I can no longer see any reason why I am unable to boot. |
Does not match your photo which shows 3.18.11-gentoo #3. The #3 shows that this is the third build of this kernel.
Also, the kernel is not listing any other HDD or CDROMs. Is there really no other internal storage.
Lets check your kernel build and install sequence and the timestamps on the files.
You use to set up the .config file. What is the timestamp on this file. This is the oldest file in the set as everything else is derived from this file.
You run to build the kernel and modules. make -j5 is faster for you.
This makes the file called arch/x86/boot/bzImage and vmlinuz. They are the same thing. Check the timestamp. It must be newer than .config.
Next is Code: | make modules_install | This installs the .ko files into /lib/modules/'uname -r`/
Lastly you get the kernel into /boot. There are lots of ways of doing this.
The file /boot/vmlinuz must have the same timestamp as the kernel above.
If you find any symlinks, its the target file you check. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
elandiga_varg n00b
Joined: 04 May 2015 Posts: 4 Location: Canada
|
Posted: Mon May 04, 2015 8:37 pm Post subject: |
|
|
Wow, you were right - apparently my symlink did not reflect my current kernel build. It should have been #6 instead of #3 (the first few builds I made were with genkernel, after which I decided I wanted a manual kernel). I checked the timestamps and this kernel was created after the last change to the kernel config file.
However, I still have the kernel panic, and it's still unknown-block (0,0). Here is a picture of what my kernel panic screen looks like now:
http://i.imgur.com/Ffbegep.jpg |
|
Back to top |
|
|
yayo Tux's lil' helper
Joined: 19 May 2014 Posts: 100
|
Posted: Wed May 13, 2015 9:06 pm Post subject: |
|
|
I got the same problem with this pc some days ago, kernel panic and unknown block (0,0), but I was setting it up with UEFI boot. The problem was that UEFI doesn't pass the root partition path to the kernel, so I fixed it writing the root path within the kernel:
Code: | Processor type and features --->
[*] Built-in kernel command line
(root=/dev/sda4 rootfstype=ext4) |
But it doesn't seem to be your case (I don't see a FAT32 boot partition in your fstab, so I guess you're not using UEFI, right?) |
|
Back to top |
|
|
|