Updated November 2026 · Arch Linux · systemd-boot · LUKS2 · about 10 minutes

Full-disk encryption protects your data if a laptop is lost or stolen, but typing a long passphrase on every boot gets old quickly. A TPM 2.0 chip can hold the unlock key and release it only when the machine boots the way it was set up to, so the disk unlocks by itself and the passphrase stays as a backup.

Before you start: this guide assumes an existing LUKS2-encrypted root partition, a UEFI system with a TPM 2.0 chip, and an Arch install that uses the systemd initramfs hooks. Substitute your own device names throughout. Have a backup of anything you cannot afford to lose.

1. Check the hardware

Confirm the system can see a TPM 2.0 device and that your disk uses LUKS2.

terminal
systemd-cryptenroll --tpm2-device=list
sudo cryptsetup luksDump /dev/nvme0n1p2 | grep -i version

The first command should list a device such as /dev/tpmrm0. The second should show Version: 2. If either fails, stop here.

2. Create a recovery key first

Do this before anything else. If the TPM ever refuses to unlock the disk, the recovery key is how you get back in.

terminal
sudo systemd-cryptenroll /dev/nvme0n1p2 --recovery-key

Save it properly. Write the key down or put it in a password manager. Do not leave it only on the encrypted disk it unlocks.

3. Enrol the TPM

This seals a new key slot to the TPM, tied to PCR 7 (the Secure Boot state).

terminal
sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=7 /dev/nvme0n1p2

You will be asked for your existing passphrase. To require a PIN at boot as well (recommended for laptops, see the security note below), add --tpm2-with-pin=yes.

4. Tell the initramfs to use it

Make sure your hooks in /etc/mkinitcpio.conf use the systemd-based set, including sd-encrypt:

/etc/mkinitcpio.conf
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)

Then create /etc/crypttab.initramfs so the TPM is tried automatically. Use your partition's UUID (blkid shows it):

/etc/crypttab.initramfs
root  UUID=your-partition-uuid-here  -  tpm2-device=auto

If you boot a Unified Kernel Image with its options in /etc/kernel/cmdline (as in the runbooks at the bottom of this page), you can instead add rd.luks.options=tpm2-device=auto to that line. Either way, the name you give the unlocked volume must match your root= setting. Rebuild the initramfs:

terminal
sudo mkinitcpio -P

5. Reboot and test

Restart. The disk should unlock without a passphrase prompt (or ask only for the PIN if you set one). Test the fallback too: boot once and enter your passphrase to be sure it still works.

If it stops working later

PCR 7 changes if Secure Boot keys or settings change, which can happen after some firmware updates. The disk will then ask for the passphrase or recovery key instead. Unlock with that, then re-enrol:

terminal
sudo systemd-cryptenroll --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=7 /dev/nvme0n1p2

A note on security

With TPM-only unlock and no PIN, anyone who has your whole laptop can boot it as far as the login screen, because the disk unlocks by itself. Your login password then protects your session, but the encryption is no longer the barrier. For a laptop that travels, enrol with a PIN. This approach also assumes Secure Boot is enabled; without it, PCR 7 says very little about what was booted.

Go further: the full PDF runbooks

This page covers adding a TPM to an install you already have. For a complete build, or for Ubuntu and Fedora, use these printable runbooks.