From f7e0f39a1daa32e2db714d137de52c514bd822b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Smith?= Date: Wed, 2 Jul 2025 13:59:13 +0100 Subject: [PATCH] fix: Increase CPC disk-image base imagesize to 2.5GB In the ubuntu-cpc disk-image binary we need to avail of the ever increasing size of packages. 2.2GB is now just a bit too small leading to `No space left on device` errors when the binary hits `grub-install`. This commit increases $imagesize to 2.5GB (in the binary as an override initially implemented in ecaaf0484). This commit also runs `df` just after the grub-pc && grub2-common installs to make for easier debugging in the future. Refs: LP: #2115811 --- live-build/functions | 1 + live-build/ubuntu-cpc/hooks.d/base/disk-image.binary | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/live-build/functions b/live-build/functions index 7d04ec7d..8ee53f2f 100644 --- a/live-build/functions +++ b/live-build/functions @@ -1,6 +1,7 @@ # vi: ts=4 expandtab syntax=sh # default imagesize = 2252*1024**2 = 2.2G (the current size we ship) +# However this value may be overridden in individual hooks/binaries (like in buildd and ubuntu-cpc) imagesize=${IMAGE_SIZE:-2361393152} fs_label="${FS_LABEL:-rootfs}" diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary index 63d28ab0..8b7206d4 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary @@ -14,6 +14,10 @@ ROOTPART_START=1 my_d=$(dirname $(readlink -f ${0})) +# NEW CPC default imagesize is 2.5G [2684354560 bytes] to avail of the slow increase in pkg sizes +# This value will be passed into live-build/functions as an override +imagesize=2684354560 + case $ARCH:$SUBARCH in ppc64el:*|powerpc:*) echo "POWER disk images are handled separately" @@ -95,6 +99,7 @@ if [ "${should_install_grub}" -eq 1 ]; then echo "(hd0) ${loop_device}" > mountpoint/tmp/device.map # install the required package to get the grub-install command chroot mountpoint apt-get -qqy install --no-install-recommends grub-pc grub2-common + chroot mountpoint df --all --human-readable --print-type chroot mountpoint grub-install ${loop_device} chroot mountpoint grub-bios-setup \ --boot-image=i386-pc/boot.img \