Skip to content

Commit 1a6a1d9

Browse files
committed
Change loop device size to avoid disk space problems
1 parent e2ba148 commit 1a6a1d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

export-image/prerun.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ ALIGN="$((4 * 1024 * 1024))"
1818
# some overhead (since actual space usage is usually rounded up to the
1919
# filesystem block size) and gives some free space on the resulting
2020
# image.
21-
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)"
21+
22+
# To avoid disk space problems in the loop device, changed ROOT_MARGIN
23+
# as suggested in https://github.com/RPi-Distro/pi-gen/issues/784
24+
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.3 + 200 * 1024 * 1024) / 1" | bc)"
2225

2326
BOOT_PART_START=$((ALIGN))
2427
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))

0 commit comments

Comments
 (0)