diff --git a/0-preinstall.sh b/0-preinstall.sh index 5e07962..64eb1b2 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -79,7 +79,7 @@ if [[ "${DISK}" == "nvme" ]]; then # enter luks password to cryptsetup and format root partition echo -n "${luks_password}" | cryptsetup -y -v luksFormat ${DISK}p3 - # open luks container and ROOT will be place holder - cryptsetup open ${DISK}p3 ROOT + echo -n "${luks_password}" | cryptsetup open ${DISK}p3 ROOT - # now format that container mkfs.btrfs -L ROOT /dev/mapper/ROOT # create subvolumes for btrfs @@ -109,8 +109,8 @@ else elif [[ "${FS}" == "luks" ]]; then mkfs.vfat -F32 -n "EFIBOOT" ${DISK}2 echo -n "${luks_password}" | cryptsetup -y -v luksFormat ${DISK}3 - - cryptsetup luksOpen ${DISK}3 ROOT - mkfs.ext4 -L ROOT /dev/mapper/ROOT + echo -n "${luks_password}" | cryptsetup open ${DISK}3 ROOT - + mkfs.btrfs -L ROOT /dev/mapper/ROOT mount -t btrfs /dev/mapper/ROOT /mnt btrfs subvolume create /mnt/@ btrfs subvolume create /mnt/@home diff --git a/1-setup.sh b/1-setup.sh index 0c9d614..1633cda 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -119,6 +119,13 @@ if [ $(whoami) = "root" ]; then else echo "You are already a user proceed with aur installs" fi +if [[ ${FS} == "luks" ]]; then +# Making sure to edit mkinitcpio conf if luks is selected +# add encrypt in mkinitcpio.conf before filesystems in hooks + sed -i 's/filesystems/encrypt filesystems/g' /etc/mkinitcpio.conf +# making mkinitcpio with linux kernel + mkinitcpio -p linux +fi echo -ne " ------------------------------------------------------------------------- SYSTEM READY FOR 2-user.sh