From f8ed4a047837e20cec83c01b94ed09bb65f0e872 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sat, 25 Mar 2023 19:39:16 +0100 Subject: fix no root uuid bug --- nais | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2