export-image: increase free space padding

This commit is contained in:
Serge Schneider 2017-06-21 10:56:07 +01:00
parent d2b8d634b9
commit a0060bd475

View File

@ -11,7 +11,7 @@ mkdir -p ${ROOTFS_DIR}
BOOT_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR}/boot --block-size=1 | cut -f 1) BOOT_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR}/boot --block-size=1 | cut -f 1)
TOTAL_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1) TOTAL_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1)
IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (400 * 1024 * 1024))) IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024)))
truncate -s ${IMG_SIZE} ${IMG_FILE} truncate -s ${IMG_SIZE} ${IMG_FILE}
fdisk -H 255 -S 63 ${IMG_FILE} <<EOF fdisk -H 255 -S 63 ${IMG_FILE} <<EOF