# Kernel Panic : Unable to mount root FS on [SOLVED]

## zurd

Using kernel 2.4 : FINE

Using kernel 2.6.7 : Bad

Using kernel 2.6.8 : Bad

Fine = I can boot with it and do whatever I want

Bad = I cannot boot with it , I got a Kernel Panic : Unable to mount root fs on /dev/hdb2 342 and something about unknown block device (3,66)

Using lilo. emerge sync and emerge world done before.

Summary : hda1=boot, hda2=win2k, hdb1=swap and hdb2=root

Here's the log, on my 2.4 kernel that boots just fine :

Here is my fdisk -l

Disk /dev/ide/host0/bus0/target0/lun0/disc: 30.7 GB, 30735581184 bytes

255 heads, 63 sectors/track, 3736 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

                                Device Boot      Start         End      Blocks   Id  System

/dev/ide/host0/bus0/target0/lun0/part1   *           1           5       40131   83  Linux

/dev/ide/host0/bus0/target0/lun0/part2               6        3736    29969257+   b  W95 FAT32

Disk /dev/ide/host0/bus0/target1/lun0/disc: 122.9 GB, 122942324736 bytes

255 heads, 63 sectors/track, 14946 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

                                Device Boot      Start         End      Blocks   Id  System

/dev/ide/host0/bus0/target1/lun0/part1               1         125     1004031   82  Linux swap

/dev/ide/host0/bus0/target1/lun0/part2             126       14946   119049682+  83  Linux

Here is my mount while I am on 2.4 :

/dev/hdb2 on / type reiserfs (rw,noatime)

none on /dev type devfs (rw)    

none on /proc type proc (rw)    

none on /dev/shm type tmpfs (rw)

/dev/hda1 on /boot type ext2 (rw,noatime)

Here is my fstab :

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

/dev/hdb2               /               reiserfs        noatime                 0 0

/dev/hdb1               none            swap            sw                      0 0

And here is some options in my kernel .config file :

cat .config | grep BLK_DEV_IDE

CONFIG_BLK_DEV_IDE=y

# CONFIG_BLK_DEV_IDE_SATA is not set

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

# CONFIG_BLK_DEV_IDEFLOPPY is not set

# CONFIG_BLK_DEV_IDESCSI is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_BLK_DEV_IDEDMA=y

(BTW, I have NO SCSI, nor no SATA drive, just plain IDE HD and CDROM, it's all simple stuff).

And BTW, the 2.6 kernel was working fine before I format everything, now it just won't boot.  The only thing I change is my partition.  But why would 2.4 boots and not a 2.6 ?

I'm gonna try GRUB instead in the next days... but I'm almost out of options right now, please help !Last edited by zurd on Sat Oct 02, 2004 9:31 pm; edited 1 time in total

----------

## TheCarNinja

So the kernels are the same? Because if they're not i was going to recommend you make sure you have all the right kernel options....

----------

## zurd

Kernel are not the same, 2.4=FINE and 2.6.7 or 2.6.8 do not want to boot.

And of course the .config is not the same for each kernel, I am not copying pasting it in the the other kernel directory.

I even tried the old .config I got from 2.6.x that was working and no luck with it now.

I just tried with Grub instead of LILO and *same* error.

Even tough I used the hdb=stroke option because my mobo doesn't see my 120 gigs (the limit of my mobo is 32 gigs for an HD). 

Because the only thing that changed is my new HD now in 120 gigs instead of 32 gigs and the fact that the boot partition is not on the same partition as the root one.

Gonna try with the caps limit jumper and boot with 2.6... updater later

[EDIT]

Just tried with the caps limit jumper, that was stupid, didn't want to boot and of course because I kind of remove 90 gigs out of 120 for my 32 GIGS limit on my motherboard... I should format it all with the caps limit jumper of 32 gigs and re-install it all... but 2.4 kernel boots fine....

----------

## Evil Dark Archon

what ide controller do you have because in that .config i saw no mention of what ide controller was being compiled in, if any, and make sure that you don't compile it as a module unless you plan on making an initrd.

----------

## Firewalker

Make sure you have enabled the file system drivers inside your kernel (happened several times to me  :Very Happy:  )

Cheers

Firewalker

----------

## thecrazyperson_ws

the way I had my machine set up when I got a similar error made the 120 gig hard disc show up as /dev/hde... then again, I have a standalone controller, and I had written /boot/grub/grub.conf to look at /dev/hda  :Embarassed:  .... Anyway, the drives were set up as follows:

/dev/hda1: winxp pro (4gb ntfs)

/dev/hdb1: sds (dynamic disk - spanned volume) (6gb)

/dev/hdc1: sds (dynamic disk - spanned volume) (8gb)

/dev/hde1: /boot (100mb ext2)  (Gentoo Linux 2004.1, kernel 2.6.7-gentoo-r8 )

/dev/hde2: swap (768mb)

/dev/hde3: / (6 gb ext3)

/dev/hde5: /home (105gb ext3) (<-- this sounds weird to make the biggest partition "unreadable" to windows, but I had the ext3 drivers for winxp)

like you, my mobo has the cap limit of 32gb for hard disks on it's builtin controller (Intel 440bx based mobo), so I had to get a controller card (SIIG CMD-649 based card) to let the 120gigger work.

Anyway, my point is... try getting a controller card.  It might actually solve all of your problems.

----------

## infirit

There are a few things you need to check:

1) Make sure the ide chipset is builtin or if you have it as a module you must jave generic ide support.

2) make sure you have compiled in support for the filesystem your root fs

3) Also if you have a separate raid/ide controller enable the reverse scanning option and try passing ide=reverse to the kernel. (it might be that your separate raid/ide controller is scanned first, this wil screw up the hdx naming)

4) Mkae sure that, if you have a separate boot partition, it is mounted when installing a new kernel. 

5) Don not forget to run lilo after installing a new kernel!

In grub you have the option to change the boot parameters by pressing e on the boot menu, try changing the x in root=/dev/hdx2 to d  and see what happens.

----------

## zurd

Here's my system Versus my kernel :

1)

dmesg

PIIX4: IDE controller at PCI slot 00:07.1

PIIX4: chipset revision 1

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

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:pio, hdb:pio

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio

hda: Maxtor 53073U6, ATA DISK drive

hdb: Maxtor 6Y120L0, ATA DISK drive   

****** "grep PII .config" shows "CONFIG_BLK_DEV_PIIX=y"

2)                              

In my .config, I got these compile as Yes, meaning I have all FS that I am using compiled :

Second extended fs support      

Ext3 journalling file system support

Reiserfs support                

Stats in /proc/fs/reiserfs      

Kernel automounter version 4 support (also supports v3)

3)                              

grep .config 440                

agpgart: Detected Intel 440BX chipset

*****  And I have "Intel 440LX/BX/GX" compiled as Yes

thecrazyperson_ws : My mobo has a cap limit of 32G, but I used the maxblast3.exe software to install DDO on the hard disk, windows see it fine and kernel 2.4 see it fine also, just not 2.6  :Smile: 

- I do not have any RAID/IDE controller, nothing SCSI also.  Just plain IDE.

- Yes I do mount /boot before typing lilo and before copying my new kernel to it.   But now I am using GRUB.

- I tried booting in GRUB and using the (e)dit option to change hdb2 to something else and to no avail, anyway I do see hdb booting as me second HD before the kernel panic, so the kernel do see it.

Again I am out of option, anything you can think of I'll try it !

----------

## dsd

its most likely to be the maxblast software screwing things up. i'm not sure here, but i thought that you didnt need this sort of thing to run linux? linux ignores bios settings for disks and just does its own probing. i also seem to remember seeing a specific kernel option designed to get around old bioses which can't see large disks.

the other possibility is that 2.6 has swapped your ide channels around, so you might want to try hdd2.

 *zurd wrote:*   

> anyway I do see hdb booting as me second HD before the kernel panic, so the kernel do see it.

 

perhaps you could be more specific here

----------

## zurd

I don't think the maxblast software screw things up.  Because I can  boot with the 2.4 kernel just fine and I can see my HD as 120 gigs and not the 32 gigs limit of my motherboard.

Yes, there is an option for GRUB to see large HD that the mobo can't see :

From gentoo.org/docs :

"If you're using a 2.6.7 or higher kernel and you jumpered your harddrive because the BIOS can't handle large harddrives you'll need to append hdx=stroke"

And yes I do have hdb=stroke in GRUB.

And yes I did try hdd2 or hde2 or hda2 or hdc2, no luck.

Then thing is that when my 2.6 kernel boots, I can see the same message as the 2.4 kernel.  Which means, that it do see hda as my first IDE HD and hdb as my second IDE HD, so hdb2 should be the good one to use and not hdd2 or something like that.

----------

## FallenAngel

Just an idea : did you compile devfs into the kernel and also "mount /dev on boot" ?

----------

## zurd

Solved! wewt wewt!

Here's the dmesg from 2.4 that boots fine :

/dev/ide/host0/bus0/target0/lun0: p1 p2

/dev/ide/host0/bus0/target1/lun0: [EZD] [remap 0->1] [14946/255/63] p1 p2

And when I was booting with 2.6 :

/dev/ide/host0/bus0/target0/lun0: p1 p2

Clearly, target1/lun0 which is my hdb wasn't remap, I googled for EZD remap, and poof first link :

http://www.linuxquestions.org/questions/showthread.php?s=&postid=1147695#post1147695

So I added hdb=remap in grub.conf, rebooted and it's working.

2.4 auto-remap drive, 2.6 doesn't ! 

Thanks all for your advice.

----------

