Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel panic unable to mount root fs on unknown-block(0 0).
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 453
Location: India

PostPosted: Mon Mar 28, 2016 3:31 pm    Post subject: kernel panic unable to mount root fs on unknown-block(0 0). Reply with quote

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
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Mon Mar 28, 2016 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 453
Location: India

PostPosted: Mon Mar 28, 2016 4:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 453
Location: India

PostPosted: Mon Mar 28, 2016 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Mon Mar 28, 2016 5:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 453
Location: India

PostPosted: Mon Mar 28, 2016 5:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Mon Mar 28, 2016 6:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Mar 28, 2016 6:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
olejseba
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2005
Posts: 95

PostPosted: Tue Mar 29, 2016 11:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Tue Mar 29, 2016 4:13 pm    Post subject: Reply with quote

olejseba,

our OP is getting kernel panic, it is even not getting to init part.
Back to top
View user's profile Send private message
olejseba
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2005
Posts: 95

PostPosted: Tue Mar 29, 2016 4:47 pm    Post subject: Reply with quote

I'm sorry @Buffoon is right :oops: . 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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43223
Location: 56N 3W

PostPosted: Tue Mar 29, 2016 4:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum