aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-03-25 19:39:16 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2023-03-25 19:39:16 +0100
commitf8ed4a047837e20cec83c01b94ed09bb65f0e872 (patch)
treeaf9a32c5c790d4e354f31491de698977b75ba61e
parent0590a080e80845f63c90c4e9c13b33a53e6904e5 (diff)
fix no root uuid bug
-rwxr-xr-xnais2
1 files changed, 1 insertions, 1 deletions
diff --git a/nais b/nais
index 0ee12cc..d716565 100755
--- a/nais
+++ b/nais
@@ -85,6 +85,7 @@ install_arch() {
btrfs subvolume create /mnt/home || exit
uuid=$(lsblk --raw -o PATH,UUID | grep "$root" | awk '{ print $2 }')
+ export ROOTUUID="$uuid"
printf "%s" "$PASSWORD" | cryptsetup luksFormat --type luks1 "$boot" || exit
printf "%s" "$PASSWORD" | cryptsetup open "$boot" boot || exit
@@ -119,7 +120,6 @@ install_arch() {
arch-chroot /mnt useradd -G wheel "$USERNAME" -p "$PASSWORD" || exit
echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub
- echo sed: "s/\(GRUB_CMDLINE_LINUX=\".*\)\"/\1 cryptdevice=UUID=$ROOTUUID:root cryptkey=UUID=$KEYUUID:btrfs:\/.keys\/$KEYFILE\"/g"
sed -i "s/\(GRUB_CMDLINE_LINUX=\".*\)\"/\1 cryptdevice=UUID=$ROOTUUID:root cryptkey=UUID=$KEYUUID:btrfs:\/.keys\/$KEYFILE\"/g" /mnt/etc/default/grub
if [ "$BOOT_MODE" = "bios" ]; then