12/03/2016

RHEL5, Fixing 10 sec boot delay


Basically, nash is the initrd shell script processor. It loads drivers for the kernel when the initrd is loaded into memory. But in RHEL5 is has a "static" Wait for.. that only applies to some old SCSI hardware no one uses anymore, and its too late to make a change upstream and take it out. Here's how to fix that.

Simply, edit the default [ /sbin/mkinitrd ] shell script

# vi /sbin/mkinitrd

seach for

//\proc/\scsi/\scsi

it should take you to this line

emit "stabilize --has --internal 1000 /proc/scsi/scsi

add a hash to the beginning of the line (to commented the line out)

# emit "stabilize --has --internal 1000 /proc/scsi/scsi

save the file and build a new initrd for your current kernel

example:

 # mkinitrd /boot/initrd-2.6.18-410.el5.img 2.6.18-410.el5

if you get an error make sure you referred to the kernel your actually using
(check the /boot directory and the /boot/grub/menu.lst default boot option stanza)

make sure you have kernel src and kernel headers and a gcc installed
(in this version of redhat kernel headers are in the kernel-devel package)

yum install kernel kernel-devel gcc


this "makes" a new initrd placing it in the path and filename of the first option

and puts this new initrd together using drivers and modules for the kernel named in the second option

Caution: make sure you have a backup kernel and initrd to choose from in the grub menu if something goes wrong

and reboot

the long 10 second delay will be gone

This was helpful in understanding the problem and explains the solution, but lacks a little bit of detail:

Fixing “Waiting for driver initialization” delay issue while booting on RHEL 5.4