[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help: VFS: cann't open root device "hda2" or unknown-block(0,0)



Thanks first! Please read below:
> VFS: cann't open root device "hda2" 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)
> -----------------------------------------
> the reason I wan to recompile the kernel is that I need to write a device
> driver for an IO card. Today I
> 1. download kernel source 2.6.10 from kernel.org
> 2. reconfig the kernel, disable module versioning, and enable most of
> kernel-hacking options.
> 3. use the following command to recompile and install the new kernel:
> # make-kpkg clean
> # make-kpkg --append-to-version=.0901 kernel-image

Where did you get the starting config from?

to schrink the problem now I use kernel-source-2.4.27 (through apt-get install kernel-source-2.4.27), then I do /usr/src/linux # cp /boot/config-2.4.27-2-386 ./.config //copy my running config /usr/src/linux make oldconfig //made no change here then I compile and install the kernel, but now I got the similar error message when booting: VFS : cann't open root device 'hda2' or 03:02;
kernel panic : unable to mount root fs on 03:02

is there something wrong with my compilation:
# apt-get install kernel-source-2.4.27
# cd /usr/src
# tar -jxf kernel-source-2.4.27.tar.bz2
# ln -s kernel-source-2.4.27 linux
# cd linux
# cp /boot/config-2.4.27-2-386 ./.config
# make oldconfig              //nothing is suggested to confirm here
# make-kpkg clean
# make-kpkg --append-to-version=.0901 kernel-image
# cd ..
# dkpg -i kernel-image-2.4.27.0901_10.00.Custom_i386.deb
# reboot

is there something wrong with this sequence or ...?

Starting with the debian kernel source and the config from
/boot/config-.... might be a safer way to ensure you included all the
required options.

> # cd /usr/src
> # dkpg -i kernel-image-2.6.10.0901_10.00.Custom_i386.deb
> 4. after installation the menu.lst reads as following: ( kernel 2.6 boot
> with the above error message and kernel2.4 can boot successfully.)
> ===============
> title Debian GNU/Linux, kernel 2.6.10.0901
> root (hd0,1)
> kernel /boot/vmlinuz-2.6.10.0901 root=/dev/hda2 ro
> savedefault
> boot
>
> title Debian GNU/Linux, kernel 2.4.27-2-386
> root (hd0,1)
> kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hda2 ro
> initrd /boot/initrd.img-2.4.27-2-386
> savedefault
> boot
> ==================
>
> PS: 1. maybe something wrong with my kernel configuration and can anybody
> provide some material for this.
> 2. I use ext2 file system.

Also note that if you have sata disks, they show up as scsi in 2.6 while
they tend to be ide in 2.4.  So your disk would move form hda to sda if
using sata.

You could also just have forgotten your driver for the ide controller.

Len Sorensen




Reply to: