# kernel panic unable to mount root fs on unknown-block(0 0).

## manu_leo

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
> ...

 

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' {
> ...

 

Please help in getting this fixed for me. Appreciate all your help in advance.

----------

## genoobish

Hey, what do you have on your /etc/fstab ?

edit: if you could pastebin your kenrel .config file that would also be useful.

----------

## manu_leo

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
> ...

 

----------

## manu_leo

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.

----------

## genoobish

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` ?

----------

## manu_leo

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
> ...

 

----------

## genoobish

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.

----------

## Buffoon

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?

----------

## olejseba

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.

```

init=/usr/lib/systemd/systemd

```

----------

## Buffoon

olejseba,

our OP is getting kernel panic, it is even not getting to init part.

----------

## olejseba

I'm sorry @Buffoon is right  :Embarassed:  . I had a similar problem but with lvm. Now I would have called the kernel

drivers for hdd Controller.

```

# lspci |egrep 'SATA|SAS|SCSI'

```

----------

## NeddySeagoon

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.

----------

