From 81614c6992d063909e268b5cb5797a68987cd37a Mon Sep 17 00:00:00 2001 From: Alexandre Ghiti Date: Thu, 2 Jun 2022 20:20:09 +0200 Subject: [PATCH] riscv: Bump image size to 4.5G 3.5G is not enough for riscv64 preinstalled as the creation of the initrd fails with the following error: Creating config file /etc/default/grub with new version Processing triggers for initramfs-tools (0.140ubuntu13) ... update-initramfs: Generating /boot/initrd.img-5.15.0-1011-generic zstd: error 25 : Write error : No space left on device (cannot write compressed block) E: mkinitramfs failure zstd -q -1 -T0 25 update-initramfs: failed for /boot/initrd.img-5.15.0-1011-generic with 1. dpkg: error processing package initramfs-tools (--configure): installed initramfs-tools package post-installation script subprocess returned error exit status 1 Signed-off-by: Alexandre Ghiti --- live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index 43080393..ccd9954a 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -25,13 +25,17 @@ if [ "$ARCH" = "armhf" ]; then IMAGE_SIZE=3758096384 # bump to 3.5G (3584*1024**2); Since Jammy armhf need more then the default 2.2G fi -# Change image size for preinstalled generic images & all preinstalled riscv64 images +# Change image size for preinstalled generic images if [ -n "${SUBARCH:-}" ]; then - if [ "${SUBARCH:-}" = "generic" ] || [ "$ARCH" = "riscv64" ]; then + if [ "${SUBARCH:-}" = "generic" ]; then IMAGE_SIZE=3758096384 # bump to 3.5G (3584*1024**2), due to linux-generic instead of virtual fi fi +if [ "$ARCH" = "riscv64" ]; then + IMAGE_SIZE=4831838208 # bump to 4.5G (4608*1024**2); initrd creation fails with "No space left" with 3.5G +fi + . config/binary . config/functions