0

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.

  • You have to write a custom initramfs or modify the one you have - See http://blog.bodhizazen.com/linux/initramfs/ and https://wiki.ubuntu.com/Initramfs and https://askubuntu.com/questions/777260/how-to-repack-initrd-img – Panther Jun 15 '18 at 14:50
  • @Panther thanks for the insight. Very interesting stuff, looks like I've got my work cut out ahead of me lol. If you make this an answer I'm more than happy to accept it. – user3303504 Jun 16 '18 at 12:29
  • Good luck. It would be more a duplicate than an answer – Panther Jun 16 '18 at 12:41
  • @Panther OK, I'll see what I eventually come up with and post something a bit more substantial once I've gotten somewhere =) – user3303504 Jun 16 '18 at 15:42

0 Answers0