- Ubuntu 24.04.3 (kernel 6.8 + systemd 255)
- A LUKS2-formatted encrypted root or data device
- A visible TPM 2.0 device (
/dev/tpmrm0) - Sudo privileges
sudo apt update
sudo apt install -y clevis clevis-tpm2 clevis-initramfs tpm2-toolsThese provide TPM2 support and add Clevis hooks to your initramfs.
ls /dev/tpm*
sudo tpm2_getcap pcrs | grep -A5 "sha"✅ You should see /dev/tpmrm0 and PCR banks such as sha256.
Replace /dev/sda3 with your encrypted partition:
sudo clevis luks bind -d /dev/sda3 tpm2 '{"pcr_bank":"sha256","pcr_ids":"7"}'- Enter your existing LUKS passphrase when asked.
- On success, you’ll see:
Successfully bound device /dev/sda3 with TPM2
PCR 7 measures Secure Boot state — safe and reliable for most setups.
Make sure the Clevis unlock logic is included at boot:
sudo update-initramfs -uReboot your system:
sudo reboot✅ If the TPM and PCR values match, the disk unlocks automatically. ❌ If the TPM can’t unseal (PCR mismatch, TPM cleared, etc.), you’ll be asked for your passphrase.
After boot:
sudo clevis luks list -d /dev/sda3You’ll see a JSON entry showing the TPM2 binding.
| Purpose | Tool | Works on 24.04.3? |
|---|---|---|
| TPM auto-unlock | Clevis TPM2 | ✅ Stable |
| systemd TPM unlock | systemd-cryptenroll |
|
Token listing (--list) |
systemd-cryptenroll --list |
❌ Unavailable |
| Initramfs framework | Legacy (initramfs-tools) |
✅ Used by Clevis hooks |
sudo apt install -y clevis clevis-tpm2 clevis-initramfs tpm2-tools
sudo clevis luks bind -d /dev/sda3 tpm2 '{"pcr_bank":"sha256","pcr_ids":"7"}'
sudo update-initramfs -u
sudo rebootThat’s it — your Ubuntu 24.04.3 system now uses the TPM 2.0 to automatically unlock the encrypted disk at boot.