Create new initrd with mkinitrd for Debian kernel

If you are using sata or scsi and your Debian 2.6 stock kernel won’t boot you need to tweak your initrd because with Debian all modules required to boot must be loaded from the initrd. Else the boot process will halt because e.g. the hard disk or other necessary stuff is not accessible.
Edit the file
to contain all the modules you wish to load (e.g. for your sata controller). You can find out which modules you need by doing
on an already running kernel (other kernel version or maybe a live-cd like knoppix). Then you need to run mkinitrd to create the new initrd manually. Here’s an example:
mkinitrd -o /boot/initrd.img-2.6.8-2-386_TEST 2.6.8-2-386
Change the kernel version and the filename to what you need. The kernel version is exactly the directory name under /lib/modules. Next you can check if your changes were applied. Mount the initrd image to a local directory to examine its conents:
cd /boot
mkdir loop
mount -o loop -t cramfs initrd.img-2.6.8-2-386_TEST loop/
cat loop/loadmodules

See the module(s) that you added here? Nice! Now you only need to tell your boot loader to use the new initrd. Edit /boot/grub/menu.lst or /etc/lilo.conf accordingly (with lilo, run lilo before rebooting!).

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?