From dcbdfeab9b5a149bdfa0370af209d318ece8518a Mon Sep 17 00:00:00 2001 From: rootzoll Date: Mon, 13 Jan 2025 22:40:18 +0100 Subject: [PATCH] fix partitioning --- home.admin/config.scripts/blitz.data.sh | 34 +++++++++++++------------ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/home.admin/config.scripts/blitz.data.sh b/home.admin/config.scripts/blitz.data.sh index d39d515fa..da8b50c4d 100644 --- a/home.admin/config.scripts/blitz.data.sh +++ b/home.admin/config.scripts/blitz.data.sh @@ -621,27 +621,29 @@ if [ "$1" = "setup" ]; then # PARTITION & FORMAT # SYSTEM (single drive) - if [ setupType="SEPERATE-SYSTEM" ]; then + if [ "${setupType}"="SEPERATE-SYSTEM" ]; then echo "# SYSTEM" echo "# .. partitioning" sfdisk --delete /dev/${setupDevice} 2>/dev/null wipefs -a /dev/${setupDevice} 2>/dev/null parted /dev/${setupDevice} --script mklabel msdos - parted /dev/${setupDevice} --script mkpart primary fat32 1MiB 100% - wipefs -a /dev/${setupDevicePartitionBase}1 2>/dev/null - mkfs -t vfat -F 32 /dev/${setupDevicePartitionBase}1 - wipefs -a /dev/${setupDevicePartitionBase}2 2>/dev/null - mkfs -t ext4 /dev/${setupDevicePartitionBase}2 - - # STOARGE with System - elif [ setupType="STORAGE" ] && [ ${setupBootFromStorage} -eq 1 ]; then - echo "# STORAGE (with system)" - echo "# .. partitioning" - sfdisk --delete /dev/${setupDevice} 2>/dev/null - wipefs -a /dev/${setupDevice} 2>/dev/null - parted /dev/${setupDevice} --script mklabel msdos parted /dev/${setupDevice} --script mkpart primary fat32 1MiB 513MiB parted /dev/${setupDevice} --script mkpart primary ext4 541MB 100% + wipefs -a /dev/${setupDevicePartitionBase}1 2>/dev/null + mkfs -t vfat -F 32 /dev/${setupDevicePartitionBase}1 + wipefs -a /dev/${setupDevicePartitionBase}2 2>/dev/null + mkfs -t ext4 /dev/${setupDevicePartitionBase}2 + + # STOARGE with System + elif [ "${setupType}"="STORAGE" ] && [ ${setupBootFromStorage} -eq 1 ]; then + echo "# STORAGE (with system)" + echo "# .. partitioning" + sfdisk --delete /dev/${setupDevice} 2>/dev/null + wipefs -a /dev/${setupDevice} 2>/dev/null + parted /dev/${setupDevice} --script mklabel msdos + parted /dev/${setupDevice} --script mkpart primary fat32 1MiB 513MiB + parted /dev/${setupDevice} --script mkpart primary ext4 541MB 65GB + parted /dev/${setupDevice} --script mkpart primary ext4 65GB 100% echo "# .. formating" wipefs -a /dev/${setupDevicePartitionBase}1 2>/dev/null mkfs -t vfat -F 32 /dev/${setupDevicePartitionBase}1 @@ -651,7 +653,7 @@ if [ "$1" = "setup" ]; then mkfs -t ext4 /dev/${setupDevicePartitionBase}3 # STOARGE (single drive OR host for seperate data & system) - elif [ setupType="STORAGE" ] && [ ${setupBootFromStorage} -eq 0 ]; then + elif [ "${setupType}"="STORAGE" ] && [ ${setupBootFromStorage} -eq 0 ]; then echo "# STORAGE" echo "# .. partitioning" sfdisk --delete /dev/${setupDevice} 2>/dev/null @@ -663,7 +665,7 @@ if [ "$1" = "setup" ]; then mkfs -t ext4 /dev/${setupDevicePartitionBase}1 # DATA (single drive) - elif [ setupType="SEPERATE-DATA" ]; then + elif [ "${setupType}"="SEPERATE-DATA" ]; then echo "# DATA" echo "# .. partitioning" sfdisk --delete /dev/${setupDevice} 2>/dev/null