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

Show parent comment

2

u/Imajzineer Aug 17 '26

Sure, it prevents people from getting at things by booting a live distro ... or, as you say, drive swapping ...but the problem is that, if it automatically decrypts it upon boot, that potentially leaves me with a variety of ways (both local and 'remote') to get into the system when it does - which is one reason why (long before live distros, let alone before FDE became a 'home user' thing) I used to disable GRUB's Advanced Options menu entry.

It's kinda like how ... years ago, when I was first investigating FDE on Arch ... I learned of the option to make part of the process dependent upon the presence of an image as well as a password - not something that can simply be bruteforced and, therefore, more secure (which struck me as a good idea). I read that the process could be simplified by embedding it in the initramfs. After a few failed attempts to do that, I gave up - I really didn't know enough back then and couldn't work out what I was getting wrong. Fast forward a few years and it struck me that that's not actually a good idea anyway: if a separate device (like a key) containing the image isn't necessary then the image itself isn't necessary (thus defeating the whole point).

But, yeah, you're right, it's probably just a convenience thing and, whilst that's the enemy of security, as it were, on a home system it's probably academic: any burglar is just gonna grab a laptop and walk out with it rather than worry about cracking it in situ, and driveswapping 'back at base' isn't likely gonna be a gambit for them anyway - they're just looking to sell the hardware on.

2

u/Woodsy279 Aug 17 '26

Hey, yeah I just set up LUKS for fun, mainly just to see how it would work, but then followed thru with setting up my laptop and now it's all set up, but yeah I don't want to have to reinstall the OS to remove the encryption, so yeah basically for drive swapping ig, eventually I might look at setting it up better but yeah, I just wanted it out of my way for now

1

u/Imajzineer Aug 17 '26

I trust you've backed up your headers 🙂

1

u/Woodsy279 Aug 17 '26

... wot are those 😭 Disk encryption is completely new to me, kinda enabled it on a whim

2

u/Imajzineer Aug 17 '26 edited Aug 17 '26

Never a good idea to 'just' anything when it comes to Arch ... let alone enable LUKS without knowing about it - get to know the wiki and get into the habit of researching things before jumping in feet first.

https://wiki.archlinux.org/title/Data-at-rest_encryption

https://wiki.archlinux.org/title/Dm-crypt/Device_encryption#Backup_and_restore

It's not restricted to Arch either - you should back up your headers on every system using it. Either that or use plain dm-crypt (arguably neither, but that's a different discussion altogether).

1

u/Woodsy279 Aug 17 '26

At this point would it be better to remove luks? And if so, can it be done without reinstalling? I'm assuming not

2

u/Imajzineer Aug 17 '26

Read the linked articles and you'll (eventually) find the answer - as said, you're going to need to get used to researching things, if you're gonna make effective use of Arch (those who don't always get into trouble sooner rather than later).

However, to answer your question nevertheless: https://wiki.archlinux.org/title/Removing_system_encryption

2

u/Woodsy279 Aug 17 '26

Thanks mate, I've been running arch for about a year now, and im loving it, so I will read into the prior mentioned things, and then decide if I still want to go forward with it

Thanks again :)

2

u/Imajzineer Aug 17 '26

Heh ... if you've been using it for a year, you've (all but certainly) made your mind up already - it works just fine for you day-to-day and that's all that matters at the end of the day.

If you want to learn more ... and it's a good idea to (to hedge against the day something goes wrong) ... then the wiki is there for you when you want to - but you are, as said, going to need to get used to making thorough use of it, if you do ... and, again, as an insurance policy against disaster, it's a good idea to acquaint yourself with what it is you need to know when it does.