From 9fa28fce7e6916808840329c5460db45bb5eaf57 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 3 Jul 2023 11:26:10 +0200 Subject: [PATCH] fix: Fix issue #281 --- run/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run/install.sh b/run/install.sh index 068a1df5..8bdc8124 100644 --- a/run/install.sh +++ b/run/install.sh @@ -179,7 +179,9 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1) (( SYSTEM_SIZE > SPACE )) && error "Not enough free space to create a 4 GB system disk." && exit 87 if ! fallocate -l "${SYSTEM_SIZE}" "${SYSTEM}"; then - rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88 + if ! truncate -s "${SYSTEM_SIZE}" "${SYSTEM}"; then + rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88 + fi fi if [[ "${ALLOCATE}" == [Zz]* ]]; then