This document belongs to Manual Full System Encryption (with Extras): Detailed Process.

1. Explanation

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.

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

format
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. Pay attention to the difference between ext3 and ext4; although ext4 is a later version, boot has to use the earlier version.

sudo mkswap --label=swap /dev/mapper/system-swap
sudo mkfs.ext3 -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

5. Summary

The system is ready for the Ubuntu Installer.


ManualFullSystemEncryption/DetailedProcessSetUpLVM (last edited 2017-04-04 09:25:03 by slickymaster)