Always allocate

This commit is contained in:
Kroese 2023-04-19 07:05:20 +02:00 committed by GitHub
parent c3291e6eaa
commit 31eea8b2d9

View File

@ -120,8 +120,13 @@ if ! fallocate -l "${SYSTEM_SIZE}" "${SYSTEM}"; then
echo "ERROR: Could not allocate a file for the system disk." && exit 88
fi
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
echo "ERROR: System disk does not exist ($SYSTEM)" && exit 89