Fallback to dd if fallocate fails

Only certain filesystems support the fallocate system call.
This commit is contained in:
sin 2014-03-15 14:32:22 +00:00
parent 68a54b61f2
commit 77bf905404

View File

@ -13,7 +13,7 @@ root=$1
img=$2
mnt="/mnt/morpheus"
fallocate -l 2G $img
fallocate -l 2G $img || dd if=/dev/zero of=$img bs=512M count=4
(
cat << EOF
o