From a8f91e1c5381957041682e9cd2202091e8f7e692 Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Mon, 28 Apr 2025 13:28:07 -0700 Subject: [PATCH] change align size --- export-image/prerun.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/export-image/prerun.sh b/export-image/prerun.sh index f2a9721..954fac2 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -10,15 +10,13 @@ rm -rf "${ROOTFS_DIR}" mkdir -p "${ROOTFS_DIR}" BOOT_SIZE="$((512 * 1024 * 1024))" +RECOVERY_SIZE="$((256 * 1024 * 1024))" ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1) # All partition sizes and starts will be aligned to this size -ALIGN="$((4 * 1024 * 1024))" +ALIGN="$((8 * 1024 * 1024))" ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 400 * 1024 * 1024) / 1" | bc)" -# Recovery partition fixed size: 256MB -RECOVERY_SIZE="$((256 * 1024 * 1024))" - BOOT_PART_START=$((ALIGN)) BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN)) ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))