Hi,
I try to create a custom Rocky 9 based iso image with different kickstart files.
I extract the initrd.img which comes with Rocky 9, add the kickstart files and repack the initrd.img again.
After this I create a new iso image and try to install the system.
Unfortunately this fails during startup of the custom iso. Directly after successful “Reached target Basic System.” I see multiple dracut-initqueue errors:
“cannot find an unused loop device”…
“failed to setup loop device”…
“failed to find a root file system”…
If I directly use the unpatched original Rocky 9 initrd.img file (in the custom iso) it is working and I can install the system (but of course need to setup things manually in anaconda).
So I guess the way I create the iso itself is ok and the issue is that I repack the initrd.img in wrong way.
Here is the code snippet I use to patch the initrd.img:
mkdir -p $(INITRD_DIR)
cd $(INITRD_DIR) ; xz --decompress --verbose < $(ROCKY9_SRC)/initrd.img | sudo cpio --extract --quiet --make-directories --no-absolute-filenames --unconditional --preserve-modification-time
cp $(KS_DIR)/*.ks $(INITRD_DIR)
cd $(INITRD_DIR) ; sudo find . | sudo cpio --create --quiet -H newc | xz --compress --format=lzma --verbose > $(ISOLINUX_DST)/initrd.img
What is the correct command to repack the initrd.img?
Kind regards,
Lars