diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f3a2d54..c6421f7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,9 @@ Changed - Moved the ``pkglist.x86_64.txt`` file outside the bootstrap tarball's ``root.x86_64`` directly to avoid polluting the root file system. - Use 4 MiB OVMF files in ``run_archiso`` instead of the old 2 MiB ones. +- 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). Deprecated ---------- diff --git a/archiso/mkarchiso b/archiso/mkarchiso index cd00c9d..63cad81 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -528,17 +528,13 @@ _make_efibootimg() { local imgsize_kib="0" local imgsize_bytes=${1} - if (( imgsize_bytes < 2*1024*1024 )); then - _msg_info "Validating '${bootmode}': efiboot.img size is ${imgsize_bytes} bytes is less than 2 MiB! Bumping up to 2 MiB" - imgsize_bytes=$((2*1024*1024)) - fi - - # Convert from bytes to KiB and round up to the next full MiB with an additional MiB for reserved sectors. + # Convert from bytes to KiB and round up to the next full MiB with an additional 8 MiB for reserved sectors, file + # and directory entries and to allow adding custom files when repacking the ISO. imgsize_kib="$( awk 'function ceil(x){return int(x)+(x>int(x))} function byte_to_kib(x){return x/1024} function mib_to_kib(x){return x*1024} - END {print mib_to_kib(ceil((byte_to_kib($1)+1024)/1024))}' <<<"${imgsize_bytes}" + END {print mib_to_kib(ceil((byte_to_kib($1)+8192)/1024))}' <<<"${imgsize_bytes}" )" # The FAT image must be created with mkfs.fat not mformat, as some systems have issues with mformat made images: # https://lists.gnu.org/archive/html/grub-devel/2019-04/msg00099.html