From ab95eb6ebfd93e9183650b8eb33e4a9e97d3fdd8 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 17 Mar 2025 11:14:01 +0100 Subject: [PATCH] Update install.sh --- src/install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/install.sh b/src/install.sh index 82203a7..79709e9 100644 --- a/src/install.sh +++ b/src/install.sh @@ -328,10 +328,12 @@ if [[ "${FS,,}" == "btrfs" ]]; then fi fi -if ! fallocate -l "$SYSTEM_SIZE" "$SYSTEM"; then - if ! truncate -s "$SYSTEM_SIZE" "$SYSTEM"; then - rm -f "$SYSTEM" - error "Could not allocate file $SYSTEM for the system disk." && exit 98 +if ! fallocate -l "$SYSTEM_SIZE" "$SYSTEM" &>/dev/null; then + if ! fallocate -l -x "$SYSTEM_SIZE" "$SYSTEM"; then + if ! truncate -s "$SYSTEM_SIZE" "$SYSTEM"; then + rm -f "$SYSTEM" + error "Could not allocate file $SYSTEM for the system disk." && exit 98 + fi fi fi