/ Linux Reviews / Howtos / Kernel Rebuild Guide - en

4.4. Create Initial RAMDisk

If you have built your main boot drivers as modules (e.g., SCSI host adapter, filesystem, RAID drivers) then you will need to create an initial RAMdisk image. The initrd is a way of sidestepping the chicken and egg problem of booting -- drivers are needed to load the root filesystem but the filesystem cannot be loaded because the drivers are on the filesystem. As the manpage for mkinitrd states:


       mkinitrd creates filesystem images which are suitable for use as Linux initial
       ramdisk(initrd) images. Such images are often used for preloading  the
       block device modules (such as IDE, SCSI or RAID) which are needed to access the
       root filesystem. mkinitrd automatically loads filesystem  modules (such as
       ext3 and jbd), IDE modules,all scsi_hostadapter entries in /etc/modules.conf,
       and raid modules if the systems root partition is on raid, which makes it
       simple to build and use kernels using modular device drivers.

To create the initrd, do the following:
$ mkinitrd /boot/initrd-2.6.0.img 2.6.0
Some versions of mkinitrd may require other options to specify the location of the new kernel. On SuSe 9.0, for example, the following syntax is required:
$ mkinitrd -k vmlinux-VERSION -i initrd-VERSION



At this writing there are some issues with the modules.conf when moving from 2.4 to 2.6 kernels. Some module names have changed which seems to cause glitches with initrd.

/ Linux Reviews / Howtos / Kernel Rebuild Guide

Meet new people

Adult Dating