diff --git a/archinstall.sh b/archinstall.sh index 708ac7c..491e9b8 100755 --- a/archinstall.sh +++ b/archinstall.sh @@ -126,9 +126,12 @@ fi sleep 2 if [ $encryption -eq 1 ]; then - echo "Creating Encrypted Root Partition" - cryptsetup luksFormat --type luks1 --cipher aes-xts-plain64 --hash sha512 --key-size 512 "${part_root}" - cryptsetup open "${part_root}" "cryptroot" + cho "Creating Encrypted Root Partition" + read -s -r -p "Please Enter the Encryption Passhprase: " lukspw + read -s -r -p "Please Verify the Encryption Passhprase: " lukspw2 + [ "$lukspw" != "$lukspw2" ] && echo "Passphrases don't match!" && exit 1 + echo -n "$lukspw" | cryptsetup luksFormat --type luks1 --cipher aes-xts-plain64 --hash sha512 --key-size 512 "${part_root}" - + echo -n "$lukspw" | cryptsetup open --key-file - "${part_root}" "cryptroot" root_dev="/dev/mapper/cryptroot" else root_dev="${part_root}" @@ -229,3 +232,5 @@ arch-chroot /mnt /bin/passwd echo "Enabling Service" systemctl enable sshd grub-btrfs.path --root /mnt + +echo -e "\n\nInstallation finished, you may further customize it in /mnt or reboot now"