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

Re: kernel panic



Marvin Gerardo Aguero Salazar wrote:
I am trying to install the kernel 2.6.6, so I downloaded it, compiled it
and installed it, but, when I boot I get a whole bunch of errors.

How did you build it (make or make-kpkg)? Did you use an initrd? Are you on stable/testing/unstable?

Unfortunately I haven't been able to grab all the messages it displays
while booting, but the last ones I see on the screen show the following:

modprobe: Can't open dependencies file /lib/modules/2.6.6/modules.dep
(No such file or directory)

-> This is strange for the file does exist. I have checked the
permissions and it has the same permissions for the current kernel (2.4).

mount: /dev2/root2 is not a valid block device

-> This message is displayed 8 times. When did that 2 come from?

/scripts/ext3-add-journal.sh: 30: cannot open /mnt/etc/fstab: No such file

-> Well, it's true. That file does not exist.

mount: /dev2/root2 is not a valid block device

-> This message is displayed 8 times.

pivot_root: No such file or directory
/sbin/init: 348: cannot open dev/console: No such file
kernel panic: Attempted to kill init!


Any ideas of what I have done wrong here?
Does anyone know what is going on here and how to fix it?

Ok, this all looks like you've compiled the kernel with an initrd, and not loaded it at boot. Or you've just compiled your HDD driver as a module...

In order for the kernel to boot and start reading from your hard disks (which is really useful), it needs to load the driver for your hard drive controller. Now, this can either be compiled into the kernel, or included as a module in an initrd (initial ramdisk). Debian's stock kernels do the latter, as this allows a greater number of drivers to be included.

If you compile the HDD controller driver as a module, but don't have an initrd, you have the chicken-and-the-egg problem of needing the driver to read the disk, but having it stored as a module ON the disk. You can see why the kernel might get a bit panicy about this situation.

What I recommend you do is boot into a debian stock kernel, and watch the boot messages (which can be recalled on the command line with the "dmesg" command). Look for the line which tells you which HDD controller driver is loaded. Something like this:

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH3M: IDE controller at PCI slot 0000:00:1f.1
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xcfa0-0xcfa7, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xcfa8-0xcfaf, BIOS settings: hdc:DMA, hdd:pio

You can see from the above, that my HDD controller uses the ICH3M chipset. This is the info you need, generally. Now go into your kernel config, and compile this into the kernel (not as a module). Rebuild, reinstall, run LILO and reboot. If you're lucky and managed to get the correct HDD controller driver, everything should work.

HTH,

Rob.



Reply to: