[Build script] Reverting image creation improvement due to (random?) failing. truncate sometimes resoult in fs corruption or is not possible to clearly unmount loop device. Need deeper inspection or simply reverting to previous working solution

Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
This commit is contained in:
Igor Pecovnik 2019-06-14 20:29:07 +02:00
parent 858ff1d47b
commit 95977fa6f5
No known key found for this signature in database
GPG Key ID: 93D6889F9F0E78D5

View File

@ -387,7 +387,8 @@ prepare_partitions()
# stage: create blank image
display_alert "Creating blank image for rootfs" "$sdsize MiB" "info"
truncate --size=${sdsize}M ${SDCARD}.raw
# truncate --size=${sdsize}M ${SDCARD}.raw # sometimes results in fs corruption, revert to previous know to work solution
dd if=/dev/zero bs=1M status=none count=$sdsize | pv -p -b -r -s $(( $sdsize * 1024 * 1024 )) | dd status=none of=${SDCARD}.raw
# stage: calculate boot partition size
local bootstart=$(($OFFSET * 2048))