The ‘LUKS Password Prompt’ Nightmare Every Morning
I’ve been using Fedora as my primary workstation for over 2 years. Everything was great until I had to face that black screen demanding a LUKS password every single boot. If you set a 20+ character password for maximum security, mistyping and re-typing it becomes a real time-sink.
After 6 months of using the TPM 2.0 auto-unlock feature on my ThinkPad, I’m convinced this is the ultimate solution. Your data remains secure. However, instead of waiting to type a password, you just hit the power button and go brew a cup of coffee. By the time you’re back, you’re already at the GNOME login screen.
Quick Start: Set Up in 5 Minutes
For those who want instant results, here is the streamlined process to get it running right away.
Step 1: Install Tools
Fedora uses clevis to ‘talk’ to the TPM chip. Open your terminal and install this toolkit:
sudo dnf install clevis clevis-luks clevis-dracut -y
Step 2: Find the LUKS Partition
You need to identify which drive is locked. Use the command lsblk -f to inspect:
lsblk -f
Look for the crypto_LUKS line. Usually, it’s /dev/nvme0n1p3 on modern laptops or /dev/sda3 for older SSDs.
Step 3: ‘Marry’ LUKS to the TPM 2.0 Chip
Run the command below to bind the key (replace with the correct partition name you found):
sudo clevis luks bind -d /dev/nvme0n1p3 tpm2 '{}'
The system will ask for your current LUKS password one last time to confirm ownership.
Step 4: Update the Bootloader
To let Fedora know how to use Clevis right from startup, you need to refresh initramfs:
sudo dracut -f
Now, try rebooting. If the machine goes straight to the user login screen, you’ve succeeded!
Why is this mechanism still secure?
Many worry that auto-unlocking makes encryption useless. In reality, the TPM 2.0 chip is smarter than you think.
The Role of the TPM 2.0 Chip
The TPM is a separate security component on the motherboard. It doesn’t store your password in a traditional way. Instead, it creates a ‘digital vault’ and only releases the key when the computer’s hardware perfectly matches its original state.
PCR Mechanism: The System’s ‘Fingerprint’
This is the most crucial safeguard. The TPM chip checks PCR (Platform Configuration Registers) values—essentially the machine’s security checklist.
- Theft scenario: If a thief pulls the drive and plugs it into another machine, the PCR values will be completely different. The TPM immediately locks down and won’t release the key.
- Firmware hack scenario: If someone tries to tamper with the BIOS to boot a suspicious USB, the TPM will recognize the change and refuse to auto-unlock.
By default, clevis usually relies on PCR 7 (Secure Boot state). This means it only opens the door if the machine boots the original, authentic Fedora OS.
Advanced: Customizing PCR for ‘To the Teeth’ Security
If you’re meticulous, you can specify particular PCR indices. I usually use the trio 1, 4, and 7 for the best balance:
sudo clevis luks bind -d /dev/nvme0n1p3 tpm2 '{"pcr_ids":"1,4,7"}'
- PCR 1: Monitors motherboard and chipset configuration.
- PCR 4: Checks the integrity of the Bootloader.
- PCR 7: Ensures Secure Boot is enabled.
Warning: If you update your BIOS or change Secure Boot settings, these values will change. The machine will then ask for the password manually. Just enter your old password and run the bind command again.
Real-World Experience After Six Months of ‘Going Keyless’
Working with an auto-encrypted system is a joy, but don’t forget these survival rules:
1. Never Delete the Original Password
LUKS allows storing up to 8 different keys. Clevis only takes 1 slot. Always keep a password slot that you have memorized. If the TPM chip fails or the motherboard dies, this is your only way to recover your data.
Check slot status using the command:
sudo cryptsetup luksDump /dev/nvme0n1p3
2. Back Up the LUKS Header Immediately
The Header is the ‘brain’ of the encrypted partition. If the Header is corrupted due to disk errors, all passwords become useless. Copy the backup file to a secure USB or Cloud:
sudo cryptsetup luksHeaderBackup /dev/nvme0n1p3 --header-backup-file fedora_luks_backup.img
3. Update Kernels with Peace of Mind
On Fedora, every time dnf upgrades the kernel, it automatically calls dracut to rebuild the boot configuration. Thanks to the clevis-dracut package, the auto-unlock feature remains extremely stable across updates. This is one of my favorite things about Fedora compared to other distros.
The Bottom Line
Combining LUKS and TPM 2.0 provides a professional experience comparable to BitLocker on Windows or FileVault on macOS. You get convenience while maintaining the privacy of your sensitive data. If you’re using Fedora as a workstation, you should set this up immediately to free yourself from the meaningless task of typing a password every morning.

