diff --git a/export-image/prerun.sh b/export-image/prerun.sh index b1585d1..f2a9721 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -27,6 +27,12 @@ RECOVERY_PART_START=$((ROOT_PART_START + ROOT_PART_SIZE)) RECOVERY_PART_SIZE=$(((RECOVERY_SIZE + ALIGN - 1) / ALIGN * ALIGN)) IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE + RECOVERY_PART_SIZE)) +echo "Estimated sizes:" +echo " Boot partition: $((BOOT_PART_SIZE / 1024 / 1024))MB" +echo " Root partition: $((ROOT_PART_SIZE / 1024 / 1024))MB" +echo " Recovery partition: $((RECOVERY_PART_SIZE / 1024 / 1024))MB" +echo " Total image size: $((IMG_SIZE / 1024 / 1024))MB" + truncate -s "${IMG_SIZE}" "${IMG_FILE}" parted --script "${IMG_FILE}" mklabel msdos