fixed autosetup cryptenroll

main
The_miro 2025-11-29 02:32:38 +01:00
parent 46d9771fc4
commit 63c7a288be
1 changed files with 7 additions and 5 deletions

View File

@ -49,13 +49,15 @@ echo "Encrypting root partition with LUKS..."
cryptsetup luksFormat "$ROOT_PART" --type luks2 cryptsetup luksFormat "$ROOT_PART" --type luks2
cryptsetup open "$ROOT_PART" cryptroot cryptsetup open "$ROOT_PART" cryptroot
# Add multiple FIDO2 keys for LUKS # Add multiple FIDO2 keys for LUKS
if [[ "$FIDO_ROOT" == "yes" ]]; then if [[ "$FIDO_ROOT" == "yes" ]]; then
read -rp "How many FIDO2 keys for LUKS unlocking? " FIDO_LUKS_COUNT systemd-cryptenroll "$ROOT_PART" --fido2-device=auto
for ((i=1; i<=FIDO_LUKS_COUNT; i++)); do # read -rp "How many FIDO2 keys for LUKS unlocking? " FIDO_LUKS_COUNT
echo "Insert FIDO2 key #$i and touch it when prompted..." # for ((i=1; i<=FIDO_LUKS_COUNT; i++)); do
cryptsetup luksAddKey "$ROOT_PART" --fido2-device=auto # echo "Insert FIDO2 key #$i and touch it when prompted..."
done # syste "$ROOT_PART" --fido2-device=auto
# done
fi fi
# Format encrypted root as Btrfs and create subvolumes # Format encrypted root as Btrfs and create subvolumes