I'm trying to learn about the boot procedure when dealing with LUKS encrypted partitions (specifically, when root is encrypted still) so that I can implement custom decryption routines (for example: accepting a password only if CTRL+C is being held; unlocking a non-root partition first to run encrypted scripts; using hardware ID's as keys; etc.). There's no real purpose behind this beyond learning new things (and taking the plunge into the deep end when things don't make much sense).

I'm very much new to this and am kind of at a loss as to where I should even be looking to learn whether what I want to do is even possible. At first, I thought that learning how to use USB key-files might be a good entry point, but then I read "... I had no way to provide the keyfile for unlocking the root partition at boot..." and figured that I was probably barking up the wrong tree.

My current understanding is that, at this point, the kernel is running but, because the root partition is encrypted, I don't have access to most standard functions or directories. This leads me to assume that I'd just need to talk to the kernel directly... and this is where I get lost.

I'm currently working on Ubuntu 18.04, but can switch to 16.04 if it would make life easier. I'm also tinkering inside of a VirtualBox instance before hopping onto a laptop to verify solutions (if I find any), just because it's easier and faster.

Thank you in advance, any help or insights will be greatly appreciated.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.