I'd like to have the following:

  1. P1: Ubuntu A
  2. P2: Documents & Files for Ubuntu A
  3. P3: Ubuntu B

Ubuntu A along with documents & files A will be used for my personal stuff and in case I need to reinstall Ubuntu or change to another distro I don't want to lose the files hence the separate partition. Ubuntu B will be used for work and I don't care about losing files there, so no need for a separate partition.

I want to encrypt Ubuntu A + files A partitions with the same password, and Ubuntu B with a different password. I want at boot to be asked which of the 2 Ubuntu's I want to boot into.

I have installed one Ubuntu (and used LVM if that matters) and encrypted it - it seems to have encrypted the whole disk. So how do I proceed from here? I've never done this and I didn't find ANY guides on how to do this. In fact, that's my very first contact with a linux distro, apart from some light testing on a VM.

  • LVM uses full drive encryption. You can't have different passwords. – GabrielaGarcia Apr 12 at 18:24
  • OK. So how do I do it? What's the structure that I need? – kat Apr 12 at 19:10
  • Why can you not add volumes into the LVM and put another install into another volumes. Do not know LVM, but its volumes are somewhat like partitions and you do not have to have just the two defaults. – oldfred Apr 12 at 21:52
  • Because I have no idea how it should all be done, that's why I'm asking. I need some more definitive guide, not just suggestions. – kat Apr 13 at 18:25

First of all, try all this in a VM as you said you have practice with.

In the installing process, you could use LVM (the setup force you to if you want encryption) with multiple LVM groups so you could set a different password for each.

That said, personally I dislike LVM, it adds another layer of complexity I disagree with (even if others said it "helps" you, I only faced problems, specially with some privative drivers) so I could recommend you to setup Ubuntu A and B normally, and encrypt the data partuition with LUKS via cryptsetup.

  • So install without encryption, then encrypt from within the OS? How about encrypting Ubuntu A + Files&Docs A with the same password and having Files&Docs A mounted on Ubuntu A's startup - is that possible? Also is there a GUI for LUKS instead of using cryptsetup via console? – kat Apr 12 at 20:27
  • @kat To the first, it is possible with LVM during the installation process, using LVM groups as I said; to the second, I believe there are GUIs, as Gnome have one, but apologize because I do not know the name of the package/app, sorry. – David Tabernero M. Apr 12 at 20:32
  • And in case I choose not to use LVM - how would I mount the Files&Docs partition along with Ubuntu A install? – kat Apr 13 at 18:26
  • When opening the encrypted partition, cryptsetup (which I believe is also who works under the hood in the GUI way) asks for the un-encryption passphrase. Of course you can automate it by writing it in a file and starting this command when the system boots with cryptsetup open --key-file=/your/file ... but I also would not recommend as writing a pass in a plain text file is a security risk. – David Tabernero M. Apr 14 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.