summaryrefslogtreecommitdiff
path: root/export-image
diff options
context:
space:
mode:
Diffstat (limited to 'export-image')
-rwxr-xr-xexport-image/prerun.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/export-image/prerun.sh b/export-image/prerun.sh
index 7e0d1eb..ea1e2d6 100755
--- a/export-image/prerun.sh
+++ b/export-image/prerun.sh
@@ -9,11 +9,11 @@ rm -f "${IMG_FILE}"
rm -rf "${ROOTFS_DIR}"
mkdir -p "${ROOTFS_DIR}"
-BOOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}/boot" --block-size=1 | cut -f 1)
+BOOT_SIZE="$((256 * 1024 * 1024))"
TOTAL_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --block-size=1 | cut -f 1)
ROUND_SIZE="$((4 * 1024 * 1024))"
-ROUNDED_ROOT_SECTOR=$(((2 * BOOT_SIZE + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE / 512 + 8192))
+ROUNDED_ROOT_SECTOR=$(((BOOT_SIZE + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE / 512 + 8192))
IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE - 1) / ROUND_SIZE * ROUND_SIZE))
truncate -s "${IMG_SIZE}" "${IMG_FILE}"
@@ -23,7 +23,7 @@ n
8192
-+$((BOOT_SIZE * 2 /512))
++$((BOOT_SIZE / 512))
p
t
c