# Kernel panic on fresh install

## dbbolton

Here is the message I got when trying to boot into my new Gentoo system (from Grub)

```

VFS: Cannot open root device "hda3" or unknown-block(0,0)

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

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

```

Here is some infro I was able to get from lsmod and lspci before compiling the kernel

```

Module                  Size  Used by                                                          

ipv6                  236260  12                                                                                                                              

async_memcpy           10880  1 raid456                                                        

async_xor              12160  1 raid456                                                        

xor                    21896  2 raid456,async_xor                                              

async_tx               15948  3 raid456,async_memcpy,async_xor                                                                                                 

dm_mod                 63428  3 dm_bbr,dm_snapshot,dm_mirror                                                                                                  

ieee1394               92600  2 sbp2,ohci1394                                                                                                                 

usbcore               133484  7 sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd                                                                       

firmware_class         17408  1 qla2xxx                                                                                                                        

megaraid_mm            18464  1 megaraid_mbox                                                                                                                 

scsi_transport_sas     37120  1 mptsas

scsi_transport_fc      49028  3 lpfc,qla2xxx,mptfc

scsi_tgt               22344  1 scsi_transport_fc

mptscsih               41344  3 mptsas,mptfc,mptspi

mptbase                78308  4 mptsas,mptfc,mptspi,mptscsih

53c700                 33444  1 sim710

scsi_transport_spi     30848  7 mptspi,53c700,dmx3191d,sym53c8xx,aha152x,aic7xxx,aic79xx

pata_sis               21892  1 sata_sis

libata                152248  17 pdc_adma,sata_inic162x,sata_mv,ata_piix,ahci,sata_qstor,sata_vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sata_promise,pata_sis

00:00.0 Host bridge: Silicon Integrated Systems [SiS] 5597 [SiS5582] (rev 10)

00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge) (rev 01)

00:01.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)

00:0f.0 Ethernet controller: Lite-On Communications Inc LNE100TX (rev 21)

00:14.0 VGA compatible controller: Silicon Integrated Systems [SiS] 5597/5598/6326 VGA (rev 68)

```

I compiled with support for BLK_DEV_SIS5513 built into the kernel.

----------

## NeddySeagoon

dbbolton,

Welcome to Gentoo.

```
unknown-block(0,0)
```

means that the kernel cannot talk to your hard drive. This is because you have something missing from your kernel, probably your hard drive controller driver. You chip set is

```
00:01.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0) 
```

Set the IDE and SCSI support like this but on the   

```
<*> Serial ATA (prod) and Parallel ATA (experimental) drivers  --->
```

menu, choose only  [*]   ATA SFF support and <*>     SiS PATA support.

The rest of the ICH7 post applies to you too - your drive will get a SCSI name, so you will need to change grub.conf and /etc/fstab

----------

## dbbolton

 *NeddySeagoon wrote:*   

> 
> 
> The rest of the ICH7 post applies to you too - your drive will get a SCSI name, so you will need to change grub.conf and /etc/fstab

 

Thank you for your response. However, I don't understand this part. How can I figure the new name? I ran fddisk -l, but it showed the same partition names.

----------

## NeddySeagoon

dbbolton,

fdisk -l will show the old names until your own kernel boots.

The kernel contains two drivers for your IDE chipset. The old one, used by the liveCD, names your drive /dev/hda.

The new one, which I have advised you to use will use /dev/sda for your drive.

Change /dev/hda to /dev/sda in /etc/fstab and in grub.conf, so that when your own kernel starts and names your drive /dev/sda, grub and fstab are looking for it there.

If you go back to the liveCD, the name will revert to /dev/hda while the liveCD is running.

----------

## dbbolton

Ok, that got me past the panic, but I discovered a new issue. One of the boot messages said that eth0 doesn't exist, and I'm pretty sure I configured it correctly during the installation, so I'm guessing I messed up with the kernel. Do you know which module I would need for my Ethernet controller?

----------

## NeddySeagoon

dbbolton,

Your ethernet is

```
00:0f.0 Ethernet controller: Lite-On Communications Inc LNE100TX (rev 21) 
```

which requires the tulip kernel module. Unfortunately, this is aa whole family, not a single type and tulip has soe sub options which you may need to get right for your card to work.

Do 

```
lsmod
```

 and check for tulip in the ouput.

If its not there, do 

```
modprobe tulip
```

 and check again.

If tulip is loaded, 

```
ifconfig -a
```

 should show a eth0.

When you have eth0, try 

```
/etc/init.d/net.eth0 restart
```

which should make your network work.

Add tulip to /etc/modules.autoload.d/kernel-2.6 (follow the comments) so the module loads on biit.

If modprobe returns an error you need to build the tulip option in the kernel.

----------

## dbbolton

 *NeddySeagoon wrote:*   

> dbbolton,
> 
> Your ethernet is
> 
> ```
> ...

 

This is strange. I thought I actually built tulip into the kernel (after googling the name of my network card), not as a module. I opened menuconfig to make sure, and it was definitely built-in. Should I rebuild the kernel with tulip as a module, or is there something else I should try?

----------

## NeddySeagoon

dbbolton,

Try 

```
/etc/init.d/net.eth0 restart
```

 to see if it works.

Check 

```
ifconfig -a
```

to see if it works.

As I said, tulip is a family, you may need the right sub-options for your card.

Remake your kernel with tulip as a module, since you can rebuild and reload modules without rebooting.

This makes trial and error debug much faster.

When you know what works, you can build it in again if you wish

----------

## dbbolton

I build modules for both of the DEC chipsets under tulip ( http://www.linuxquestions.org/hcl/showproduct.php?product=24&sort=8&cat=myprod&page=1 ) and i added a "b" to the end of the kernel name and moved it to /boot/, but it seems that something has gone wrong- /boot is empty, as though the partition isn't mounted. I checked /etc/fstab, and it looks right- /boot set to /dev/sda1. I ran 'mount -a', but' ls -la /boot' still shows it being empty.

I tried to reinstall grub (probably a stupid idea) with "grub-install --no-floppy /dev/sda". I created a new grub.conf  When I rebooted, my grub menu didn't show up, but instead I got the 'grub >' prompt. So I setup grub to hd0,0 (since boot is supposed to be /dev/sda1) and rebooted. That got my old grub menu back, and I booted the old kernel (the one without the b).

The really disturbing thing is that eth0 worked, and /boot only contains my "b" kernel. Admittedly, I now have no idea what is going on.

I just tried 'mount /dev/sda1 /boot' but got a message saying that ext2 is an unrecognized filesystem type.

----------

## NeddySeagoon

dbbolton,

A default gentoo install sets the noauto option in /etc/fstab for boot, so you must mount it manually whan you want to install a new kernel.

```
mount /boot
```

will do nicely.

There is no need to reinstall grub when you install a new kernel but you may need to edit grub.conf so it has an option to load the new kernel.

You made the kernel without ext2fs support, which is why your 

```
mount /dev/sda1 /boot
```

failed, so you own kernel cannot mount /boot. Oops. 

To recover, do the following ...

```
cd /usr/src/linux

make menuconfig
```

find ext2 and set it to <M>

exit menuconfig, saving the change

```
make modules 

make modules_install

modprobe ext2
```

You can now mount /boot.

Next time you make your kernel, set ext2 to <*> so its built in

----------

## phoenix89

I was having the problem mentioned earlier with the SiS5513 driver and it not detecting the root partition.  I finally got past that point and now I am getting a error that says

Warning: unable to open an initial console.

----------

