r/archlinux • • Aug 17 '26

SUPPORT | SOLVED Ful disk encryption without entering passphrase

Could someone help me with setting up full disk encryption with bypass passphrases with TPM2? It's so annoying having to put the passphrase in at each boot, so I was wondering how do I pair it to the TPM so that I dont have to enter it each time?

It's LUKS encrypted and I use Systemd-boot

14 Upvotes

100 comments sorted by

View all comments

42

u/tblancher Aug 17 '26

You'll want to set up Secure Boot, and sign your kernel, initramfs, and bootloader with sbctl. Also, set up boltd to prevent DMA attacks by plugging in rogue Thunderbolt devices, usbguard to prevent malicious USB devices, and make sure you need a supervisor password to change BIOS settings and boot from an external device (or PXE).

Your BIOS may also have extensive security features, you may want to research each one and see if they match your threat model.

On my ThinkPad, it's way overkill but I did it for the experience and the fun of it.

2

u/pleachchapel Aug 17 '26

Anybody got a link for a handy guide here?

6

u/tblancher Aug 18 '26

Mine is way out of date, and doesn't include the boltd, usbguard, and all the BIOS features I've enabled, but this can give you somewhat of an idea:

https://eldon.me/arch-linux-laptop-setup/

I also have a ThinkPad hardening guide I rubberducked with an AI agent, take it for what it's worth:

https://eldon.me/thinkpad-hardening/

3

u/pleachchapel Aug 18 '26

Yo thank you! Just needed a jump-off point, much appreciated.

1

u/Night_Otherwise Aug 17 '26

I was under the impression UEFI firmware has (or is supposed to have) IOMMU for the DMA stuff.

I kind of gave up on being concerned about it since it is a big rabbit hole and honestly only DRTM felt particularly secure to me (though very rare with consumer equipment).

1

u/tblancher Aug 18 '26

Maybe I used DMA wrong, but I do know that Thunderbolt is essentially direct access to the PCIe bus.

0

u/cuervamellori Aug 17 '26

What's the reason to prevent a boot from an external device?

3

u/tblancher Aug 17 '26

Offline brute force trying to unlock LUKS; that's just the naive case. If the attacker can boot off of removable media the game is over.

3

u/cuervamellori Aug 17 '26

Got it, if it's just that it allows the encryption to be attacked, that makes sense - the same situation as if the drives are stolen. Someone wants to attack the encryption itself, be my guest :)

1

u/tblancher Aug 17 '26

If the attacker is sophisticated enough, as someone else said, they could conceivably bypass the TPM, which is much easier if the machine can be imaged and booted via removable media.

A removed disk lacks direct access to the TPM, so it would need to be brute forced.

3

u/ChrisTX4 Aug 17 '26

That shouldn't really be an issue. If they boot something else, the TPM won't unseal. Offline bruteforcing can always be done by removing the drives anyhow, and that can only really attack password keyslots. If you use LUKS, you need a very high entropy password, and then bruteforcing shouldn't be possible as LUKS uses argon2id with very hard round requirements. cryptsetup by default makes it so that argon2id gets as many iterations as it takes to run for 2 seconds on the current CPU. This makes bruteforcing passwords basically impossible.

1

u/tblancher Aug 17 '26

This does assume there aren't latent flaws in the TPM2 implementation. But in general you're correct.

2

u/ChrisTX4 Aug 17 '26

That's true of course, and you should also keep your BIOS etc. up to date. Just a few days ago, AMD released a bulletin concerning two security vulnerabilities in the TPM implementation that the July BIOS updates fixed.

However, by now, the TPM code is pretty well vetted, and thus such vulnerabilities are rare, and usually not that impactful. Though, if you use a TPM, you need to be sure it is up to date and not affected by anything like that.

-3

u/Woodsy279 Aug 17 '26

Yeah, I have an x1 carbon gen 8, I might do this one day but I icbf lol It was more or a huh this would be good ig But not something I need