How to correctly repack initrd.img from Rocky 9 iso image?

I really don’t recommend modifying initrd as there are specific image and volume names as well as specific expectations during boot. Is there a reason you want to repack the initrd instead of adding the kickstart to the ISO itself?

You’re much better off including the kickstart on the ISO itself without changing the initrd yourself using mkksiso (part of the lorax package). See this for more info.

1 Like