export-image: switch from fallocate to truncate

This commit is contained in:
Serge Schneider 2017-06-21 10:46:10 +01:00
parent d347d8d5f7
commit d2b8d634b9

View file

@ -13,7 +13,7 @@ TOTAL_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/
IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (400 * 1024 * 1024))) IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (400 * 1024 * 1024)))
fallocate -l ${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
o o
n n