I have an initramfs script I developed for Debian distributions that required some extra binaries to be loaded into the image. I'm now trying to port this to RHEL distributions and I'm struggling.

To add binaries to initramfs on Debian I'd use a hook script at /usr/share/initramfs-tools/hooks/. I could then place the script at /etc/initramfs-tools/scripts/init-bottom/. An extra module can be loaded with a quick echo my_module >> /etc/initramfs-tools/modules

This is all picked up by a subsequent update-initramfs and injected into the subsequent image.

The location of these files on the image is revealed by an lsinitramfs. The script finds its way to /scripts/init-bottom/ and the binaries appear in /bin/. However, lsinitrd on CentOS doesn't reveal a /scripts/ folder or an equivalent.

I see that I can use dracut to load and extra module and even load extra binaries (this time in /usr/bin/) but it's not clear how or where I should install the script.

How should I install modules, binaries or scripts to initramfs in RHEL distributions?

  • What version of RHEL/CentOS are you using?
    – Kevin S
    Oct 7, 2015 at 18:52
  • I've been working with CentOS 7 though I'd have use for it on CentOS 6.5 as well. Thanks for your interest.
    – dsclose
    Oct 7, 2015 at 20:09


You must log in to answer this question.

Browse other questions tagged .