# unable to mount root fs on unknown-block [SOLVED]

## mw007

Hello all,

I just finished installing a fresh copy of gentoo onto an old machine that I'd like to turn into a webserver. Everything went fine, until I rebooted the machine. Here is the error I received:

```
md: Scanned 0 and added 0 devices.

md: autorun ...

md: ... autorun DONE.

Root-NFS: No NFS server available, giving up.

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

VFS: Cannot open root device "hda3" or unknown-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 unknown-block(2,0)

```

I don't believe I configured my kernel mount any NFS partitions (unless it's hidden somewhere in the kernel config). I also know for a fact that /dev/hda3 is the correct device name for my root partition, and I have it listen in my grub.conf (listed below). 

Here is all the relevant information I can think of that might help someone help me. All my efforts to find a solution (I even tried the install a second time) have been in vain.

/etc/fstab

```
/dev/hda1               /boot           ext2            noauto,noatime  1 2

/dev/hda3               /               ext3            noatime         0 1

/dev/hda2               none            swap            sw              0 0

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

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

```

grub.conf

```
default 0

timeout 10

title Gentoo

root (hd0,0)

kernel /boot/kernel-2.6.27 root=/dev/hda3

```

lspci -nn

```
00:00.0 Host bridge [0600]: Silicon Integrated Systems [SiS] 630 Host [1039:0630] (rev 21)

00:00.1 IDE interface [0101]: Silicon Integrated Systems [SiS] 5513 [IDE] [1039:5513] (rev d0)

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

00:01.1 Ethernet controller [0200]: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet [1039:0900] (rev 83)

00:01.2 USB Controller [0c03]: Silicon Integrated Systems [SiS] USB 1.1 Controller [1039:7001] (rev 07)

00:01.3 USB Controller [0c03]: Silicon Integrated Systems [SiS] USB 1.1 Controller [1039:7001] (rev 07)

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

00:02.0 PCI bridge [0604]: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP) [1039:0001]

00:09.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8029(AS) [10ec:8029]

00:0b.0 Multimedia video controller [0400]: Brooktree Corporation Bt878 Video Capture [109e:036e] (rev 02)

00:0b.1 Multimedia controller [0480]: Brooktree Corporation Bt878 Audio Capture [109e:0878] (rev 02)

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

```

Here is a pastebin of my kernel config http://pastebin.com/f426d094c. I believe I have enabled all of my hardware listed by lspci. I am going through and double-checking on that now.

Any help or nudge in the right direction is greatly appreciated.

mw007Last edited by mw007 on Sat Jan 17, 2009 6:49 am; edited 1 time in total

----------

## pappy_mcfae

Please post the results of lspci -n  and cat /proc/cpuinfo as well.

Blessed be!

Pappy

----------

## mw007

Is there a good resource out there (going through the lspci man page now) that would tell me what these numbers mean?

lspci -n

```
00:00.0 0600: 1039:0630 (rev 21)

00:00.1 0101: 1039:5513 (rev d0)

00:01.0 0601: 1039:0018

00:01.1 0200: 1039:0900 (rev 83)

00:01.2 0c03: 1039:7001 (rev 07)

00:01.3 0c03: 1039:7001 (rev 07)

00:01.4 0401: 1039:7018 (rev 02)

00:02.0 0604: 1039:0001

00:09.0 0200: 10ec:8029

00:0b.0 0400: 109e:036e (rev 02)

00:0b.1 0480: 109e:0878 (rev 02)

01:00.0 0300: 1039:6300 (rev 21)
```

cat /proc/cpuinfo

```
processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 8

model name      : Pentium III (Coppermine)

stepping        : 3

cpu MHz         : 367.503

cache size      : 256 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 2

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse up

bogomips        : 735.82

clflush size    : 32
```

----------

## mw007

Pappy,

Read your kernel seed site and just tried the Debian Device Driver Check. Pretty awesome stuff. Let me see if I can get things working now  :Smile: 

----------

## pappy_mcfae

Thanks. That Debian site is the most valuable site I know. Once I found it, working with kernels went from a PITA to a very positive experience. It saved me from hours of researching which arcane driver goes with which arcane device.

As for what you come up with, I offer the .config I whipped up for you as a reference. I used your .config, as it was, for the most part, good.

Click here for that .config.

Now, to get things working with this .config, you need to change all occurrences of hd(x) to sd(x). Since you use grub, this is a fairly easy thing to do. All you really need to do is change /etc/fstab thusly:

```
/dev/hda1               /boot           ext2            noauto,noatime  1 2

/dev/hda3               /               ext3            noatime         0 1

/dev/hda2               none            swap            sw              0 0

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

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

```

 to

```
/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

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

```

Assuming that the libata drivers I selected are correct, which they should be, this should get you going. You'll also want to change grub.conf as well from:

```
default 0

timeout 10

title Gentoo

root (hd0,0)

kernel /boot/kernel-2.6.27 root=/dev/hda3 
```

to

```
default 0

timeout 10

title Gentoo

root (hd0,0)

kernel /boot/kernel-2.6.27 root=/dev/sda3 
```

Assuming that SiS machines follow the rules of other computers, this should get you up and running. If you choose to not use the libata drivers, then turn them off completely. Using libata (SATA) drivers and ATA,ATAPI,MFM,RLL drivers will cause conflicts.

Blessed be!

Pappy

----------

## mw007

Pappy,

Well after trying to get things working using the Debian Device Driver site, I was still unsuccessful. I'm currently trying your .config file and seeing if that will boot   :Very Happy: 

I'll let you know how things go in a little while. It takes this machine approx 20 minutes to compile a kernel.

----------

## pappy_mcfae

I have my fingers crossed for you. As long as you change the grub.conf and /etc/fstab to reflect the libata drivers, you should be fine.

Blessed be!

Pappy

----------

## mw007

Pappy, you rock!

Major kudos man, I really appreciate the help. I'm not exactly sure what changes you made to the kernel (I'm reading through a diff of yours and my old one), but it worked like a charm!

Thank you so much!

----------

## pappy_mcfae

I'm glad I could help! I love happy Gentoo-ers! 

Blessed be!

Pappy

----------

## jaydoc

Hi...

I am a newbie trying to install gentoo on an old system. This is my 3rd gentoo install in 4 weeks...! I am converting an old windows box I had to Gentoo now, but I have tried compiling a kernel twice with no success.

Every time I get the same message as the OP, which is: kernel panic, unable to mount root fs on unknown block .... I googled around and found that this could be due to improper kernel configuration for file system support as modules.But I never tinkered with the filesystem part of the kernel. So I don't know how to solve this. 

That is when I came across your kernel seed site - I would like to know, as a newbie, what should I do when I have downloaded the kernel config file...? I have been to the debian site and got the output for lspci -n modules and do know what are the drivers that are necessary.

I would like to know what exactly I should do, to make a kernel using the config file I d/led from your site.

Thanks.

----------

## pappy_mcfae

Once you send the info to the site, open the kernel .config using make menuconfig, make xconfig, or make gconfig, depending on your peferences. Add JUST the drivers you find at the site. Sometimes, you may find two drivers listed. that generally means either is usable.

When choosing a hard disk driver, choose the SATA, also known as libata drivers. They work better. In most cases, networking hardware works best when its drivers are in module form. Wireless drivers must be set up as modules, or they won't operate the adapter. File system and hard disk drivers MUST BE COMPILED INTO THE KERNEL! If you use them as modules, you MUST create initrd, which, IMHO is a cluster-hack. If you don't know what initrd is, good.

If you have any other questions, don't hesitate to ask.

Blessed be!

Pappy

----------

