How to rebuild a Fedora netinst ISO?

Hi,

I am struggling with trying to rebuild a fedora 39 netinst iso.
I downloaded this here: https://download.fedoraproject.org/pub/fedora/linux/releases/39/Everything/x86_64/iso/Fedora-Everything-netinst-x86_64-39-1.5.iso
Copied the iso contents into a directory.
Made a change to the boot parameters in grub.cfg where I need it to look for a specific kickstart on boot.
And now I need to build it back into a working iso.

I tried several variants of xorrisofs commands but I can not figure out how to make it work.

Does anyone know?
Thanks.

As usual, you spend two hours solving a problem, finally give up and ask for help and then figure it out in the next ten minutes.

This is how it can be done:
xorriso -indev Fedora-Everything-netinst-x86_64-39-1.5.iso -outdev test.iso -compliance no_emul_toc -map ./grub.cfg boot/grub2/grub.cfg -boot_image any replay

./grub.cfg is the modified file you want to add into the iso and the boot/… path is where it will be placed in the iso.