# [SOLVED] Kernel panic - not syncing

## spacelike

I get a kernel panic when trying to boot after installing Gentoo. Here is the full error:

```
VFS: Cannot open root device "sda3" or unknown-block(0,0): error

Please append a correct "root=" boot option; here are the available partitions:

0b00        1048575 sr0  driver: sr

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)

Pid: 1, comm: swapper/0 Not tainted 3.4.9-gentoo #1

Call trace:

(I'll write the call trace if someone needs it)
```

I was searching for hours yesterday for a solution as well as asking for help in ##gentoo, ##linux, and ##hardware on freenode. Most stuff seemed to suggest that I needed to compile SCSI support into my kernel, but as far as I can tell I already have it.

I followed kernel-seeds.org to set it up and I used lspci -n with

kmuto.jp/debian/hcl/

to get a list of everything to put in my kernel which I have done.

[EDIT]my lspci -n is here: http://bpaste.net/show/42311/ [/EDIT]

I read on a few different forums that if the unknown-block had displayed numbers other than (0,0) like (3,1) for example then that would imply the filesystem is unknown, however because it shows up as (0,0) that implies that the device specified is completely unknown to the kernel.

Therefore they say this can't be a problem with fstab since my root / isn't even being mounted.

But here is my fstab anyway to at least give an idea of my partition scheme:

```
/dev/sda1      /boot      ext2      defaults,noatime   1 2

/dev/sda3      /      ext4      noatime      0 1

/dev/sda2      none      swap      sw      0 0

/dev/cdrom      /mnt/cdrom   auto      noauto,user   0 0
```

grub.conf (menu.lst)

```
default 0

timeout 30

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.4.9

root (hd0,0)

kernel /boot/kernel-3.4.9-gentoo root=/dev/sda3
```

/boot/grub/device.map

```
#(fd0)   /dev/fd0

(hd0)   /dev/sda

(hd1)   /dev/sdb
```

Here is my kernel .config:

http://bpaste.net/show/42308/

My motherboard is: Asus P6T

CPU: Intel i7

GPU: NVidia GeForce GTX 295Last edited by spacelike on Mon Aug 27, 2012 11:46 pm; edited 1 time in total

----------

## fourteen20

are you using Genkernel to compile the kernel? if so use 

```
root=/dev/ram0 real_root=/dev/sda3 
```

 on your kernel parameters

----------

## DONAHUE

add support for your hard drive adapter to the kernel config 

boot cd and enter the chroot, nominally

```
mount /dev/sda3 /mnt/gentoo

mount /dev/sda1 /mnt/gentoo/boot

cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

mount -t proc none /mnt/gentoo/proc

mount -o bind /dev /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash

env-update

source /etc/profile

export PS1="(chroot) $PS1"

cd /usr/src/linux;make menuconfig
```

edit menuconfig to

 *Quote:*   

> Device Drivers  ---> 
> 
> < > ATA/ATAPI/MFM/RLL support (DEPRECATED)  --->
> 
> <*> Serial ATA and Parallel ATA drivers  --->
> ...

 

```
make && make modules_install

cp arch/x86/boot/bzImage /boot/kernel-3.4.9-gentoo

exit

reboot
```

----------

## spacelike

It worked! Thanks DONAHUE!   :Very Happy: 

The changes you had me make were identical to another kernel configuration I had already tried except for the option:

[*] ATA ACPI Support 

which I had off, so I guess that was my problem.

Also, I noticed you had me disable:

< > NVIDIA SATA support

which I only recently tried turning on. Was that only for testing reasons and maybe I should turn it on again? Or leave it off?

Thanks again both of you!

and btw: @fourteen20, it was not from genkernel, I was doing the configuration myself from gentoo-sources.

----------

## DONAHUE

turning on < > NVIDIA SATA support should be harmless but it won't be used

----------

## spacelike

I just realized that I had

VIDEO_CARDS="intel"

it should have been "nvidia"   :Confused: 

oh well, good thing I caught it now and everything is working. Thanks again.

----------

