diff --git a/ubuntu-autoinstall-generator.sh b/ubuntu-autoinstall-generator.sh old mode 100644 new mode 100755 index 5229d83..6884266 --- a/ubuntu-autoinstall-generator.sh +++ b/ubuntu-autoinstall-generator.sh @@ -27,9 +27,10 @@ function die() { usage() { cat </dev/null +if [ ${focal} -eq 1 ]; then + xorriso -as mkisofs -r \ + -V "ubuntu-auto-focal-$today" \ + -J \ + -b isolinux/isolinux.bin \ + -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \ + -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -boot-info-table -input-charset utf-8 \ + -eltorito-alt-boot \ + -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat \ + -o "${destination_iso}" \ + . #&>/dev/null +else + xorriso -as mkisofs -r \ + -V "ubuntu-auto-jammy-$today" \ + --grub2-mbr "${source_iso}-hybrid.img" \ + -partition_offset 16 --mbr-force-bootable \ + -append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b "${source_iso}-efi.img" \ + -appended_part_as_gpt \ + -iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7 \ + -c '/boot.catalog' \ + -b '/boot/grub/i386-pc/eltorito.img' \ + -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \ + -eltorito-alt-boot -e '--interval:appended_partition_2:::' \ + -no-emul-boot \ + -o "${destination_iso}" \ + . #&>/dev/null +fi cd "$OLDPWD" log "👍 Repackaged into ${destination_iso}"