From 31eea8b2d9a2a6c61aa53ed8ca5d32d532fa4815 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 19 Apr 2023 07:05:20 +0200 Subject: [PATCH] Always allocate --- run/install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run/install.sh b/run/install.sh index f4baa05..658d9d1 100644 --- a/run/install.sh +++ b/run/install.sh @@ -120,7 +120,12 @@ if ! fallocate -l "${SYSTEM_SIZE}" "${SYSTEM}"; then echo "ERROR: Could not allocate a file for the system disk." && exit 88 fi -dd if=/dev/urandom of="${SYSTEM}" count="${SYSTEM_SIZE}" bs=1M iflag=count_bytes status=none + if [ "$ALLOCATE" = "Z" ]; then + + echo "Install: Preallocating 4 GB of diskspace..." + dd if=/dev/urandom of="${SYSTEM}" count="${SYSTEM_SIZE}" bs=1M iflag=count_bytes status=none + +fi # Check if file exists if [ ! -f "${SYSTEM}" ]; then