From d1deb4b4c602619f0c967d2cc21a03fe36f8ca8c Mon Sep 17 00:00:00 2001 From: Phillip Date: Sat, 7 Sep 2024 20:17:57 +0100 Subject: [PATCH] Fix issue with mounting optional home partition --- scripts/0-install.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/0-install.sh b/scripts/0-install.sh index 8cd60c6..28526d0 100644 --- a/scripts/0-install.sh +++ b/scripts/0-install.sh @@ -19,19 +19,6 @@ case $yesno in ;; * ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";; esac -# Ask if a home partition should be created -read -p "Do you wish to set a home partition? " yesno -case $yesno in - [yesYesYy]* ) - read -p 'Please enter the drive value for the home partition, this partition will be wiped: ' homepar - mkfs.ext4 /dev/$homepar - mount /dev/$homepar /mnt/home - ;; - [noNoNn]* ) - echo "A home partition will not be used in this installation" - ;; - * ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";; -esac # Get user credentials read -p "Please enter a username " username read -p "Please enter a password " password @@ -49,6 +36,19 @@ pacstrap -i /mnt base base-devel linux linux-firmware linux-headers intel-ucode # Create the /boot/efi directory and mount the EFI partition to it mkdir /mnt/boot/efi mount /dev/$efipar /mnt/boot/efi +# Ask if a home partition should be created +read -p "Do you wish to set a home partition? " yesno +case $yesno in + [yesYesYy]* ) + read -p 'Please enter the drive value for the home partition, this partition will be wiped: ' homepar + mkfs.ext4 /dev/$homepar + mount /dev/$homepar /mnt/home + ;; + [noNoNn]* ) + echo "A home partition will not be used in this installation" + ;; + * ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";; +esac # Generate a fstab file genfstab -U /mnt >> /mnt/etc/fstab # Copy system config files into the new install