documentation/docs/alpine-desktop-setup/post-install/automatic-decryption.md

23 lines
891 B
Markdown
Raw Normal View History

2023-12-27 15:07:54 +01:00
# Automatic decryption
Our system can utilize it's TPM2 to automatically decrypt. This can be done because the bootchain is secure and it's a bit tedious to enter an encryption password everytime the system boots up.
2024-04-01 13:54:50 +02:00
If `home-manager` was installed correctly then it should have also installed both `clevis` and `tpm2-tools`. This allows for the binding of the LUKS volume to TPM with clevis:
2023-12-27 15:07:54 +01:00
```
2024-03-24 17:50:49 +01:00
# clevis luks bind -d /dev/<disk2> tpm2 '{"pcr_bank":"sha256","pcr_ids":"0,1,5,7"}'
2023-12-27 15:07:54 +01:00
```
After rebooting it should automatically decrypt your disk.
2024-04-01 13:54:50 +02:00
Clevis can be envoked again if you have made any changes to secureboot or to the system and it doesn't automatically decrypt the disk.
2023-12-27 15:07:54 +01:00
2024-04-01 13:54:50 +02:00
First find the keyslot clevis is using and then regenerate the key:
2023-12-27 15:07:54 +01:00
```
# cryptsetup luksDump /dev/<disk2>
# clevis luks regen -d /dev/<disk2> -s <keyslot>
```
2024-04-01 13:54:50 +02:00
If done correctly it should now work again.