Zorin OS 16 - Creating /home partition after a LUKS installation

I am getting prepared to install the much discussed Zorin OS 16 in the near future. My understanding is that the installer will probably give the Full Disk Encryption with LUKS option, which will preclude a "something else" option where a /home partition would be created at installation. I assume the default here is to not create a seperate /home partition.

I know there is no rule that says you must have a home partition, but it is a good idea. I haven't been using linux that long and am trying to learn what I can. Swallowing my pride, I'm concerned that I'm at the stage where mistakes will happen. I never used LUKS and read a little about it and am still trying to wrap my head around it. I have the time to learn these concepts before this installation and don't really know that one even notices LUKS that much in every day operations. It's my hope that I will be able to take advantage of its features as well as the advantages of having a seperate /home partition.

It seems that I would let the installer do its LUKS installation, then immediately use the installation disk before populating the system to create a home partition by customizing the commands at Installing Ubuntu 18.04 with full disk encryption and home on its own partition | stephencox.net Do those commands make sense? (I didn't understand parts of it). Is there an easier way like a GUI interface? (My understanding is that Gparted cannot do these LUKS operations).

I am open-minded to any alternatives. Any guidance would be greatly appreciated.

Yes, the commands in the guide do make sense. Without going line by line to explain why each one does and what it does (lvreduce, for example, is Logical Volume Reduce - for shrinking the size of a logical volume), they would perform as expected - I definitely want to double check this... But I do not see anything there that should be different for an Ubuntu 20.04 build than for an 18.04 build.
There is no GUI interface for it and you are correct that Gparted cannot perform the operation because it lacks the essentials to do it. Any GUI, like Gparted, is entering the commands in much the same manner that you might be in the terminal emulator. While you may know the commands or follow a script of commands, Gparted or many other GUI applications can only enter in the commands that they are provided with by their own written application. They cannot deviate from that or add new commands that they do not know.
What this demonstrates, however, is that in reality, there is no Real Difference between you using a GUI app and using the terminal - save using the terminal allows you the full access and power of entering any command at your disposal. Using a GUI limits you to only what the GUI is programmed to use.

I would honestly ask you to review within your own knowledge whether you truly require the advantages of LUKS. Your Zorin OS is password protected; so unless you are carrying Highly Sensitive documents on a portable notebook in risky areas... An encrypted drive of such a manner can cause more problems for the user, as well. It's well protected from outsiders but also can risk being well protected from the authorized user. It applies in certain situations, but those situations generally are not daily use machines for average users.
For most- it would be massive overkill.
Only you know enough to decide if the use of a fully encrypted drive applies to you.

Blockquote
Yes, the commands in the guide do make sense. Without going line by line to explain why each one does and what it does (lvreduce, for example, is Logical Volume Reduce - for shrinking the size of a logical volume), they would perform as expected - I definitely want to double check this... But I do not see anything there that should be different for an Ubuntu 20.04 build than for an 18.04 build.

I could get my encrypted partition's counterpart in that Installing Ubuntu 18.04 with full disk encryption and home on its own partition | stephencox.net link by the pvs command, and that of the volume group by the vgs command. I don't know why that link jumped from referencing its volume group from "ubuntu-vg" to calling it "ubuntu--vg". I don't know where that "ubuntu--vg-root" came from. Somehow I need to know where the root is mapped so I can apply these commands. Also, being unsure if the Zorin OS 16 default installer uses a swap or boot partition, there is a question as to whether or not that "sudo lvcreate -n home -l 100%FREE ubuntu--vg" command would mess things up.

There's little doubt that the use of LUKS is what's complicating this, but I'm willing to be daring because I enjoy the challenge of learning new things (along with the 'agony of defeat' it can bring at times hehe).

Well, the guide is applicable, but written for Ubuntu. You would be installing Zorin OS so, clearly, you would need to replace the "Ubuntu" with "zorin" unless you are planning on an Ubuntu Install.
Grub builds in Root - it actually is composed of two parts- the one in Root and the one in MBR - this one is not a partition; it applies to the whole disk.
Let's say you install with a Root partition and a Home partition as a separate partition- that means you have Two Partitions. Root is simply / .
Zorin OS does create a Swap File- not a Swap Partition. A swap partition is no longer necessary these days unless, as a recent poster also reminded me, you are seeking to enable hibernation. If, for some reason, you want a separate swap partition, then you would need to create that on your own.

The jump you reference: You have
Ubuntu - vg < this refers to the Ubuntu dash Volume Group
Then next command refers to Ubuntu Then a dash to separate it from Dash Root then Dash Volume Group.

On the sudo lvcreate -n home -l 100%FREE ubuntu--vg I am not sure what specifically there is in this that might mess things up. The command is to utilize 100% of the available free space. This refers only to the partition in question; not the entire disk.
Hope this helps.

By any chance, does the Zorin OS 16 installation offer the option of full disk encryption without Logical Volume Management? (Some like Lubuntu does).

Without going to check, I do not believe that the z16 Ubiquity installer offers that option.
On the outside, there is LUKS in place:
https://www.johannes-bauer.com/linux/luksipc/

I have concerns about the accuracy of Installing Ubuntu 18.04 with full disk encryption and home on its own partition | stephencox.net because it reflects what I'm looking to do, though not in Ubuntu 18.04. I'm not saying it's necessarily wrong; I just need help digesting what it's purporting to do. I'd like to partition 150 GB to home (possibly less) out of a single 1000 GB drive.

lsblk & lvs commands could give me some sense of how that link's partitions & volume group NAMES apply to my situation.

I don't understand a lot of that link's approach and am afraid to apply it as being gospel, so I guess I'm looking for the particular commands (substituting the NAMES involved) to simply "let the Ubuntu installer do it’s thing and then resize the root partition and add a home partition afterwards" using the install medium.

From what very little I know, I noticed a few things about that link's approach:

First it's decrypted & mounted, then he does an e2fsck integrity check. But "man e2fsck" says:

Note that in general it is not safe to run e2fsck on mounted filesys‐
tems. The only exception is if the -n option is specified, and -c, -l,
or -L options are not specified. However, even if it is safe to do
so, the results printed by e2fsck are not valid if the filesystem is
mounted.

Then to resize the root LVM partition he uses resize2fs & lvreduce (to a specific size). But "man resize2fs" says:

It can be used to enlarge or shrink an unmounted file system located on
device. If the filesystem is mounted, it can be used to expand the
size of the mounted filesystem.

However, isn't it mounted in this case, so I thought resize2fs cannot be used to shrink in the case of mounted.

"man resize2fs" says:

   The  size parameter specifies the requested new size of the filesystem.
   If no units are specified, the units of the size parameter shall be the
   filesystem blocksize of the filesystem.

That link commands first specify 90 GB for the resize2fs on the file system, followed by lvreduce to a specific 100 GB on the filesystem, then he uses resize2fs with no units specified, so it would end up being the filesystem blocksize of the filesystem per the above "man resize2fs" quote.

ONE OF the things I'm confused about is how these resize2fs & lvreduce commands hang together in reducing the size of the root partition.

Their "create home partition" seems okay with me, but along with what I'm trying to do I would use:

"sudo lvcreate -n home -L150G ubuntu--vg" to end up with a large 150 GB home [could be less] (instead of "sudo lvcreate -n home -l 100%FREE ubuntu--vg").

Finally he moves home from root to new partition, edits the etc/fstab file, unmounts & reboots. (sounds reasonable).

I'm reluctant to put blind faith in that link's instructions because of this lack of understanding. Does somebody have a better link or an easier way, or would I just be okay following along with that link's instructions?

I FOUND https://askubuntu.com/questions/1017...u-installation FINALLY.

Also I read somewhere there are 6 steps to reducing an LVM:
1)unmount the file system for reducing.
2)Check the file system after unmount.
3)Reduce the file system.
4)Reduce the Logical Volume size than Current size.
5)Recheck the file system for error.
6)Remount the file-system back to stage.

1 Like