about summary refs log tree commit diff
path: root/mkimage.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2016-01-15 07:22:19 +0100
committerJuan RP <xtraeme@gmail.com>2016-01-15 07:22:19 +0100
commit62406cba3f2b1c80e2b1703b4682e57a6086da06 (patch)
tree2f5e85a1b461c269226258c3632feb3b959aafff /mkimage.sh.in
parent6653bb6057f8a3b42c69b3bc0fa5ef40ade1e679 (diff)
parenta25ec4a9b0d2fca05f87db62d05e7cf6eca3e506 (diff)
downloadhrmpf-62406cba3f2b1c80e2b1703b4682e57a6086da06.tar.gz
hrmpf-62406cba3f2b1c80e2b1703b4682e57a6086da06.tar.xz
hrmpf-62406cba3f2b1c80e2b1703b4682e57a6086da06.zip
Merge pull request #51 from Vaelatern/truncate
Switch to truncate to allocate storage for images
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)