What is initrd?
The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available. The initrd is bound to the kernel and loaded as part of the kernel boot procedure.When do we need to rebuild initrd?
- If adding new hardware to a system that may be used very early in the boot process.
- If changing configuration files that may be used very early in the boot process
- If changing the options on a kernel module.
How to rebuild initrd?
mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r)mkinitrd -f -v /boot/initrd-2.6.18-164.el5.img 2.6.18-164.el5
Kernel and initrd path in grub.conf
[root@localhost grub]# pwd/boot/grub
[root@localhost grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-348.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-348.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=128M@16M
initrd /initrd-2.6.18-348.el5.img