# [SOLVED] VFS: Cannot open root device

## neggard

I have using genkernel and want to kompile another now.

But when I boot I got this error after a while in the boot process,

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

Please append a correct "root=" boot option;

Kernel panic

This is my grub.conf

default 0

timeout 30

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

title Gentoo Linux 2.6.29-r5

root (hd0,0)

kernel /boot/kernel-genkernel-x86_64-2.6.29-gentoo-r5 root=/dev/ram0 real_root=$

initrd /boot/initramfs-genkernel-x86_64-2.6.29-gentoo-r5

title Gentoo Linux 2.6.29-r5 egen

root (hd0,0)

kernel /boot/kernel-2.6.29-gentoo-r5 root=/dev/sda3 rootdelay=10

Is there something wrong or do I need something more in my kernel?Last edited by neggard on Sat Aug 15, 2009 8:31 pm; edited 1 time in total

----------

## rndusr

How does your /etc/fstab look like? You can try adding real_root=/dev/sda3 as well to the kernel arguments. Sometimes that helps.

Why have you added the rootdelay option? Are you booting from USB? In that case, see if it helps with a longer delay.

Note that you can experiment with the options directly in grub, so you don't need to change the config file every time.  :Smile: 

----------

## neggard

this is my fstab:

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda1               /boot           ext2            noauto,noatime  1 2

/dev/sda3               /               ext3            noatime         0 1

/dev/sda2               none            swap            sw              0 0

/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/sdb1               /mnt/80gig      ext3            noatime         0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec    $

I add rootdelay because I read about it in the forum and that have help some of the users.

----------

## cach0rr0

In addition to /etc/fstab, please post the output of the following:

```

cat /proc/cpuinfo

lspci -n

ls -l /usr/src/linux

```

ALSO: If you could, please post your kernel config to  http://pastebin.ca and share the link with us

This error indicates you do not have support for your SATA or IDE controller built correctly into the kernel. As such the disk cannot be mounted/recognized.

----------

## cach0rr0

 *neggard wrote:*   

> 
> 
> I add rootdelay because I read about it in the forum and that have help some of the users.

 

I normally only see people getting benefit from this when root is on an external drive, e.g. USB drive. 

Your results may vary, but I don't know that you necessarily need it here. 

Likely just need a new kernel. We can help with that

----------

## neggard

Here is all the info

cat /proc/cpuinfo 

processor	: 0

vendor_id	: AuthenticAMD

cpu family	: 16

model		: 4

model name	: AMD Phenom(tm) II X2 550 Processor

stepping	: 2

cpu MHz		: 3113.849

cache size	: 512 KB

physical id	: 0

siblings	: 2

core id		: 0

cpu cores	: 2

apicid		: 0

initial apicid	: 0

fpu		: yes

fpu_exception	: yes

cpuid level	: 5

wp		: yes

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc pni monitor cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt

bogomips	: 6227.69

TLB size	: 1024 4K pages

clflush size	: 64

cache_alignment	: 64

address sizes	: 48 bits physical, 48 bits virtual

power management: ts ttp tm stc 100mhzsteps hwpstate

processor	: 1

vendor_id	: AuthenticAMD

cpu family	: 16

model		: 4

model name	: AMD Phenom(tm) II X2 550 Processor

stepping	: 2

cpu MHz		: 3113.849

cache size	: 512 KB

physical id	: 0

siblings	: 2

core id		: 1

cpu cores	: 2

apicid		: 1

initial apicid	: 1

fpu		: yes

fpu_exception	: yes

cpuid level	: 5

wp		: yes

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc pni monitor cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt

bogomips	: 6228.40

TLB size	: 1024 4K pages

clflush size	: 64

cache_alignment	: 64

address sizes	: 48 bits physical, 48 bits virtual

power management: ts ttp tm stc 100mhzsteps hwpstate

lspci -n

00:00.0 0600: 1002:5958

00:02.0 0604: 1002:5978

00:04.0 0604: 1002:597a

00:0a.0 0604: 1002:597f

00:11.0 0106: 1002:4390

00:12.0 0c03: 1002:4397

00:12.1 0c03: 1002:4398

00:12.2 0c03: 1002:4396

00:13.0 0c03: 1002:4397

00:13.1 0c03: 1002:4398

00:13.2 0c03: 1002:4396

00:14.0 0c05: 1002:4385 (rev 3a)

00:14.1 0101: 1002:439c

00:14.2 0403: 1002:4383

00:14.3 0601: 1002:439d

00:14.4 0604: 1002:4384

00:14.5 0c03: 1002:4399

00:18.0 0600: 1022:1200

00:18.1 0600: 1022:1201

00:18.2 0600: 1022:1202

00:18.3 0600: 1022:1203

00:18.4 0600: 1022:1204

01:00.0 0300: 10de:0615 (rev a2)

02:00.0 0106: 197b:2363 (rev 02)

02:00.1 0101: 197b:2363 (rev 02)

03:00.0 0200: 10ec:8168 (rev 03)

04:0e.0 0c00: 104c:8024

ls -l /usr/src/linux 

lrwxrwxrwx 1 root root 22 Jul  2 04:22 /usr/src/linux -> linux-2.6.29-gentoo-r5

http://pastebin.ca/1527759

----------

## neggard

http://pastebin.ca/1527784

This is the .config in /usr/src/linux

the other where in /etc/kernels/

----------

## h0mer`-

DEVICE_DRIVERS

->Serial ATA

->ATA SFF support 

<*>ATI PATA Support

<*> JMicron PATA Support

----------

## cach0rr0

 *neggard wrote:*   

> http://pastebin.ca/1527784
> 
> This is the .config in /usr/src/linux
> 
> the other where in /etc/kernels/

 

mk, a few things

CONFIG_SATA_AHCI=m

needs to be

CONFIG_SATA_AHCI=y

CONFIG_PATA_ATIIXP=m

needs to be

CONFIG_PATA_ATIIXP=y

CONFIG_PATA_JMICRON=m

needs to be

CONFIG_PATA_JMICRON=y

Try making those changes first and foremost

Failing that, there are tonnes of items in this config that you simply do not need - highly recommend building your config from standard menuconfig rather than genkernel, and selecting ONLY the drivers you need. 

The page in my sig should help with identifying em

For a mini HOWTO on working through menuconfig, have a look through my posts on this thread - https://forums.gentoo.org/viewtopic-t-787404-start-75.html

----------

## neggard

This was harder than I expect.

Is there any general config file to use?

I dont want genkernal but a failsafe that you later can change to fit your system.

Should be good to have experience users to upload their config to a site and then you could download 

if you have the same setup or at least same motherboard.

----------

## cach0rr0

 *neggard wrote:*   

> This was harder than I expect.
> 
> Is there any general config file to use?
> 
> I dont want genkernal but a failsafe that you later can change to fit your system. 
> ...

 

Realistically no, there's not really one generic config that you can use to get a working kernel. 

Certain drivers conflict with each other, some cases you have two drivers that can handle a device, so building *everything* in results in either a painfully bloated, or in most cases, a completely non-functional system. 

For most people I recommend following Pappy's guide and using a seed .config, building from there. 

http://62.3.120.141/~pappy/

It really does take the guesswork out of configuring a bare bones kernel - the times when you see something enabled, and you're not sure what it does, but you're scared to delete it. 

Truth be told, for most people there are only about a dozen or so drivers they need to have in their kernel - his guide shows you how to find out what driver is correct, and is where I got my signature from. Again, highly recommend it, as it'll greatly facilitate your kernel builds going forward. 

 *Quote:*   

> 
> 
> Should be good to have experience users to upload their config to a site and then you could download 
> 
> if you have the same setup or at least same motherboard.

 

I personally try and do this - http://whitehathouston.com/hardware

I still have a few to put up there

The problem is

a)some PC's that are identical in model number, might have different parts for whatever reason. 

b)you still have to concern yourself with things such as file systems. For example, say you need XFS support, but I only build ext3 into my kernel - if you copy mine directly, and don't at least review it,  your partitions formatted with XFS will be unable to mount - especially bad if your root is XFS as that'd prevent it from booting. 

Such a thing would be a great starting point though, I do agree. I *will* say again though, pappy's seeds facilitate a large amount of this if you follow his guide.

----------

## neggard

I should read and try the stuff on pappy.

I notice something...

when I use 

make && make modules_install

I got some errors, 

http://pastebin.ca/1529973

----------

## cach0rr0

failed kernel compiles make me nervous

but

```

CONFIG_INFINIBAND:                                                                         │  

  │                                                                                            │  

  │ Core support for InfiniBand (IB).  Make sure to also select                                │  

  │ any protocols you wish to use as well as drivers for your                                  │  

  │ InfiniBand hardware.

```

You do not need this. 

It's about the 8th or 9th from the bottom under "Device Drivers". Deselect the whole thing, save the config, see if it builds.

----------

## neggard

When I'm using pappys page I got a working kernal.

Now I just have to get my screen and graphics working  :Smile: 

Thanks for all the fast reply's and all you knowledege.

----------

## cach0rr0

Pappy++

Chalk another one up to the legend. 

Please mark this thread as [SOLVED] by editing your original post. We can handle the graphics issues in another thread if need be  :Smile: 

----------

## pappy_mcfae

High five!

Blessed be!

Pappy

----------

