# [SOLVED]VFS cant open root device "null" or unkown device...

## Maadiah

I can't make my kernel work without config Initramfs.I have googled a lot,but have no idea,what i missed?

```

$lspci

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)

00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)

00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)

00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)

00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)

00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)

00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)

00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)

00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 05)

00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)

01:00.0 VGA compatible controller: nVidia Corporation Device 0a75 (rev a2)

01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)

02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)

03:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)

ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)

ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)

ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)

ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)

ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

```

How can i config the FS and Disk driver correctly?

i'm using Acer Aspire  4740G.It will be best if some guy share your .config file with me  :Smile: 

Configing the kernel is really boring!

Here is my .config file.Please help!Really thanks.

http://files.cnblogs.com/maadiah/config.zip

----------

## NeddySeagoon

Maadiah,

With no error messages and no informations about your setup, its difficut to know what you might have done wrong.

Indeed, your kernel could be fime, you may not have done the kernel install correctly.

For a default install, using ext2 or /boot and ext3 on / everything looks ok.  That points towards a kernel install error.

What error message do you get ?

How are your partitions laid out ?

What do you have in grub.conf ?

What does 

```
ls -l /boot
```

 show?

Check your BIOS - be sure the SATA controller is in AHCI/Raid mode, not in IDE/Legacy mode.

Make friends with wgetpaste while you are at the command line.  You can use it to put files or command output on the web.

For short things, we prefer that you put them directly in a post.  Long things, like the kernel config file won't fit in a posy, in which case the URL is fine.

----------

## Maadiah

I think my /boot has been mounted twice!look:

```
localhost maadiah # ls /boot

initramfs-genkernel-x86_64-2.6.38-gentoo-r6

initramfs-genkernel-x86_64-3.0.0-rc4+

kernel-genkernel-x86_64-2.6.38-gentoo-r6

kernel-genkernel-x86_64-3.0.0-rc4+

kernel-tuxonice

lost+found

my-initramfs.cpio.gz

System.map-genkernel-x86_64-2.6.38-gentoo-r6

System.map-genkernel-x86_64-3.0.0-rc4+

localhost maadiah # umount /boot

localhost maadiah # ls /boot

boot

grub

initramfs-genkernel-x86_64-2.6.38-gentoo-r6

kernel-genkernel-x86_64-2.6.38-gentoo-r6

kernel-new

kernel-stable

kernel-tuxonice

kernel-x86-3.00-r1

System.map-genkernel-x86_64-2.6.38-gentoo-r6

localhost maadiah # 

```

my grub.conf:

```
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook

# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2

# If you are not using Genkernel and you need help creating this file, you

# should consult the handbook. Alternatively, consult the grub.conf.sample that

# is included with the Grub documentation.

default 4

timeout 3

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

title Gentoo Linux 2.6.38-gentoo-r6

root (hd0,2)

kernel /boot/kernel-genkernel-x86_64-2.6.38-gentoo-r6  real_root=/dev/sda3

initrd /boot/initramfs-genkernel-x86_64-2.6.38-gentoo-r6

title linux-tuxonice

root(hd0,2)

kernel /boot/kernel-tuxonice

title linux-stable

root(hd0,2)

kernel /boot/kernel-stable real_root=/dev/sda3

title linux-newest

root(hd0,2)

kernel /boot/kernel-new

title Gentoo linux 3.00-r1

root (hd0,2)

kernel /boot/kernel-x86-3.00-r1

# vim:ft=conf:
```

----------

## Maadiah

```
Check your BIOS - be sure the SATA controller is in AHCI/Raid mode, not in IDE/Legacy mode.

```

i have try both,also the sam error

```
VFS: can not open root device "null" or unkown-block

Please append a correct "root" boot option, here are the available patitions:

sda driver:sd    sda1

      sda2

      sda3

Pid 1 ,comm: swapper not tainted

call trace:...

```

----------

## cach0rr0

your kernel appears to be fine, as your error message shows that indeed your kernel can see not only disks, but partitions

it says 'unknown device "null"' because indeed, you havent told it a root device.

for your grub entries that do not use an initramfs, you need "root=" and not "real_root="

real_root is a command-line parameter used by the initramfs, that tells the initramfs "hey, after youre doing working your magic, my real root is actually $foo, and not the root you have unpacked in memory, so switch to my real root once you're done". real_root is meaningless outside of an initramfs

root, on the other hand, is your root partition, which will be your actual root partition if you arent using an initramfs 

so all of these:

```

title linux-tuxonice 

root(hd0,2) 

kernel /boot/kernel-tuxonice 

title linux-stable 

root(hd0,2) 

kernel /boot/kernel-stable real_root=/dev/sda3 

title linux-newest 

root(hd0,2) 

kernel /boot/kernel-new 

title Gentoo linux 3.00-r1 

root (hd0,2) 

kernel /boot/kernel-x86-3.00-r1

```

should instead look like this:

```

title linux-tuxonice 

root(hd0,2) 

kernel /boot/kernel-tuxonice root=/dev/sda3

title linux-stable 

root(hd0,2) 

kernel /boot/kernel-stable root=/dev/sda3 

title linux-newest 

root(hd0,2) 

kernel /boot/kernel-new root=/dev/sda3

title Gentoo linux 3.00-r1 

root (hd0,2) 

kernel /boot/kernel-x86-3.00-r1 root=/dev/sda3

```

----------

## Maadiah

cach0rr0,

thanks!it works fine now.

but here is another problem:wlan does not work.

i think i have all the modules needed:

```
maadiah@localhost ~ $ lsmod

Module                  Size  Used by

ath9k                  83185  0 

mac80211              214759  1 ath9k

nouveau               704939  2 

ath9k_common            1650  1 ath9k

ath9k_hw              306347  2 ath9k,ath9k_common

ttm                    52024  1 nouveau

broadcom                7022  0 

tg3                   135039  0 

ath                    14227  2 ath9k,ath9k_hw

libphy                 15785  2 broadcom,tg3

cfg80211              154338  3 ath9k,mac80211,ath

acer_wmi               17947  0 

mxm_wmi                 1305  1 nouveau

wmi                     7962  2 acer_wmi,mxm_wmi

```

and wireless Network controller

```
03:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)
```

and 

```
maadiah@localhost ~ $ dmesg | grep ath9k

[   11.275103] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   11.275119] ath9k 0000:03:00.0: setting latency timer to 64

[   11.750063] ieee80211 phy0: Selected rate control algorithm 'ath9k_rate_control'

[   11.750609] Registered led device: ath9k-phy0

```

any sugestion will be apri

----------

## cach0rr0

```

emerge wpa_supplicant

man wpa_supplicant.conf

```

set up a wpa_supplicant.conf file, test your .conf via 

```

wpa_supplicant -Dnl80211 -i wlan0 -c /path/to/wpa_supplicant.conf

```

if it tells you youve associated and authenticated, you know the settings you have are correct

if not, post your wpa_supplicant.conf for suggestions (with any passwords obfuscated, obviously)

if it does work, leave it running, open a new terminal (or run wpa_supplicant in a screen session), and fire off "dhcpcd wlan0". it should "just work"

if these pieces all work, you can either set up /etc/conf.d/net (described in the handbook) or, emerge one of the various graphical wireless login managers out there (I personally use wicd)

ath9k requires no external firmware, so a simple "ifconfig wlan0 up" should bring the interface up, and the rest above will get on to the configuration side of things, rather than the hardware troubleshooting side of things

----------

## Maadiah

I got this:

```
maadiah@localhost ~ $ wpa_supplicant -Dnl80211 -i wlan -c /etc/wpa_supplicant.conf 

Unsupported driver 'nl80211'.

maadiah@localhost ~ $ wpa_supplicant -Dath9k -i wlan -c /etc/wpa_supplicant.conf 

Unsupported driver 'ath9k'.

```

----------

## NeddySeagoon

Maadiah,

Try 

```
wpa_supplicant -i wlan0 -Dwext -c /etc/wpa_supplicant.conf 
```

With an ath9k, that gives me 

```
ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.
```

but its better than your Unsupported driver 'ath9k'.

----------

## Maadiah

```
wpa_supplicant -i wlan0 -Dwext -c /etc/wpa_supplicant.conf 
```

Good! Wlan0 is up!

I'll do some job to work out how to use wpa_supplicant.conf well[/code]

----------

## cach0rr0

one FYI to point out

when wpa_supplicant talks about "driver", it's not literally talking about the kernel module you use, e.g. ath9k

it is talking about the wpa_supplicant backend

you will see this if you 'man wpa_supplicant'

```

SUPPORTED DRIVERS

       Host AP driver for Prism2/2.5/3 (development snapshot/v0.2.x)

              (http://hostap.epitest.fi/) Driver needs to be set in Managed mode (iwconfig wlan0 mode managed).  Please note that station firmware version needs to be 1.7.0 or newer to work in WPA mode.

       Linuxant DriverLoader

              (http://www.linuxant.com/driverloader/) with Windows NDIS driver for your wlan card supporting WPA.

       Agere Systems Inc. Linux Driver

              (http://www.agere.com/support/drivers/)  Please note that the driver interface file (driver_hermes.c) and hardware specific include files are not included in the wpa_supplicant distribution. You will

              need to copy these from the source package of the Agere driver.

       madwifi driver for cards based on Atheros chip set (ar521x)

              (http://sourceforge.net/projects/madwifi/) Please note that you will need to modify the wpa_supplicant .config file to use the correct path for the madwifi driver root directory (CFLAGS +=  -I../mad-

              wifi/wpa line in example defconfig).

       ATMEL AT76C5XXx driver for USB and PCMCIA cards

              (http://atmelwlandriver.sourceforge.net/).

       Linux ndiswrapper

              (http://ndiswrapper.sourceforge.net/) with Windows NDIS driver.

       Broadcom wl.o driver

              This is a generic Linux driver for Broadcom IEEE 802.11a/g cards.  However, it is proprietary driver that is not publicly available except for couple of exceptions, mainly Broadcom-based APs/wireless

              routers that use Linux. The driver binary can be downloaded, e.g., from Linksys support site (http://www.linksys.com/support/gpl.asp) for Linksys WRT54G. The GPL tarball includes  cross-compiler  and

              the  needed  header  file,  wlioctl.h,  for  compiling wpa_supplicant.  This driver support in wpa_supplicant is expected to work also with other devices based on Broadcom driver (assuming the driver

              includes client mode support).

        Intel ipw2100 driver

              (http://sourceforge.net/projects/ipw2100/)

       Intel ipw2200 driver

              (http://sourceforge.net/projects/ipw2200/)

       Linux wireless extensions

              In theory, any driver that supports Linux wireless extensions can be used with IEEE 802.1X (i.e., not WPA) when using ap_scan=0 option in configuration file.

       Wired Ethernet drivers

              Use ap_scan=0.

       BSD net80211 layer (e.g., Atheros driver)

              At the moment, this is for FreeBSD 6-CURRENT branch.

       Windows NDIS

              The current Windows port requires WinPcap (http://winpcap.polito.it/).  See README-Windows.txt for more information.

       wpa_supplicant was designed to be portable for different drivers and operating systems. Hopefully, support for more wlan cards and OSes will be added in the future. See developer.txt  for  more  information

       about  the  design of wpa_supplicant and porting to other drivers. One main goal is to add full WPA/WPA2 support to Linux wireless extensions to allow new drivers to be supported without having to implement

       new driver-specific interface code in wpa_supplicant.

```

-Dwext is the older one, but it should still work

-Dnl80211 should *not* be unknown, but ive had a few drinks tonight in preparation for the Rugby World Cup, so im not a great reliable source at the moment

----------

