# Kernel Panic error when starting server.

## manu_leo

Hi Experts, I am trying to install Gentoo on my new server. I finished the installation , and when I reboot, I get a Kernel panic error message which says :-

```
Kernel Panic-not syncing : VFS unable to mount root fs on unknow block (0,0)

```

```
# lspci | grep -i sata /usr/src/linux/.config | grep -v ^#

CONFIG_SATA_PMP=y

CONFIG_SATA_AHCI=m

CONFIG_SATA_INIC162X=m

CONFIG_SATA_SIL24=m

CONFIG_SATA_QSTOR=m

CONFIG_SATA_SX4=m

CONFIG_SATA_MV=m

CONFIG_SATA_NV=m

CONFIG_SATA_PROMISE=m

CONFIG_SATA_SIL=m

CONFIG_SATA_SIS=m

CONFIG_SATA_SVW=m

CONFIG_SATA_ULI=m

CONFIG_SATA_VIA=m

CONFIG_SATA_VITESSE=m
```

I am not sure what exactly I am missing here. I researched on it and found that this Kernel panic could be because Linux kernel is unable to either :-

```
1. detect the controller for your hard disk (a likely candidate if the message says unknown-block(0,0))

2. detect your partition because it doesn't have support for your partition types (less likely)

3. mount your partition because it doesn't know how to access the file system (a likely candidate if the message gives a non-zero figure in the first number set, such as unknown-block(2,0))

4. detect your partition because you passed the wrong device in your boot loader configuration
```

Point 2 does not apply because I have enabled ext4, ext3, ntfs file support.

Point 3 is not a valid point because of the error code. Mine is (0,0)

Point 4 does not seems to be vaild because I have the mounting in place as below :-

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

```

I have done the installation almost 15 times but always get stuck at the same point. Would be really helpfull if you could help me in getting this fixed.

Appreciate all your help in advance.

----------

## NeddySeagoon

manu_leo,

```
Kernel Panic-not syncing : VFS unable to mount root fs on unknow block (0,0) 
```

The unknow block (0,0) is key.  It tells that your kernel cannot reach your HDD.

Usually because the low level driver for your HDD controller is missing or made as a module.

Post the output of lspci, at least, nte IDE/SATA lines.

Also tell us how you made your kernel.

----------

## manu_leo

Thanks Neddy for looking into this.

```
  lspci | grep -i sata

00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA IDE Controller #1

livecd linux # lspci | grep -i ide

00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA IDE Controller #1

```

This is how I make build the kernel :-

```
mount /dev/sda1 /mnt/gentoo 

mount /dev/sda3 /mnt/gentoo/var

mount /dev/sda4 /mnt/gentoo/home

mount -t proc proc /mnt/gentoo/proc

mount --rbind /sys /mnt/gentoo/sys

mount --rbind /dev/ /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash 

source /etc/profile 

env-update 

emerge gentoo-sources

cd /usr/src/linux 

make menuconfig 

..... save and exit 

make -j24 && make -j24 modules_install

make install

emerge -av grub

grub2-install /dev/sda

No error reported

grub2-mkconfig -o /boot/grub/grub.cfg

Found image ....

reboot 
```

----------

## Jaglover

```
CONFIG_SATA_PMP=n 

CONFIG_SATA_AHCI=y 

CONFIG_SATA_INIC162X=n 

CONFIG_SATA_SIL24=n 

CONFIG_SATA_QSTOR=n 

CONFIG_SATA_SX4=n 

CONFIG_SATA_MV=n 

CONFIG_SATA_NV=n 

CONFIG_SATA_PROMISE=n 

CONFIG_SATA_SIL=n 

CONFIG_SATA_SIS=n 

CONFIG_SATA_SVW=n 

CONFIG_SATA_ULI=n 

CONFIG_SATA_VIA=n 

CONFIG_SATA_VITESSE=n

```

This is what you need.

----------

## manu_leo

Thanks Jaglover for looking into this. Here is what I see

```
linux # grep CONFIG_SATA /usr/src/linux/.config

# CONFIG_SATA_ZPODD is not set

# CONFIG_SATA_PMP is not set

CONFIG_SATA_AHCI=y

# CONFIG_SATA_AHCI_PLATFORM is not set

# CONFIG_SATA_INIC162X is not set

# CONFIG_SATA_ACARD_AHCI is not set

# CONFIG_SATA_SIL24 is not set

```

Am I missing something here ?

----------

## manu_leo

```
 # lspci | grep -i sata /usr/src/linux/.config | grep -v ^#

CONFIG_SATA_AHCI=y

```

----------

## manu_leo

```
(chroot) livecd linux # make install

sh ./arch/x86/boot/install.sh 3.16.5-gentoo arch/x86/boot/bzImage \

        System.map "/boot"

(chroot) livecd linux # grub2-install /dev/sda

Installing for i386-pc platform.

Installation finished. No error reported.

(chroot) livecd linux # grub2-mkconfig -o /boot/grub/grub.cfg

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-3.16.5-gentoo

Found linux image: /boot/vmlinuz-3.16.5-gentoo.old

done

shutdown -r now

```

----------

## NeddySeagoon

manu_leo,

```
IDE interface: Intel Corporation 82801JI (ICH10 Family)
```

I think that predates AHCI, so you will need   

```
<*>       Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support 
```

Having both is harmless.

There are other causes of thise erroor too.

```
< > ATA/ATAPI/MFM/RLL support (DEPRECATED)  ----

<*> SCSI disk support 
```

The first must be off, the latter must be on.

One or both of the following are essential too.

```
[*]   PC BIOS (MSDOS partition tables) support

[*]   EFI GUID Partition support
```

Set both on if you are unsure.

----------

