# kernel 2.6.17-r4 unable to mount root fs during boot

## Crafack

Hi.

After emerging the new gentoo-sources (2.6.17-r4) i have run into some problems.

I get a kernel panic trying to boot the new kernel:

 *Quote:*   

> 
> 
> VFS: cannot open root device "sda3" or unknown-block(0,0)
> 
> Please append a correct "root=" boot option
> ...

 

I'm using the same .config as earlier kernels (make oldconfig). No hardware has been added/moved for a long time (unless you count lint/dust as hardware :-)

I've searched the forums (& newsgroups etc.) for a solution, and have checked & tried almost everything.

Can someone spot the error/omission/misspeling I have made, or has something new been added that mangles my drivenames ?

grub.conf:

 *Quote:*   

> timeout 5
> 
> default 0
> 
> title Gentoo 2.6.17-gentoo-r4
> ...

 

I boot from the first SATA device, sda

fdisk -l:

```
Disk /dev/hdb: 81.9 GB, 81964302336 bytes

255 heads, 63 sectors/track, 9964 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hdb3             250        6329    48837600   83  Linux

Disk /dev/sda: 200.0 GB, 200049647616 bytes

240 heads, 63 sectors/track, 25841 cylinders

Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1         266     2010928+  83  Linux

/dev/sda2             267         399     1005480   82  Linux swap / Solaris

/dev/sda3             400       25841   192341520   83  Linux

```

sda1 is /boot

sda3 is /

Both are ReiserFS.

lspci (partial):

 *Quote:*   

> 00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
> 
> 00:1f.2 IDE interface: Intel Corporation 82801FB/FW (ICH6/ICH6W) SATA Controller (rev 03)
> 
> 

 

kernelconfig (partial - full .config is available here)

 *Quote:*   

> CONFIG_SCSI=y
> 
> CONFIG_SCSI_SATA=y
> 
> CONFIG_SCSI_ATA_PIIX=y
> ...

 

Does anyone have any suggestions what may be wrong here?

Regards

----------

## Headrush

Can you post your /etc/fstab also please?

----------

## NeddySeagoon

Crafack,

Welcome to Gentoo.

```
unknown-block(0,0) 
```

means the kernel cannot communicate with the hard drive at all. Since you have a SCSI or SATA drive, You need 

```
SCSI disk support 

SCSI Low Level Driver -> (Your Hardware Driver)
```

Thats SATA -> PIIX for you.

Under Partition types you also need MSDOS Partition table support.

All these options must be [*] not [M], since modules cannot be loaded until the root partition is mounted.

Rebuild and reinstall your kernel.

Hmm ... I just spotted your kernel config - it looks good too. So ... are you actually running teh kernel that came from that config file ?

Check the tiimestamp on /mnt/gentoo/usr/linux/.config - thats your config time.

and on /mnt/gentoo/usr/linux/arc/i386/boot/bzImage thats the build time - it should be later than the config time

mount /boot

then look at the timestamp on /mnt/gentoo/boot/<your_kernel> that nust be no earlier than the bzImage above.

If you have several kernels, are you loading the right one ?

----------

## Crafack

Hi again.

Headrush: Here's the fstab:

```
# This file is edited by fstab-sync - see 'man fstab-sync' for details

# /etc/fstab: static file system information.

# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.18.4.1 2005/01/31 23:05:14 vapier Exp $

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to

# switch between notail / tail freely.

#

# See the manpage fstab(5) for more information.

# <fs>                  <mountpoint>    <type>          <opts>         <dump/pass>

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

/dev/sda1               /boot           reiserfs       noauto,noatime,notail   0 1

/dev/sda3               /               reiserfs        noatime         0 1

/dev/sda2               none            swap            sw              0 0

/dev/hdb3               /olddisk        reiserfs        noatime         0 1

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        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     0 0

/dev/hda                /media/cdrecorder       auto   user,exec,noauto,managed 0 0

```

NeddySeagoon:

Thanks for the welcome. I've been running Gentoo since kernel 2.4.something. Has worked like a charm :-)

This is my boot partition:

```
joakim@isengard ~$ cd /boot && ls -l

total 7735

-rw-r--r-- 1 root root  867530 Jul 10 17:16 System.map-2.6.16-gentoo-r12

-rw-r--r-- 1 root root  867983 Jul 18 19:59 System.map-2.6.16-gentoo-r13

-rw-r--r-- 1 root root  886816 Jul 30 16:30 System.map-2.6.17-gentoo-r4

lrwxrwxrwx 1 root root       1 Sep 27  2005 boot -> .

-rw-r--r-- 1 root root   34617 Jul 10 17:16 config-2.6.16-gentoo-r12

-rw-r--r-- 1 root root   34617 Jul 18 19:59 config-2.6.16-gentoo-r13

-rw-r--r-- 1 root root   34552 Jul 30 16:30 config-2.6.17-gentoo-r4

drwxr-xr-x 2 root root     728 Jul 30 16:35 grub

-rw-r--r-- 1 root root 1722814 Jul 10 17:16 kernel-2.6.16-gentoo-r12

-rw-r--r-- 1 root root 1722962 Jul 18 19:59 kernel-2.6.16-gentoo-r13

-rw-r--r-- 1 root root 1727539 Jul 30 16:30 kernel-2.6.17-gentoo-r4

joakim@isengard /boot $_

```

I'm pretty sure I boot the right kernel. The two other kernels on the partition boots without problems at all.

----------

## Headrush

Just a guess, but does removing gentoo=nodevfs from the grub command make any difference.

(You do have udev on your system?)

----------

## Crafack

Hi again.

sys-fs/udev-087-r1 is installed.

Removing "gentoo=nodevfs" from the commandline makes no difference. The kernel still panics.

----------

## ewaller

Hello,

I dislike "Me Too" posts, but I do want to chime in that Crafack is not alone.  I am experiencing this exact problem on my Toshiba M45.  I have been a Gentoo user for about a year and I upgrade kernels as they become available. I have never had this sort of problem before.

I've only spent about an hour on this.  I can't see how changing the kernel file would affect how Grub sees the world, so I wonder if the device naming of my SATA drives has changed or if there is a new config option that is breaking the Reiser FS.  The drives being identified as /dev/sda did cause me grief at the original install.

eww

----------

## NeddySeagoon

ewaller,

How did you obtain the configuration for your new kernel ?

Grub is not involved in your error. It does whats its told by loading the kernel and passing control to the kernel initialisation entry point.

Its a kernel problem ... see my post above.

----------

## ewaller

NeddySeagoon,

Thanks

 *Quote:*   

> Under Partition types you also need MSDOS Partition table support. 

 

I missed that one.  I don't have time to try it now, perhaps tonight.  

I generally configure my new kernel using "make oldconfig".  I sometimes copy an old configuration, run make, and answer the questoins.

The funny thing is, I don;t recall seeing MSDOS partition table support going by as a new option in my dialog with "make old config"

eww[/post]

----------

## NeddySeagoon

ewaller,

MSDOS Partition table support isn't new and is on by defualt.

Its actually quite difficult to turn off.

----------

## ewaller

NeddySeagoon,

I am responding from inside my fresh new 2.6.17-r4 kernel.  The problem was with the MSDOS partitions option being deselected.  You're right, it is well hidden and would require work to deselect.  I checked my previous kernel configuration and it had been configured.  I've no idea how it became deselected -- perhaps the loose nut behind the keyboard?

If it was not something I did, there may be something in the make file.  I imagine that would be out of scope here.  

Thank you for your help

eww

----------

## ewaller

NeddySeagoon,

By the way 56N 3W looks a little wet.  I wager you are just a little south. (Sorry for the OT post)

eww  :Very Happy: 

----------

## CraigMAllen

OK, so one follow on post deserves another.

     I'm having the same problem as above, but for a different reason (or so I think).  I'm compiling manually for the first time and it is driving me crazy!

     First, the error that I get is: *Quote:*   

> UDF-fs: No partition found (1)
> 
> No filesystem could mount root, tried reiserfs ext3 ext2 cramfs squashfs minix msdos vfat iso9660 ntfs romfs udf jfs
> 
> Kernel panic - not syncing: VFS: Unable to mount root fs on unkown-block(1,0)

 

The UDF-fs bit makes me think that its trying to boot from the CDROM, but that doesn't seem right.  Can anyone help?

My grub file says: *Quote:*   

> title Gentoo 2.6.17-r4
> 
> root (hd0,0)
> 
> kernel /CraigKernel20060801-2.6.17-gentoo-r4 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
> ...

 

My fstab is:

```
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

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

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

/dev/hda3               /               ext3            noatime         0 1

/dev/hda2               none            swap            sw              0 0

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0

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

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        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     0 0
```

In .config I currently have *Quote:*   

> #
> 
> # File systems
> 
> #
> ...

 

  Something isn't right.  Help would be greatly appreciated (3:35am, Hawaii)...

Craig

----------

## NeddySeagoon

CraigMAllen,

Well you have a better set of numbers in 

```
unkown-block(1,0)
```

Thats /dev/ram0, ehich is where your initrd would be, if you had one.

Your kernel line 

```
kernel /CraigKernel20060801-2.6.17-gentoo-r4 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev 
```

says root=/dev/ram0 but you no longer load an initrd, so that expalins why is not being mounted.

Cut your kernel line to 

```
kernel /CraigKernel20060801-2.6.17-gentoo-r4 root=/dev/hda3 
```

udev is no longer required, since you can't choose devfs any more and the other options were all initrd related, so are no longer needed.

----------

## CraigMAllen

NeddySeagoon,

That did it.  I guess I didn't understand all that initrd was doing.

Thanks tons.

-Craig

----------

## Crafack

Hi again.

I just wanted to post an update (and 1 (one (0x01)) additional question):

Is there any (easy) way to capture the kernel output when test-booting a kernel ?

The last few days I've been verifying that I am loading the correct kernel (I am), and basically being prying around in the .config to see if I could stumble upon a fix..

I've now disabled most non-essential drivers in the kernel, and found something interesting:

This was earlier scrolled off-screen by USB stuff:

 *Quote:*   

> ICH6: IDE controller at IDE slot 0000:00:1f.1
> 
> ICH6: chipset revision 3
> 
> ICH6: not 100% native mode will probe IRQs later
> ...

 

It seems that libata can't find/talk to my disks :-(

That explains the "unknown-device(0,0)" message *sigh*

----------

## wynn

Sorry this is so delayed, I stumbled across it while searching for VFS errors   :Smile: 

If you have another machine running Linux with an ethernet connection to the machine running the test kernel, you can enable netconsole in the test kernel and then boot with

```
linux netconsole=4444@10.0.0.1/eth1
```

(for example) and use netcat to gather the output from port 4444 on 10.0.0.1.

This copied from /usr/src/linux/Documentation/networking/netconsole.txt

To enable netconsole (in 2.6.17-gentoo-r5)

```
   Device Drivers  --->

   Network device support  --->

<*> Network console logging support (EXPERIMENTAL)
```

----------

## larand54

 *wynn wrote:*   

> boot with
> 
> ```
> linux netconsole=4444@10.0.0.1/eth1
> ```
> ...

 

Where do I put this command? I am running GRUB.

----------

## wynn

[Edit] I made several mistakes and I haven't been able to get it working myself   :Sad:  Here are the corrected instructions, however: you may have more luck.

If you have "hiddenmenu" in your grub.conf, you will need to press "any key" to get the menu.

In the menu, the default kernel will be highlighted: press "a" to append an argument to the kernel command line.

If you want to capture the output on 192.168.1.36 (for example), add

```
netconsole=@/,@192.168.1.36/
```

to the command line (with a space separating it from the preceding argument, of course).

This will send UDP packets through eth0 on the booting machine using the given interface address and port 6665 to port 6666 on 192.168.1.36.

This machine, 192.168.1.36, should be running

```
nc -u -l -p 6666
```

Since I haven't been able to get it working, these instructions may be useless   :Sad: 

----------

## wynn

I always wanted to try out netconsole   :Very Happy: 

With 20/20 hindsight, the big mistake was having the ethernet drivers as modules not builtin. Recompiled the kernel with the drivers builtin.

The logging machine is 192.168.1.37 and its (sole) ethernet card has the MAC address 00:50:8D:ED:9F:96.

```
nc -u -l -p 6666
```

 is set running on the logging machine.

The booting machine is started, as above, the argument

```
netconsole=6665@192.168.1.36/eth0,6666@192.168.1.37/00:50:8D:ED:9F:96
```

is appended to the kernel command line and bingo! logging.

A different way of using netconsole can be found at http://ndiswrapper.sourceforge.net/mediawiki/index.php/Bugs

Small note: the booting machine has two ethernet interfaces, one on board, via-velocity, and a card, 3c59x: with the drivers builtin the card is set to be eth0 and the on board one set to eth1. eth1 was connected to the 192.168.1.0 subnet: changing the netconsole argument from /eth0 to /eth1 didn't work. The command line given above works.

----------

