From a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506 Mon Sep 17 00:00:00 2001 From: Toyam Cox Date: Tue, 12 Jan 2016 18:13:03 -0500 Subject: Switch to truncate to allocate storage for images Works in low memory situations --- mkimage.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkimage.sh.in') diff --git a/mkimage.sh.in b/mkimage.sh.in index 13e9301..4888c66 100644 --- a/mkimage.sh.in +++ b/mkimage.sh.in @@ -131,7 +131,7 @@ case "$DD_VERSION" in esac info_msg "Creating disk image ($IMGSIZE) ..." -dd if=/dev/zero of=$FILENAME bs=$IMGSIZE count=1 ${DD_SPARSE} >/dev/null 2>&1 +truncate -s "${IMGSIZE}M" $FILENAME >/dev/null 2>&1 ROOTFSDIR=$(mktemp -d) -- cgit 1.4.1