Skip to content

Instantly share code, notes, and snippets.

@Nullcaller
Nullcaller / uunlk.md
Last active May 11, 2024 09:27
USB-key unlock on Ubuntu Server 22.04 LTS

Unlock rootfs and Encrypted Drives with a USB Flash Drive [Linux/Ubuntu Server 22.04 LTS]

Setting up full disk encryption for Ubuntu is pretty straightforward. Enter all the neccessary info during instllation, and it magically works. But if you want to use a USB key not to enter the passphrase each and every time you boot your machine, as you would want to do with, say, a server, things quickly get really complicated.

But be not afraid, for you have found the right place to make it just a little bit easier. Join me, on this journey of frustration, bitter disappointment, and, as is always the case with linux, new knowledge.

Also, I should note, while using sudo -s generally is a bad idea, you might consider doing that, as pretty much all commands here require root access anyway. You'll just be typing five extra characters per command.

Setting up USB Unlock for rootfs