We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6f7cd5 commit 40eae05Copy full SHA for 40eae05
export-image/prerun.sh
@@ -13,6 +13,7 @@ BOOT_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR}/boot --block-size=1 | cut
13
TOTAL_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1)
14
15
ROUND_SIZE="$((4 * 1024 * 1024))"
16
+ROUNDED_ROOT_SECTOR=$(((2 * BOOT_SIZE + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE / 512 + 8192))
17
IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE))
18
19
truncate -s ${IMG_SIZE} ${IMG_FILE}
@@ -29,7 +30,7 @@ c
29
30
n
31
32
-8192
33
+${ROUNDED_ROOT_SECTOR}
34
35
36
p
0 commit comments