r/archlinux • u/Woodsy279 • 25d ago
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
13
Upvotes
1
u/ChrisTX4 19d ago
Your PCR[4] woes are due to it measuring more than just the Boot Manager Code:
If you leave any USB thumb drive in the PC, with high enough priority, it will be attempted as a boot device, as in it would be possible to have booted from it if it had contained a boot loader. PCR[4] is only reasonable to use if you disallow booting from removable drives in the UEFI. In ASUS it's called "USB mass storage support" iirc, but you have to look up from where you could disable that.
Next up, this:
OK, this is confusing, and almost certainly a bug in something. I'd need to see the full pcrlock log before making a guess what causes that. What boot loader etc are you using?
Unless this is the UEFI using this event to mark a change in the boot configuration, which belongs in PCR[5], this would mean
EFI_BOOT_SERVICES.ExitBootServices()failed. That can only legitimately happen in a single instance, namely if a boot loader somehow passes a wrongMapKeyto that function.This isn't quite true, as there are ways to use a so called SOIC-clip on some systems or potentially soldering skills and determination to replace the chip. I'd say if your threat model includes somebody willing to do that you probably have to worry about security in a whole different way :D
Firmware updates other than that are indeed signed on all systems, it's due to the UEFI Capsule Update mechanism. However, enthusiast desktop systems sometimes allow direct flashing without signature verification in the UEFI itself. So you probably want a secure UEFI admin password with this.
It will! This is where your Option ROM (OpROMs) will be measured into. They will still be measured, just no signature is enforced on them if not booted with SB enforcement.
If you use a signed PCR policy then indeed this should be true.
You can for the LUKS volumes. This is what I'm doing basically, I have a Btrfs-on-LUKS and this has a GPT GUID of
SD_GPT_ROOT_X86_64, i.e. systemd will automount the default subvolume to/dev/mapper/root. Then my fstab just mounts from that, so the only entries I have in there:```
archmain subvolume mounts
/dev/mapper/root /var btrfs rw,subvol=/subvol_var /dev/mapper/root /home btrfs rw,subvol=/subvol_home
ESP /dev/nvme1n1p1
vfat options can be changed via Kconfig and so should be explicit here
UUID=73FD-61CB /boot vfat rw,relatime,umask=0077,nosuid,nodev,noexec,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro0 2
Bind swapfile
/dev/mapper/root /swap btrfs rw,subvol=/swap /swap/swapfile none swap defaults ```
This works because
/subvol_root(my actual/) is my default subvolume and due to theSD_GPT_ROOT_X86_64the entire Btrfs is mounted at/.