Today I have discovered nifty mkinitrd command option 🙂
mkinitrd command is use to make an initrd image. According to man page:
The mkinitrd script constructs a directory structure that can serve as an initrd root file system. It then generates an image containing that directory structure using mkcramfs(8), which can be loaded using the initrd mechanism. The kernel modules for the specified kernel version will be placed in the directory structure. If version is omitted, it defaults to the version of the kernel that is currently running.
So mkinitrd creates an initial image used by the kernel for preloading the block device modules such as IDE, SCSI RAID etc. These modules are needed when system need to access the root filesystem.
If you have new SCSI card you need to make sure that a particular kernel module will be loaded by my initial ramdisk. Pass –preload option to mkinitrd to load the `module’ module in the initial ramdisk image. The module gets loaded before any SCSI modules which are specified in /etc/modprobe.conf. This is quite good if you need any module before SCSI module.
# mkinitrd --preload=module-name /boot/initrd-2.6.9-42.ELsmp.img 2.6.9-42.ELsmp
Replace module-name with actual module name.
For more information read mkinitrd man page:
- man mkinitrd