summaryrefslogtreecommitdiff
path: root/mkimage.sh
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-05 12:48:00 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-05 12:48:00 +0000
commit27a446e901a30b9aa33bf95fcc355ece6f675678 (patch)
tree4b88c7128fcbf48236915394aa36812db830ef98 /mkimage.sh
parent960019944b34836fd37e41cc0d7a873b593f0832 (diff)
downloadmorph-27a446e901a30b9aa33bf95fcc355ece6f675678.tar.gz
Use dd to create an image file, instead of qemu-img
We don't want to have to add all of qemu to Baserock, just for qemu-img. Since we use a raw disk image file type, we can just create a big file full of zeroes, and the best way to do that is to create a giant hole. dd can do that.
Diffstat (limited to 'mkimage.sh')
-rwxr-xr-xmkimage.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkimage.sh b/mkimage.sh
index 1f5d703d..3b6355da 100755
--- a/mkimage.sh
+++ b/mkimage.sh
@@ -14,7 +14,7 @@ fi
img="$1"
shift
-sudo qemu-img create -f raw "$img" 16G
+sudo dd if=/dev/zero of="$img" bs=16G seek=1 count=0
sudo parted -s "$img" mklabel msdos
sudo parted -s "$img" mkpart primary 0% 100%
sudo parted -s "$img" set 1 boot on