about summary refs log tree commit diff
path: root/mkimage.sh.in
diff options
context:
space:
mode:
authorToyam Cox <Vaelatern@gmail.com>2016-01-12 18:13:03 -0500
committerToyam Cox <Vaelatern@gmail.com>2016-01-14 08:48:43 -0500
commita25ec4a9b0d2fca05f87db62d05e7cf6eca3e506 (patch)
tree2f5e85a1b461c269226258c3632feb3b959aafff /mkimage.sh.in
parent6653bb6057f8a3b42c69b3bc0fa5ef40ade1e679 (diff)
downloadhrmpf-a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506.tar.gz
hrmpf-a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506.tar.xz
hrmpf-a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506.zip
Switch to truncate to allocate storage for images
Works in low memory situations
Diffstat (limited to 'mkimage.sh.in')
-rw-r--r--mkimage.sh.in2
1 files changed, 1 insertions, 1 deletions
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)