diff --git a/.github/workflows/build-iso.yml b/.github/workflows/build-iso.yml index 2f7bb36..9fa1cbd 100644 --- a/.github/workflows/build-iso.yml +++ b/.github/workflows/build-iso.yml @@ -127,8 +127,15 @@ jobs: [ -n "$ISO_FILE" ] || { echo "[ERR] no ISO produced by livecd-creator"; exit 1; } echo "[INFO] grafting /veilor/ onto $ISO_FILE" - # Inspect original boot stanza so the rebuild matches livecd-creator's layout. + # Extract original ISO's exact boot stanza so the rebuild matches + # livecd-creator's layout byte-for-byte. This is immune to upstream + # Fedora layout changes (e.g. images/ vs isolinux/ for efiboot.img, + # partition geometry flags, hybrid MBR/GPT options). xorriso -indev "$ISO_FILE" -report_el_torito as_mkisofs 2>&1 | tee /tmp/iso-boot.txt || true + ORIG_FLAGS=$(xorriso -indev "$ISO_FILE" -report_el_torito as_mkisofs 2>/dev/null | \ + grep -v '^xorriso :' | grep -E '^-' | tr '\n' ' ') + [ -n "$ORIG_FLAGS" ] || { echo "[ERR] could not extract boot stanza from $ISO_FILE"; exit 1; } + echo "[INFO] re-pack flags from original ISO: $ORIG_FLAGS" mkdir -p /tmp/iso-mod xorriso -osirrox on -indev "$ISO_FILE" -extract / /tmp/iso-mod @@ -136,15 +143,11 @@ jobs: mkdir -p /tmp/iso-mod/veilor cp -a /work/overlay /work/scripts /work/assets /tmp/iso-mod/veilor/ - xorriso -as mkisofs \ + # Replay the exact stanza captured above. eval is needed because + # ORIG_FLAGS contains multiple flag/value pairs that must word-split. + eval xorriso -as mkisofs \ -volid "veilor-os-43" \ - -isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \ - -eltorito-boot isolinux/isolinux.bin \ - -eltorito-catalog isolinux/boot.cat \ - -no-emul-boot -boot-load-size 4 -boot-info-table \ - -eltorito-alt-boot \ - -e images/efiboot.img -no-emul-boot \ - -isohybrid-gpt-basdat \ + $ORIG_FLAGS \ -o "${ISO_FILE}.tmp" /tmp/iso-mod mv "${ISO_FILE}.tmp" "$ISO_FILE" rm -rf /tmp/iso-mod