Fix issue with mounting optional home partition

This commit is contained in:
Phillip 2024-09-07 20:17:57 +01:00
parent 195a954060
commit d1deb4b4c6

View File

@ -19,19 +19,6 @@ case $yesno in
;; ;;
* ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";; * ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";;
esac 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 # Get user credentials
read -p "Please enter a username " username read -p "Please enter a username " username
read -p "Please enter a password " password 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 # Create the /boot/efi directory and mount the EFI partition to it
mkdir /mnt/boot/efi mkdir /mnt/boot/efi
mount /dev/$efipar /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 # Generate a fstab file
genfstab -U /mnt >> /mnt/etc/fstab genfstab -U /mnt >> /mnt/etc/fstab
# Copy system config files into the new install # Copy system config files into the new install