Before you start
This page deliberately skips MOK/DKMS enrollment, UKIs, IMA, and the systemd-cryptenroll alternative. If you need any of those, go to the full Secure Boot Lab instead — sections 5, 6, 10, and 13.
1. BIOS/firmware baseline
Enter BIOS setup and confirm:
- Boot mode: UEFI only (Legacy/CSM disabled).
- Secure Boot: enabled, with the Microsoft UEFI CA key enabled.
- TPM: present and enabled. Do not clear it.
- Storage controller: standard NVMe/AHCI exposure (no RAID/RST mode).
Full rationale and the complete settings table: Secure Boot Lab §2.
2. Install Debian with LUKS2
- Boot the Debian installer in UEFI mode.
- If the installer fights with Secure Boot, disable it temporarily for install only.
- Choose guided encrypted LVM (or manually create a LUKS2 container with LVM inside).
- EFI System Partition mounted at
/boot/efi; a separate unencrypted/boot. - Set a strong LUKS passphrase — this is your recovery path. Keep it.
- Finish installation and boot into Debian.
Confirm LUKS2 after first boot
lsblk -o NAME,PATH,TYPE,FSTYPE,FSVER,SIZE,MOUNTPOINTS,UUID
export DEV=/dev/nvme0n1p3 # adjust to your crypto_LUKS partition
sudo cryptsetup luksDump "$DEV" | head -5
You want to see Version: 2, not Version: 1.
3. Enable Secure Boot
sudo apt update
sudo apt install shim-signed grub-efi-amd64-signed mokutil
sudo update-grub
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck
mokutil --sb-state
Expect: SecureBoot enabled.
4. Install Clevis
clevis package alone
does not provide clevis luks ... — that's a separate package, and the TPM2 pin is
another. Skipping either one now means clevis luks list fails later with a
confusing "invalid command" error instead of a clear "not installed" message.
sudo apt update
sudo apt install clevis clevis-luks clevis-tpm2 clevis-initramfs tpm2-tools
Confirm the TPM2 pin actually works
ls -l /dev/tpmrm0 /dev/tpm0 2>/dev/null
echo test | clevis encrypt tpm2 '{}' >/dev/null && echo "TPM2 pin OK"
If that prints 'tpm2' is not a valid pin! instead of TPM2 pin OK,
clevis-tpm2 did not install correctly — reinstall it before continuing.
5. Find the LUKS partition
lsblk -o NAME,PATH,TYPE,FSTYPE,FSVER,SIZE,MOUNTPOINTS,UUID
export DEV=/dev/nvme0n1p3 # the parent partition with FSTYPE=crypto_LUKS
/boot, /dev/mapper/vg-root,
or a mount point like /. The correct target is the crypto_LUKS
partition itself, one level below the physical disk. Full disambiguation table:
Secure Boot Lab §8.
6. Bind to TPM2
Start with PCR 7 only. It binds unlock to Secure Boot policy without dragging in firmware/device/initramfs measurements that are likely to shift during ordinary maintenance — the safest starting policy, and the one this guide's companion kernel update procedure assumes you're running.
sudo clevis luks bind -y -d "$DEV" tpm2 '{"pcr_bank":"sha256","pcr_ids":"7"}'
sudo update-initramfs -u -k all
sudo clevis luks list -d "$DEV"
The list output should now show one tpm2 slot. Do not remove the
passphrase slot you set during install — Clevis adds an unlock method, it does not replace
the human recovery path.
7. Verify
- Cold boot. Confirm no disk passphrase prompt.
- Cold boot a second time. Confirm no prompt.
- Warm reboot. Confirm no prompt.
- Confirm the passphrase still works:
sudo cryptsetup open --test-passphrase "$DEV"
If any boot prompts for the passphrase, see Secure Boot Lab §15.
What's next
- Doing a kernel update? Use the PCR Guide — it assumes exactly the PCR-7 baseline this page just created.
- Want the moderate (PCR 4,7) or strict 8-PCR policy once the system has settled? See Secure Boot Lab §9.
- Need MOK/DKMS signing, UKIs, IMA, or systemd-cryptenroll instead of Clevis? See the full Secure Boot Lab.