# Unable to mount root fs on unknown-block

## lowtraxx

Hi,

since Kernel 2.6.17 i have two strange Problems the first is, the kernel hangs a few seconds at

```

TCP reno registered

```

before booting into the framebuffer

The stranger thing is with my 2.6.16 grub configuration i get:

```

VFS: Cannot open root device "004" or unknown-block(0,4)

Please append a correct "root=" boot option

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,4)

```

My root is /dev/sda5 but it doesnt work if i append root=/dev/sda5 nor root=004 nor root=105 . I have a sata Harddisk and no ide support in the kernel, but that cannot be the problem, because 2.6.16 boots.

Thanks for the Help

Oli

----------

## wynn

It may be worthwhile comparing your 2.6.17 kernel configuration with the SATA section in [FAQ] KC13: I just installed a new kernel and it won't boot.

----------

## lowtraxx

Sorry, i forgot to mention, i did that already. 

In my grub.conf it looked like this till 2.6.16 by 2.6.17 it stopped working:

```

title=Gentoo Kernel 2.6.16

root(hd0,1)

kernel (hd0,1)/kernel-2.6.16 resume=/dev/sda6 libata.atapi_enabled=1

```

This stopped working with the release of 2.6.17. I made make oldconfig and i made the settings new from scratch, but both didn't work.

Thanks

Oli

----------

## cokey

post your grub.conf and an ls /boot please

----------

## lowtraxx

Here you go:

grub.conf:

```

default 0

timeout 7

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

title=Gentoo Kernel 2.6.16 

root(hd0,1) 

kernel (hd0,1)/kernel-2.6.16 resume=/dev/sda6 libata.atapi_enabled=1 

```

ls /boot

```

TSMobile boot # ls

boot   grub   grub.conf   kernel-2.6.16   kernel-2.6.17   kernel-2.6.18

TSMobile boot #

```

My /boot is /dev/sda2

If i change my grub.conf to

```

default 0

timeout 7

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

title=Gentoo Kernel 2.6.16

root(hd0,1) 

kernel (hd0,1)/kernel-2.6.16 resume=/dev/sda6 libata.atapi_enabled=1 

title=Gentoo Kernel 2.6.18 

root(hd0,1) 

kernel (hd0,1)/kernel-2.6.18 resume=/dev/sda6 libata.atapi_enabled=1 

```

and boot into 2.6.18 i get this:

```

VFS: Cannot open root device "<NULL>" or unknown-block(8,5) 

Please append a correct "root=" boot option 

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,5) 

```

If i choose 2.6.16 it works flawlessly

Oli

----------

## cokey

is there a reason why you have resume=/dev/sda6 instead of root=/dev/sda6

Also, just to be safe, try replacing the 6 with an 8 in the entry which works

----------

## Thnikkaman

Try this to see if your kernel works.  (I was recently having some problems with this myself.)

Try hitting 'c' when you load grub to go to the console.  Then type:

```

grub> kernel /boot/kernel-2.6.18 root=/dev/sda6

grub> boot

```

If grub finds the kernel (and it should), it will display some hex or something after the first line.  The second will just boot that kernel.  If the kernel loads, try getting rid of the libata.atapi_enabled=1 kernel parameter.

----------

## lowtraxx

Hi,

the resume has nothing to do with it, it tells swsusp from which partition to resume. the libata.atapi i need, because my dvd is a sata drive and the kernel doesnt find it if i dont give that option. it finds the kernel and it boots it, but it cant for a reason i dont understand not find my /dev/sda5 partition.

Oli

----------

## cokey

 *lowtraxx wrote:*   

> Hi,
> 
> the resume has nothing to do with it, it tells swsusp from which partition to resume. the libata.atapi i need, because my dvd is a sata drive and the kernel doesnt find it if i dont give that option. it finds the kernel and it boots it, but it cant for a reason i dont understand not find my /dev/sda5 partition.
> 
> Oli

 do you mean sda6

----------

## lowtraxx

No, i mean sda5. Up to kernel 2.6.16 i didnt need the root= option, it works. But from 2.6.17 upwards i have to supply the root= parameter, but the kernel doesnt accept any... i tried 004 105 /dev/sda5 /dev/hda5 and many others, but i think he cant for some reason find my sata harddisk. Maybe its a bug... Because grub finds my /dev/sda5 when i try to 

```

find (hd0,4)/etc/fstab

```

Oli

----------

## lowtraxx

*bump*

Sorry

----------

## Thnikkaman

I am familiar with the resume option.  I was just trying to exaust every troubleshooting step I knew.

----------

## NeddySeagoon

lowtraxx,

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

is /dev/ram3. Thats a new set of numbers in the error message to me.

Looking at your grub.conf

```
default 0

timeout 7

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

title=Gentoo Kernel 2.6.16

root(hd0,1)

kernel (hd0,1)/kernel-2.6.16 resume=/dev/sda6 libata.atapi_enabled=1 
```

how does the kernel know what to use for root when there is nothing to resume ?

I assume that /dev/sda6 is your swap partiton ?

Can you remove the resume=/dev/sda6 and add in a root=/dev/...   to whatever your root partition is.

That will break resume - but its a useful test.

What is the full name of the kernel you are trying to use?

----------

## lowtraxx

Hi,

i tried removing the resume option. Even when i only give

```

kernel (hd0,1)/kernel-2.6.16 root=/dev/sda5

```

i get the same message, with different numbers

greets

Oli

----------

## defmornahan

I'm getting the same problem on an IDE drive.  I have /boot as /dev/hda1 and / as /dev/hda4.  So my grub option looks like:

```
root (hd0,0)

kernel /boot/kernel-2.6.17-gentoo-r8 root=/dev/hda4
```

I installed grub with the command

```
grub-install --root-directory=/boot /dev/hda
```

which, if it matters, spat out the message

```
floppy0:  no floppy controller found
```

about 12 times and then informed me that everything was fine.  I don't remember the exact lines of output, but I had one line for fd0 and one line for some hd device.  I guess it's not finding all my partitions, even though I cp'd over /proc/mounts to /etc/mtab.

Then, when I reboot, I get the same error as lowtraxx.

Another thing which may or may not be interesting:  if I enter e and try to edit line 2 of my grub.conf option, then for the heck of it delete a few characters off the end of /dev/hda4 and try to use TAB completion, GRUB spits out

Error 11: Unrecognized device string

I'm trying to finish installing to an old Aptiva E3U with a new Maxtor 120 GB hard drive.  Wonkily, the floppy drive is in fact there, but I note that lspci doesn't detect it.

I guess that's a nest of problems but lowtraxx' is one of them!

----------

## troymc

```

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,5) 

```

block(8,5) is /dev/sda5, so it's looking at the correct device, but doesn't understand what it finds there. [The kernel itself is hard-coded with the root device active at the time it was built. check using rdev.]

Make sure your new kernel has the correct filesystems (ext3, reiserfs) built in, as well as the correct partition tables (msdos?)

troymc

----------

## NeddySeagoon

troymc,

The kernel tries to mount whatever its told in the root= (or real_root=) statement as the root of the filesystem tree.

Its not hard coded into the kernel.

Your filesystem diagnosis is correct. It needs to be build in [*], not modular [M] too

----------

## troymc

 *NeddySeagoon wrote:*   

> troymc,
> 
> The kernel tries to mount whatever its told in the root= (or real_root=) statement as the root of the filesystem tree.
> 
> Its not hard coded into the kernel.
> ...

 

You are partly correct. It will use the device you specify via the command line, but if you DON'T specify it, it defaults to the hardcoded value. You can view & change this hardcoded value with the rdev command.

```

# cd /boot

# rdev vmlinuz

Root device /dev/md4

```

When you build a kernel, the current root device is hardcoded as the default root device.  Most people ignore it & specify it explicitly via the kernel parameter. rdev can set other defaults too. (ie video mode, memory size, etc)

troymc

----------

## defmornahan

I checked my kernel configuration and I have ext2 and reiserfs support enabled already.  I partitioned the disk with cfdisk, and I notice that PC partitions are enabled by default as well.

The lines from grub-install were

```
(hd0) /dev/hda

(fd0) /dev/fd0
```

Duh.

I tried emerge reiserfsprogs, as I'd forgotten to do it earlier, but that doesn't help.

My exact error message is

```
VFS: Cannot open root device "hda4" or unknown-block(0,0)

Please append a correct "root=" boot option

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)
```

Should I be doing

```
root (hd0,3)

kernel /boot/kernel-2.6.17-gentoo-r8 root=/dev/hda1
```

instead?

----------

## troymc

defmornahan: Your issue is different from lowtraxx's.

 *defmornahan wrote:*   

> 
> 
> My exact error message is
> 
> ```
> ...

 

Your message shows that your kernel cannot find a valid hardware device called hda4.

This is generally due to not having the correct IDE drivers built in to your kernel. If you are unsure of which driver to build in, boot off of a CD and check the dmesg output to see which driver claims the disks. lsmod may also help.

troymc

----------

## NeddySeagoon

troymc,

Ah yes ... sorry about that. Its many years since I used 

```
rdev
```

My apologies.

----------

## defmornahan

 *troymc wrote:*   

> defmornahan: Your issue is different from lowtraxx's.
> 
>  *defmornahan wrote:*   
> 
> My exact error message is
> ...

 

I don't see anything in either batch of output that I recognize as not being in the kernel.  The driver that seems to be responsible is "ide".  I certainly have IDE support compiled into the kernel; I left the defaults enabled for the ATA/ATAPI etc. menu under "make menuconfig".

I am having trouble with IRQ 14 when I boot off the CD:

```
irq 14: nobody cared
```

and thus I have been using the "irqpoll" option to get it to boot.  I don't know if that's relevant.  /usr/src/linux/Documentation/ide.txt tells me that's one of the channels IDE uses.

Here are what appear to me to be the relevant stretches of dmesg:

```
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ALI15X3: IDE controller at PCI slot 0000:00:0f.0

ACPI: PCI Interrupt 0000:00:0f.0[A]: no GSI - using IRQ 14

PCI: setting IRQ 14 as level-triggered

ALI15X3: chipset revision 32

ALI15X3: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0x7400-0x7407, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0x7408-0x740f, BIOS settings: hdc:DMA, hdd:DMA

Probing IDE interface ide0...

hda: Maxtor 6Y120L0, ATA DISK drive

irq 14: nobody cared (try booting with the "irqpoll" option)

 <c012c34f>   <c012c513> 

 <c012bedc>   <c010505f> 

 <c010371a>   <c011a3fb> 

 <c011a49c>   <c0105064> 

 <c010371a>   <c0340352> 

 <c012c185>   <c02c7b78> 

 <c012c251>   <c02cb036> 

 <c02c7b78>   <c024991f> 

 <c02cb3e6>   <c02cb6e8> 

 <c02cd977>   <c03f23c9> 

 <c03f240f>   <c03f172f> 

 <c0100400>   <c01026a6> 

 <c01002fc>   <c01002fc> 

 <c0100bf5>  

handlers:

[<c02c7b78>]

Disabling IRQ #14

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
```

```
hda: max request size: 128KiB

hda: 240121728 sectors (122942 MB) w/2048KiB Cache, CHS=65535/16/63, (U)DMA

hda: cache flushes supported

 hda: hda1 hda2 hda3 < hda5 hda6 > hda4
```

----------

