View previous topic :: View next topic |
Author |
Message |
manu_leo Guru
Joined: 20 Jan 2014 Posts: 513 Location: India
|
Posted: Mon Mar 28, 2016 3:31 pm Post subject: kernel panic unable to mount root fs on unknown-block(0 0). |
|
|
Hi Experts,
I recently installed Gentoo on one of my servers with the below partition
Quote: |
/dev/sda1 /mnt/gentoo
/dev/sda2 /mnt/gentoo/var and
/dev/sda3 /mnt/gentoo/home
|
However when I reboot my server, I get Kernel Panic with the below code
Quote: | kernel panic-not syncing: VFS: unable to mount root fs on
unknown block(0,0) |
This is what I have in /boot/grub/grub.conf
Quote: |
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-666c1ac4-9101-4904-8987-f2cdbc40de74' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 666c1ac4-9101-4904-8987-f2cdbc40de74
else
search --no-floppy --fs-uuid --set=root 666c1ac4-9101-4904-8987-f2cdbc40de74
fi
echo 'Loading Linux 4.1.15-gentoo-r1 ...'
linux /boot/vmlinuz-4.1.15-gentoo-r1 root=/dev/sda1 ro
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-666c1ac4-9101-4904-8987-f2cdbc40de74' { |
Please help in getting this fixed for me. Appreciate all your help in advance. |
|
Back to top |
|
|
genoobish n00b
Joined: 18 Feb 2015 Posts: 73
|
Posted: Mon Mar 28, 2016 4:45 pm Post subject: |
|
|
Hey, what do you have on your /etc/fstab ?
edit: if you could pastebin your kenrel .config file that would also be useful. |
|
Back to top |
|
|
manu_leo Guru
Joined: 20 Jan 2014 Posts: 513 Location: India
|
Posted: Mon Mar 28, 2016 4:56 pm Post subject: |
|
|
Thanks for the help
Here is the pastebin url --> http://pastebin.com/pkKtntmW
Here is how the fstab looks like :-
Quote: | /dev/sda1 / ext4 noatime 0 1
/dev/sda2 none swap sw 0 0
/dev/sda3 /var ext4 noatime 0 2
/dev/sda4 /home ext4 noatime 0 2
|
|
|
Back to top |
|
|
manu_leo Guru
Joined: 20 Jan 2014 Posts: 513 Location: India
|
Posted: Mon Mar 28, 2016 5:19 pm Post subject: |
|
|
Any suggestion guys ? I am out of ideas, will creating a separate boot partion makes any sense ? Apologies for some weird thoughts.
Appreciate all your help. |
|
Back to top |
|
|
genoobish n00b
Joined: 18 Feb 2015 Posts: 73
|
Posted: Mon Mar 28, 2016 5:26 pm Post subject: |
|
|
Ok, I didn't seem anything weird. (I was basically looking to see if the ext4 drivers were built-in or built as a module, in which case you would probably need an intramfs to boot, but it was build with CONFIG_EXT4_FS=y, so that seems ok.)
Can you boot with a live distro and post the output of `fdisk -l /dev/sda` ? |
|
Back to top |
|
|
manu_leo Guru
Joined: 20 Jan 2014 Posts: 513 Location: India
|
Posted: Mon Mar 28, 2016 5:38 pm Post subject: |
|
|
This is what I have
Quote: | livecd ~ # fdisk -l /dev/sda
Disk /dev/sda: 544.5 GiB, 584652423168 bytes, 1141899264 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
Disklabel type: dos
Disk identifier: 0x000a79a0
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 41945087 41943040 20G 83 Linux
/dev/sda2 41945088 62916607 20971520 10G 82 Linux swap / Solaris
/dev/sda3 62916608 104859647 41943040 20G 83 Linux
/dev/sda4 104859648 1141899263 1037039616 494.5G 83 Linux |
|
|
Back to top |
|
|
genoobish n00b
Joined: 18 Feb 2015 Posts: 73
|
Posted: Mon Mar 28, 2016 6:24 pm Post subject: |
|
|
well.. my limited knowledge has reached it's end. One last shot in the dark would be to add `rootfstype=ext4` to your grub.config file on the kernel line.
edit: Maybe some real expert will show up with an answer. However, if I were in your place I would repartition everything using gpt partitioning(unless I had absolutely no other choice), and having a separate boot partition, and also a newer kernel.
edit2: and I just saw the post where you ask about having a separate boot partition. yes, I think it's good to use a separate boot partition 99.9999% of the time. |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon Mar 28, 2016 6:44 pm Post subject: |
|
|
OK, lets see what we know. Your bootloader works, it boots the kernel. Kernel loads, but cannot access the hard drive with root partition on it. I do not use Grub2, thus cannot comment on your config.
Q1: Is this UEFI or MBR boot?
Q2: What is your kernel command line? |
|
Back to top |
|
|
olejseba Tux's lil' helper
Joined: 04 Sep 2005 Posts: 95
|
Posted: Tue Mar 29, 2016 11:53 am Post subject: |
|
|
Ok. Tell us, are you use systemd or openrc? If you use systemd you need to add this to your grub.config file on the kernel line.
Code: |
init=/usr/lib/systemd/systemd
|
|
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Tue Mar 29, 2016 4:13 pm Post subject: |
|
|
olejseba,
our OP is getting kernel panic, it is even not getting to init part. |
|
Back to top |
|
|
olejseba Tux's lil' helper
Joined: 04 Sep 2005 Posts: 95
|
Posted: Tue Mar 29, 2016 4:47 pm Post subject: |
|
|
I'm sorry @Buffoon is right . I had a similar problem but with lvm. Now I would have called the kernel
drivers for hdd Controller.
Code: |
# lspci |egrep 'SATA|SAS|SCSI'
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54797 Location: 56N 3W
|
Posted: Tue Mar 29, 2016 4:55 pm Post subject: |
|
|
manu_leo,
The unknown block(0,0) meants that the kernel cannot see your HDD at all or that you are booting an EFI stub kernel without setting the kernel command line inside the kernel.
So, are you booting an EFI stub kernel?
If so root=/dev/sda1 needs to be included in the kernel.
If not, explain how you made your kernel and post the following.
The output of lspci
The link you get from wgetpaste by putting your kernel .config onto a pastebin.
You appear to be loading a kernel without an initrd.
Thats fine as long as you have everything needed for booting built in <*> since modules cannot be loaded until after root is mounted. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|