From 9f4968484cd7f996581ba9adb99aff06f5d8e93e Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Sun, 7 Nov 2021 15:21:09 -0300 Subject: [PATCH] Fix partitioning --- install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 989dadf..1883514 100755 --- a/install.sh +++ b/install.sh @@ -153,17 +153,11 @@ partition() { [ -f /bin/parted ] || download_parted local rootN - [ $UEFI -eq 0 ] && rootN=2 || rootN=3 - echo -n "Partitioning drive..." - echo -n "Configuring ROOT partition..." - quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"$rootN - quiet mount "$DRIVE_TARGET"$rootN /mnt - echo "done" - if [ $UEFI -eq 0 ]; then # Legacy + rootN=2 parted --script "$DRIVE_TARGET" \ mklabel msdos \ mkpart primary linux-swap 0% 4GiB \ @@ -171,6 +165,7 @@ partition() { echo "done" else # EFI + rootN=3 parted --script "$DRIVE_TARGET" \ mklabel gpt \ mkpart swap linux-swap 0% 4GiB \ @@ -183,7 +178,6 @@ partition() { quiet mkfs.fat -F 32 "$DRIVE_TARGET"2 fatlabel "$DRIVE_TARGET"2 BOOT mkdir -p /mnt/boot - quiet mount "$DRIVE_TARGET"2 /mnt/boot echo "done" fi @@ -191,6 +185,12 @@ partition() { quiet mkswap -L SWAP "$DRIVE_TARGET"1 quiet swapon "$DRIVE_TARGET"1 echo "done" + + echo -n "Configuring ROOT partition..." + quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"$rootN + quiet mount "$DRIVE_TARGET"$rootN /mnt + [ $UEFI -ne 1 ] && quiet mount "$DRIVE_TARGET"2 /mnt/boot + echo "done" } install_base() {