Recently I had a new installation of RHEL 5.4 on my home desktop. I observed that kernel/initrd boot time goes around 30 seconds (without including time to start init services and X). I already faced this using RHEL 5.4 on vmware and ignored it by thinking that it is vmware performance issue. I could not do same when it appears on actual desktop.So, I fixed it in this way.
I have removed “quiet” parameter from kernel line in grub.conf to see where it is taking more time. It is taking more than 15 seconds when it is doing “Waiting for driver initialization“. As it message is appearing after starting nash, it is the issue in initrd image, not with kernel. After extracting initrd image, and reviewing init script in that, got who is culprit. Here it is,
echo Waiting for driver initialization.
stabilized –hash –interval 1000 /proc/scsi/scsi
To know what is “stabilized”, checked manual of nash, it is not there. Did a google for it, and found there is a bug logged against it. Unfortunately this bug is not going to be fixed by RedHat :-( . Did not get any workaround in my search.
So, as a last resort downloaded its source code (actually, it is in mkinird-XX.src.rpm). After reviewing nash.c, stabilized has a checksum function and delay function. I guessed that this may be removed. So, experimented by removing it.
The init script in initrd image will be generated by mkinitrd script. I commented the line which contains,
emit “stabilized –hash –interval 1 /proc/scsi/scsi”
And generated initrd image again. Yes, as I guessed, with new initrd image there is no long “Waiting for driver initialization“.
No comments:
Post a Comment