######################################################################## # Here is the genisoimage command line I used to patch a debian # # installation CD to alter its initrd. The isolinux.cfg was patched # # to specify the alternative initrd location. The kernel was not # # altered from the version on the CD, but that can be done in the same # # way. # # # # (Alternatively to -graft-points, bind mounts could be used.) # ######################################################################## # This step is necessary because isolinux.bin has to be writable, # because genisoimage modifies it on-disk. sudo mount --bind isolinux.tmp.Z3Va9k \ iso-mnt/boot/isolinux/isolinux.bin genisoimage -o samizdat.iso \ -b boot/isolinux/isolinux.bin \ -c boot/isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -iso-level 4 \ -V 'Samizdat uYr7YmecI0VeCJteX0imQfo' \ -graft-points \ samizdat/boot/initrd.gz=initrd.cpio.gz \ boot/isolinux/isolinux.cfg=isolinux.cfg \ iso-mnt ######################################################################## # Here is a parameterized version (untested): # ######################################################################## INPUT=./iso-mnt OUTPUT=samizdat.iso VOLID='Samizdat uYr7YmecI0VeCJteX0imQfo' GRAFTS='samizdat/boot/initrd.gz=initrd.cpio.gz boot/isolinux/isolinux.cfg=isolinux.cfg' genisoimage -o "$OUTPUT" \ -b boot/isolinux/isolinux.bin \ -c boot/isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -iso-level 4 \ -V "$VOLID" \ -graft-points $GRAFTS "$INPUT"