How to create an LVM-Luks encrypted partition?


#1

I want to install the operating system. I want to have a separate root partition and a home partition and have them both encrypted. I believe I have to create an LVM parition and encrypt it and inside this partition I have to put two additional partitions which can be the root and home partition.

How would I do this? I tried using the terminal but I am too confused as to what is going on. Is there a GUI software that can help me achieve this that I can install in live session?

Or if somebody could please explain me what is going on when using the terminal.

So after creating lvm partition using gparted, I then use terminal and type this sudo cryptsetup --type luks luksFormat /dev/sda2 and then I would be prompted for a password. After entering it in, then the drive is encrypted. So I then decrypted the drive again sudo cryptsetup --type luks /dev/sda2 crypt then I believe I have to then create a physical volume by typing in pvcreate /dev/mapper/crypt or something like that. I am not too sure after that what I have to do and I don’t quite understand what is going on and why I have to create a physical volume, how does it differ to a partition, and why is it that everything is going into the /dev/mapper/ directory?