Merge "block-device-efi : expand disk size calculation"

This commit is contained in:
Zuul 2019-08-21 02:30:32 +00:00 committed by Gerrit Code Review
commit 3b2b87dde1
2 changed files with 18 additions and 0 deletions

View File

@ -446,6 +446,18 @@ if [ "$DIB_ROOT_FSTYPE" = "ext4" ] ; then
fi
fi
# EFI system partitions default to be quite large at 512mb for maximum
# compatability (see notes in
# 7fd52ba84180b4e749ccf4c9db8c49eafff46ea8) . We need to increase the
# total size to account for this, or we run out of space creating the
# final image. See if we have included the block-device-efi element,
# which implies we have a large EFI partition, and then pad the final
# image size.
if [[ ${IMAGE_ELEMENT} =~ "block-device-efi" ]]; then
echo "Expanding disk for EFI partition"
du_size=$(( $du_size + (525 * 1024) ))
fi
# Rounding down size so that is is a multiple of 64, works around a bug in
# qemu-img that may occur when compressing raw images that aren't a multiple
# of 64k. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1180021

View File

@ -0,0 +1,6 @@
---
fixes:
- |
When using the ``block-device-efi`` element to create an EFI based
system (most notably, with ARM64), the final disk size is now
expanded for the 512MiB system EFI partition introduced with 2.24.0