This document belongs to Manual Full System Encryption (with Extras): Detailed Process.
The system partition and, if you have one, the data partition have been encrypted and unlocked. They appear to the system to be clear space, so they still need (logical) partitions and file systems.
You will use the LVM (logical volume manager) to do this, and then you will create the relevant file systems (i.e. format them).
2. Set up partitions for LVM
Enter the following commands to prepare the unlocked system partition for LVM.
sudo pvcreate /dev/mapper/system sudo vgcreate system /dev/mapper/system
Only if you have a separate data partition, enter the following commands to prepare the unlocked data partition for LVM.
sudo pvcreate /dev/mapper/data sudo vgcreate data /dev/mapper/data
3. Partition the partition
At this point, LVM is controlling the encrypted partitions, and it will therefore control the virtual partitioning (known as logical volumes). Here, we finally create the logical volumes (pseudo-partitions) for the system.
In this section, you can ignore anything about swap if you will never use hibernation.
Enter the following commands, but take note of the following change.
In this example, the size of the swap is 4096MB (note that it's just "M" in the command, not "MB"). However, you must change 4096 to whatever size you calculated in the Partition Overview.
sudo lvcreate --size=512M --name=boot system sudo lvcreate --size=4096M --name=swap system sudo lvcreate --extents=100%FREE --name=root system
Only if you have a separate data partition, enter the following command.
sudo lvcreate --extents=100%FREE --name=home data
4. Format the partitions
- Create a file system on a partition
It is time to create the file systems on your logical volumes (virtual partitions).
Open a terminal and enter these commands. If you aren't using swap, skip the first line.
sudo mkswap --label=swap /dev/mapper/system-swap sudo mkfs.ext4 -L boot /dev/mapper/system-boot sudo mkfs.ext4 -L root /dev/mapper/system-root sudo mkfs.ext4 -L home /dev/mapper/data-home # Only if you have a separate data partition
The system is ready for the Ubuntu Installer.
- Close the terminal.
Return to the detailed process and continue from there.