0

I am tinkering with CentOS 5.4 and upgrading the kernel to the latest 2.6.18 build 402. What I need to do is to rebuild the initrd to include a modified init script, then repackage it all into an RPM I can use to deploy.

I have the initrd rebuilt and the system boots fine using it, but I cannot find out how to repackage the kernel rpm to include that new initrd. Kernel is not rebuilt and, unless I have to, I'd prefer not to do so.

  • The initrd should be generated at install time, not included in the package. – jordanm Mar 31 '15 at 16:22
  • No, it's in the rpm: rpm -qlp kernel-2.6.18-402.el5.i686.rpm | grep initrd gives me the output /boot/initrd-2.6.18-402.el5.img – Jon Mar 31 '15 at 16:57
  • 1
    @Jon, take a look at this. Could be what you want: stackoverflow.com/questions/6354782/… - Cheers – user34720 Mar 31 '15 at 17:15
  • As it turns out, there is a spec file to generate an rpm to separately distribute the modified initrd. And... one of our builds team found it! So, we install the kernel as it is distributed, then drop the modified initrd on top and update the grub.conf. Not as slick as what I'd been thinking, but it's now a documented process, the spec file will go into version control and all shall be right with the gods. – Jon Apr 2 '15 at 18:06
  • .. and neither the kernel RPM nor this third-party RPM conflict over ownership of the file? you will get issues otherwise. – user2066657 Apr 17 '15 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.