From da38d98ba31eb527a02c798c14131328dd607b02 Mon Sep 17 00:00:00 2001 From: Nis Wechselberg Date: Sat, 28 May 2022 09:00:45 +0200 Subject: [PATCH] Support for 22.04 * Changed the default ubuntu release to 22.04 (jammy) * Added option --focal for 20.04 (focal) * Implemented extracting boot partitions from existing cd image * Changed xorriso call for image creation to conform to 22.04 layout Signed-off-by: Nis Wechselberg --- ubuntu-autoinstall-generator.sh | 98 +++++++++++++++++++++++++++------ 1 file changed, 81 insertions(+), 17 deletions(-) mode change 100644 => 100755 ubuntu-autoinstall-generator.sh 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}"