On 23/07/15 12:08, Rick Tillery wrote: > I need to make a small modification to an existing initramfs image > file (to add driver and executable that need to run before main system > drives are mounted), but I want to do so with minimal changes to the > existing image, in order to avoid incompatibilities with any other > customization that may have been added to the initramfs before. > > dracut seems to create initramfs from scratch, using the currently > running environment. But I would prefer to unarchive the image, make > my small modification, re-archive the tree, and then replace the > existing initramfs file (backing up the old one) to be used on the > next reboot. The goal is as small a change as possible from what was > there originally. > > I tried using cpio, but it doesn't handle the device directories when > unarchiving without generating errors. And I'm not sure how to use > this to reconstruct the archive, especially with the compression and > early CPIO portions restored correctly.
I have had this on bookmark just in case I need it. http://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/ -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html