# Kernel Panic "Cannot open root device" (Solved)

## TeckPriezt

Hope some one can help me as I can't find out where this problem has come from.

This is what is displayed we I reboot after doing a install

VFS: Unable to mount root fs via NFS, trying floppy.

UFS: Cannot open root device "hda3" or unkown-block(2,0)

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

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

Could someone please helpLast edited by TeckPriezt on Sun Feb 01, 2009 6:14 am; edited 1 time in total

----------

## LittleBug

Can you post the kernel configuration file (.config) ?

----------

## jfp

Are you trying to install into a vmware virtual machine? If so, there are several threads in the forums that discuss this problem.

----------

## EasterParade

Ie had the same glitch and did not know what was wrong until I saw that I've forgot to compile Ext2 filesystem support into the kernel. That solved it at once since my sda1 is ext2.

May be your problem lies somewhere else -  just an idea.

----------

## mroconnor

I am getting this error as well with 2.6.29 has this been solved?

----------

## mgrela

Please post your kernel .config.

----------

## NeddySeagoon

TeckPriezt,

Your kernel is missing one (or more) of two things.

The high level Disk Driver (IDE or SCSI)

The low level chipset specific driver.

Its not got as far as trying to read a filesystem so that could be missing too. Please post your lspci output so we can see your hard drive controller hardware.

----------

## mroconnor

I just fixed this after actually looking at my .config instead of saying I know it is right. 

Anyway, I have the SCSI disk support compiled as a module not as built-in.....I get idiot points today.   :Embarassed: 

----------

## TeckPriezt

where do I find the kernel .config and what is lspci (Linux Noob here sorry)

----------

## pappy_mcfae

lspci is part of a package called pciutils (installed by entering emerge pciutils). It's a must to be able to work with your kernel to any degree. 

Your kernel .config will be found in your kernel source directory. Try cat /usr/src/linux/.config > /config.txt. That should make your .config visible, and also find out whether or not your symlink was created.

Blessed be!

Pappy

----------

## mgrela

There is also an interesting option you should consider -> "General setup -> Kernel .config support, Enable access to .config through /proc/config.gz". It allows you to easily extract the .config of a running kernel even if you loose the sources directory.

----------

## TeckPriezt

sorry about this but how do I copy all the info in the config.txt to the fourms as nano doesn't seem to have a select all function so I can copy and paste it

----------

## NeddySeagoon

TeckPriezt,

lspci is a tool to read the PCI Vendor and Device IDs of all your PCI/PCIe/PCIx and AGP devices and look them up in a database.

Its provided on the liveCD and in the package pciutils, which you will need to emerge.

We don't need your kernel .config file yet. Given your lspci output, we can advise how your kernel should be configured.

If you want to post it anyway, use a tool called wgetpaste, which you will need to emerge while you are in your chroot.

```
wgetpaste /usr/src/linux/.config   
```

will put your .config file on the web and return the URL. Post the URL to the forums.

----------

## TeckPriezt

Ok heres the lspci output

0:00.0 Host bridge: Silicon Integrated Systems [SiS] 630 Host (rev 31)

00:00.1 IDE inerface: Silicon Integrated Systems [SiS] 5513 [IDE] 9rev d0)

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

00:01.1 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 82)

00:01.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)

00:01.3 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)

00:01.4 Multimedia audio controller: Silicon Integrated Systems [SiS] SiS PCI Audio Accelerator (rev 02)

00:01.6 Modem: Silicon Integrated Systems [SiS] AC'97 Modem Controller (rev a0)

00:02.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-toPCI bridge (AGP)

00:03.0 CardBus bridge: 02 Micro, Inc. 02601/6912/711E0 CardBus/SmartCardBus Controller

00:0a.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 04)

01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 630/730 PCI/AGP VGA Display Adapter (rev 31)

----------

## NeddySeagoon

TeckPriezt,

Here is your disk controller

```
00:00.1 IDE inerface: Silicon Integrated Systems [SiS] 5513 [IDE] 9rev d0) 
```

There are two sets of drivers in the kernel for that, we will use the new ones, under SCSI. Navigate make menuconfig and set the options as follows:-

```
 Device Drivers  --->

  │ │    < > ATA/ATAPI/MFM/RLL support  --->                                    │ │  

  │ │        SCSI device support  --->                                          │ │  

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

In the  SCSI device support  --->  menu, set the following

```
│ │    < > RAID Transport Class                                               │ │  

  │ │    -*- SCSI device support                                                │ │  

  │ │    < > SCSI target support                                                │ │  

  │ │    [*] legacy /proc/scsi/ support                                         │ │  

  │ │        *** SCSI support type (disk, tape, CD-ROM) ***                     │ │  

  │ │    <*> SCSI disk support                                                  │ │  

  │ │    < > SCSI tape support                                                  │ │  

  │ │    < > SCSI OnStream SC-x0 tape support                                   │ │  

  │ │    <M> SCSI CDROM support                                                 │ │  

  │ │    [ ]   Enable vendor-specific extensions (for SCSI CDROM)               │ │  

  │ │    <M> SCSI generic support                                               │ │  

  │ │    < > SCSI media changer support                                         │ │  

  │ │        *** Some SCSI devices (e.g. CD jukebox) support multiple LUNs ***  │ │  

  │ │    [*] Probe all LUNs on each SCSI device 
```

They are not all needed for your hard drive but some options there are used by USB connected storage and card readers, so its good to have them.

turn off  [ ] SCSI low-level drivers  --->   as it prevents lots of modules you don't need being made. Exit that menu and go into 

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

Here set, 

[*]   ATA SFF support and (close to the bottom) <*>     SiS PATA support. You may not have the ATA SFF support option, thats ok.

Rebuild your kernel the normal way.  If you use genkernel, you need to run it with the -menuconfig option, so you can make the settings above.

These settings give all your devices SCSI device names. Your hard drive will be /dev/sda and your CDROM will be /dev/sr0.

udev will fix the symbolic links for your CDROM, so you need do nothing to get it to work. Howerver, all the /dev/hda entries in /etc/fstab and the real_root=/dev/hd in /boot/grub/grub.conf need to be changed to use the new SCSI name.

----------

## TeckPriezt

Thanks you for the help worked like a charm and for safty sake I went through all of the hardware drivers type and turn on all SiS options related to what the lspci output

----------

