I am trying to customize an LUbuntu Live CD (22.04.2), following the instructions at https://help.ubuntu.com/community/LiveCDCustomization. Some of the things I would like to do, such as removing the "Install LUbuntu" desktop icon, require modifying scripts that are packed inside initrd. If I don't touch initrd, I am able to unpack the iso files, unpack filesystem.squashfs, repack filesystem.squashfs, and use xorriso to rebuild the iso, and it works. However, if I attempt to modify initrd, via unmkinitramfs and the pack it back together following the instructions, then the resulting iso starts to boot, and I see the grub menu followed by the LUbuntu screen, but then the screen goes black and I get the message, "Unable to find a medium containing a live file system".
A gist of my script I've been using is here:
https://gist.github.com/plynch-se/6113a2770fd30ee52d61191c7814d648
I suspect the problem is not with the new initrd file itself, but some option to xorriso that needs to be different now that initrd has changed, but I am not sure. The xorriso command I am using is basically this (generated in part based on the original iso as you can see in the gist):
xorriso -outdev custom.iso -map /root/tmp/custom_iso / -- -volid Lubuntu 22.04.2 LTS amd64 -boot_image grub grub2_mbr=mbr.img -boot_image any partition_table=on -boot_image any partition_cyl_align=off -boot_image any partition_offset=16 -boot_image any mbr_force_bootable=on -append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b EFI.img -boot_image any appended_part_as=gpt -boot_image any iso_mbr_part_type=a2a0d0ebe5b9334487c068b6b72699c7 -boot_image any cat_path=/boot.catalog -boot_image grub bin_path=/boot/grub/i386-pc/eltorito.img -boot_image any platform_id=0x00 -boot_image any emul_type=no_emulation -boot_image any load_size=2048 -boot_image any boot_info_table=on -boot_image grub grub2_boot_info=on -boot_image any next -boot_image any efi_path=--interval:appended_partition_2:all:: -boot_image any platform_id=0xef -boot_image any emul_type=no_emulation -boot_image any load_size=5154816
I was suspicious of the load_size number at the end, so I also tried "load_size=full", but that did not help.
Suggestions would be appreciated. I am out of ideas at this point.