Skip to content

Commit

Permalink
Change loop device size to avoid disk space problems
Browse files Browse the repository at this point in the history
  • Loading branch information
jredrejo committed Nov 12, 2024
1 parent e2ba148 commit 1a6a1d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion export-image/prerun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1a6a1d9

Please sign in to comment.