diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c6421f7..b1ccb5d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,7 @@ Changed - Increase the additional free space of the EFI partition size from 1 MiB to 8 MiB to account for file system overhead when using FAT32 (needs less than 1 MiB) and to give more space for adding custom files when repacking an ISO (e.g. when preparing it for Secure Boot). +- Remove 300 KiB padding needed for CDs if the ISO exceeds the maximum size of a CD. Deprecated ---------- diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 63cad81..f55731e 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -1735,6 +1735,11 @@ _build_iso_image() { typeset -f "_add_xorrisofs_options_${bootmode}" &>/dev/null && "_add_xorrisofs_options_${bootmode}" done + # Remove 300 KiB padding needed for CDs if the ISO exceeds the max size of a CD + if (( $(du -s --apparent-size -B1M "${isofs_dir}/" | awk '{ print $1 }') > 900 )); then + xorrisofs_options+=('-no-pad') + fi + rm -f -- "${out_dir}/${image_name}" _msg_info "Creating ISO image..." xorriso "${xorriso_options[@]}" -as mkisofs \