mkarchiso: do not pad the ISO when it is not necessary
If the ISO exceeds the max size of a CD (900 MiB), the 300 KiB padding needed for CDs can be removed.
This commit is contained in:
parent
1ae3ff6ff6
commit
ead84ee9c0
2 changed files with 6 additions and 0 deletions
|
@ -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
|
- 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 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).
|
when preparing it for Secure Boot).
|
||||||
|
- Remove 300 KiB padding needed for CDs if the ISO exceeds the maximum size of a CD.
|
||||||
|
|
||||||
Deprecated
|
Deprecated
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -1735,6 +1735,11 @@ _build_iso_image() {
|
||||||
typeset -f "_add_xorrisofs_options_${bootmode}" &>/dev/null && "_add_xorrisofs_options_${bootmode}"
|
typeset -f "_add_xorrisofs_options_${bootmode}" &>/dev/null && "_add_xorrisofs_options_${bootmode}"
|
||||||
done
|
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}"
|
rm -f -- "${out_dir}/${image_name}"
|
||||||
_msg_info "Creating ISO image..."
|
_msg_info "Creating ISO image..."
|
||||||
xorriso "${xorriso_options[@]}" -as mkisofs \
|
xorriso "${xorriso_options[@]}" -as mkisofs \
|
||||||
|
|
Loading…
Add table
Reference in a new issue