# "VFS: Cannot open root device" on brand new system [Solved]

## don quixada

Help! I'm building a new computer system and the kernel doesn't work! I found a thread here:

https://forums.gentoo.org/viewtopic-t-510265.html

that talks about the issue. But, like the 2nd-last poster, I seem to have the right stuff configured.

I found out that the livecd is using a K2 SATA module (sata_svw), but I can't find that in the kernel anywhere (2.6.23-gentoo-r3).

Any ideas-- I'm still in chroot and have no working kernel.

thanks

dqLast edited by don quixada on Sun Dec 16, 2007 9:33 pm; edited 1 time in total

----------

## frostschutz

That SATA driver is included in the kernel, maybe just easy to miss? Use the search function (/) in menuconfig to make it show you the exact location.

```
 .config - Linux Kernel v2.6.23.9 Configuration

 ────────────────────────────────────────────────────────────────────────────────────

  ┌─────────────────────────────── Search Results ────────────────────────────────┐

  │ Symbol: SATA_SVW [=n]                                                         │  

  │ Prompt: ServerWorks Frodo / Apple K2 SATA support                             │  

  │   Defined at drivers/ata/Kconfig:51                                           │  

  │   Depends on: ATA && PCI                                                      │  

  │   Location:                                                                   │  

  │     -> Device Drivers                                                         │  

  │       -> Serial ATA (prod) and Parallel ATA (experimental) drivers (ATA [=y]) │  

  │                                                                               │  

  │                                                                               │  

  │                                                                               │  

  │                                                                               │  

  │                                                                               │  

  │                                                                               │  

  ├───────────────────────────────────────────────────────────────────────(100%)──┤  

  │                                   < Exit >                                    │  

  └───────────────────────────────────────────────────────────────────────────────┘ 
```

----------

## don quixada

hmm, I grepped the .config file, but I'll try your method...

----------

## frostschutz

There should be a file sata_svw.c in the kernel source tree... if there isn't then this driver was only added recently - it's part of vanilla 2.6.23.9 kernel at the very least though

----------

## don quixada

Yep, found it, built it, kernel still broken. Any other ideas?

----------

## neiljw

 *don quixada wrote:*   

> Yep, found it, built it, kernel still broken. Any other ideas?

 

Did you build it into the kernel or as a module? It needs to be in the kernel to use it to boot (or in an initrd file).

----------

## don quixada

Yes, I built it into the kernel. I built everything I thought to be related into the kernel, still no dice. 

I did notice something strange with how the livecd setup the devices though. My setup is:

one SATA drive (the main drive)

one IDE cd-drive (master)

one IDE hard drive (slave)

(my motherboard (an ASUS m3a) only has one capability for one IDE ribbon, thus two IDE devices)

but for some reason the livecd sets up the IDE hard drive as /dev/sdb and not /dev/hda (or hdb); the cd-drive is /dev/sr0. So consequently in grub.conf I setup my root as /dev/sda5. But when I reboot, the kernel panic message states that I "Cannot open root device "sda5" or unknown-block(0,0)" and lists the available partitions for boot to be all the partitions on the IDE hard drive listed as /dev/hdbX partitions.

I tried different derivations for 'root=' in grub.conf (such as /dev/hda5), but to no avail. What's going on? Is it maybe a problem when I bind /dev from the livecd to the cdrooted system and then build the kernel in that chroot? 

I'm gonna try to build the kernel while chrooted from knoppix-- maybe that'll make a difference. Oh, and I'm also going to try changing the IDE drive to cable-select. 

dq

----------

## don quixada

Knoppix chroot didn't work (there is no 64 bit version).

Chrooting from an alternate (64bit) livecd with proper IDE/SATA recognition hasn't worked so far. I'm doing an 'emerge -De world' but I think that may be futile.

Cable select made no difference.

Is there a way I can extract the working kernel from the livecd so I at least don't have to chroot everytime I reboot?

dq

----------

## jburns

Removing the ATA/ATAPI/MFM/RLL support in the kernel should change the /dev/hd* to /dev/sd*.

----------

## don quixada

Really the whole thing and its subcategories? I'll give it a try. Thanks.

dq

----------

## cyrre

Maybe you should try to alter your fstab and switch sdXY to hdXY (or: hdXY to sdXY).

When I boot with the minimum-/live CD my devices get /dev/hdX but when I boot my system they get /dev/sdX.

I have both SATA & PATA harddrives in my computer.

With my first kernel my drives would get /dev/hdX, but after removing the following two options, they are now listed as /dev/sdX (even IDE hdd:s):

```

->ATA/ATAPI/MFM/RLL

< > generic/default IDE chipset support

< > Generic PCI IDE Chipset Support
```

After this change I had to alter my fstab and switch everything to /dev/sdX.

I still have ATA/ATAPI/MFM/RLL support enabled because my Promise IDE controller isn't working with libata.

libata still handles all my other drives (those connected to the mainboard), 2 SATA + 2 PATA.

----------

## don quixada

fstab isn't read that early in the boot process is it?

I'm not really using the second hardrive for anything at the moment, so it doesn't really matter how it is displayed. I just thought maybe it indicated a problem.

I tried removing support for ATA/ATAPI/MFM/RLL in the kernel and there was no effect.

dq

----------

## lonrot_m

mmm, i dont know if you tried but why dont you change your root=... in grub.conf to root=/dev/hdb5 since

 *Quote:*   

> lists the available partitions for boot to be all the partitions on the IDE hard drive listed as /dev/hdbX partitions. 

 

----------

## don quixada

Believe me, I tried that and every permutation...

----------

## don quixada

Well, I solved that problem here. Thanks everyone for your help! Now I can't get my mouse to work... [edit: got it to work-- I didn't start gpm]

dq

----------

