diff --git a/steps/30-formatting.step b/steps/30-formatting.step index f42ff21..8a08823 100755 --- a/steps/30-formatting.step +++ b/steps/30-formatting.step @@ -9,6 +9,7 @@ read answer if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then echo "~> There are close to no reasons to not do this, but hey, you're an adult." rootformat=${blockdevice}2 + didCrypt=0 else echo "~> Formatting root (/) for crypto" cryptsetup -v luksFormat ${blockdevice}2 @@ -17,6 +18,7 @@ else echo "~> Open the crypt container" cryptsetup luksOpen ${blockdevice}2 cryptroot rootformat=/dev/mapper/cryptroot + didCrypt=1 fi echo "~> Formatting $rootformat EXT4" diff --git a/steps/50-configure.step b/steps/50-configure.step index 322ed98..2529a97 100755 --- a/steps/50-configure.step +++ b/steps/50-configure.step @@ -26,7 +26,10 @@ else arch-chroot /mnt grub-install --target=i386-pc /dev/*da fi -echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub +if [ "$didCrypt" -eq 1 ]; then + echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub +fi + arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg echo "~> Patching mkinitcpio.conf for encryption magic"