From 1a6a1d9da925d06be071fcca4fe502dcbd9fb827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20L=2E=20Redrejo=20Rodr=C3=ADguez?= Date: Tue, 12 Nov 2024 19:29:45 +0100 Subject: [PATCH] Change loop device size to avoid disk space problems --- export-image/prerun.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/export-image/prerun.sh b/export-image/prerun.sh index 6a5309a0a4..3a145593e4 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -18,7 +18,10 @@ ALIGN="$((4 * 1024 * 1024))" # some overhead (since actual space usage is usually rounded up to the # filesystem block size) and gives some free space on the resulting # image. -ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)" + +# To avoid disk space problems in the loop device, changed ROOT_MARGIN +# as suggested in https://github.com/RPi-Distro/pi-gen/issues/784 +ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.3 + 200 * 1024 * 1024) / 1" | bc)" BOOT_PART_START=$((ALIGN)) BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))