Linux – Will a “customized” initrd survive a kernel update via yum

bootinitrdlinux

I have a CentOS 5.5 installation with the stock CentOS 5.5 kernel. I have modified the init script in the initrd, commenting out some unneeded modules, lowering the interval time of the "stabilized" command , etc.

My question is, what will happen in the future when Yum updates the kernel? Will my initrd modifications make it into the initrd of the new kernel?

Best Answer

No, your changes won't be in the new initrd. The CentOS kernel packages have a post-script that runs /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 2.6.18-238.1.1.el5 (an example from the RHEL5 kernel I have installed).

The command will run mkinitrd, which will build a new initrd, and the changes that you made to the previous initrd won't be created there, unless you've also changed the mkinitrd script or its files (or you patched nash or something like that).

Related Question