Part 1a - A bit on encryption (LUKS) and LVM when installing

Created Thursday 06 December 2018

Other considerations: Full disk encryption and Logical Volume Management. Full disk encryption (LUKS, in Linux parlance) is pretty simple. ideally, no one accesses any of your data on your computer without the password. You'd think that's what the usual "password" on most computers regardless of OS would do, but no, this comes before that.

The other is Logical Volume Management. Whenever you install an OS on a computer, sometimes its useful or necessary to virtually "chop up" the hard drive into "partitions," which, to the computer, look like separate hard drives. One use of this is the above encryption — you first boot into a small "starter" OS to do the short job of decrypting everything else. Another might be to dual boot or multi boot different operating systems, and yet another might be just to mentally organize your stuff. As you can imagine, "partitioning" is a low-level, permanent-ish kind of thing...

..unless you're using only Linux and not dual-booting. Which I'm not. So, instead of partitions, I can use Logical Volumes. Basically the same thing, but you can move them around and change them on the fly. This is useful because I don't yet know how much space I want to allocate for my music and such, and also I can leave open the possibility of multiple Linux distros (again, but not windows).

My first plan was to try to do all of the Logical + Encryption stuff on the command line...and I couldn't get it going. So, I did a much simpler thing.

I started with Ubuntu which has a very simple install method for this: During the install you simply check both the boxes like below:

This will erase the entire disk and destroy everything, but it will also do all the magic weirdness required to have both encryption and LVM and get past weird UEFI stuff. It just works.

The only issue is, LVM created one new big root volume and installed ubuntu on it. So the next thing I did was boot back into the Live CD and used the command-line to resize the big LV down to about 150g and created a new 500g "data" LV. I left some unused on purpose; later I can allocate some of that space to these drives, or make a new one, or add another flavor of Linux or whatever.

Something like this:

..and I just learned that there's probably a visual way to do this - untested: -

Backlinks: Home:Linux and the answer to life Home:Linux and the answer to life:Part 1 - The Install