During Lubuntu’s installation, is it possible to simultaneously choose a manual partition scheme and have the system encrypted? The latter doesn’t seem available whilst the former is chosen. If this is not possible, is there a recommended workaround you could advise on?
The goal is to have
The disk encrypted
Partitions /boot/efi, / and swap (note: partition, not file)
where both / and the swap partition are encryption-covered but only one passphrase is entered upon boot.
Even though I came across other issues (including a wrongly configured keyboard layout for the LUKS passphrase prompt at boot, as reported by other people), which led me not to adopt Lubuntu, I found a workaround whose steps are below in case someone goes through the same.
The intented partition scheme is:
sda 1T 0 disk
├─sda1 300M 0 part /boot/efi
├─sda2 512M 0 part /boot
└─sda3 999360M 0 part
└─luks 999360M 0 crypt
├─vg-root 997360M 0 lvm /
└─vg-swap 2G 0 lvm (swap)
Boot from the USB pendrive where Lubuntu live is, select the language and press “Try Lubuntu”
Open KDE Partition Manager
EFI partition: create a new partition, primary, fs fat32, label efi, size 300MiB
Boot partition: create a new partition, primary, fs ext4, label boot, size 512MiB
Apply
Boot partition boot flag: properties → check flag boot
Apply
lvm2 pv for / and swap: create a new partition, primary, fs lvm2 pv, encrypt with luks, set passphrase, size 975949MiB (remaining space)
Apply
Logical volume group inside the physical volume (pv): Tools → New volume group, select the just created partition, set volume group name to vg
Apply
/: select volume group vg and create new partition, primary, fs ext4, logical volume name root, label root, size 973944MiB (remaining space minus 2GiB for swap)
Swap: select volume group vg and create new partition, primary, fs linuxswap, logical volume name swap, label swap, size 2000MiB (remaining space)
Apply
Close KDE Partition Manager
Double click on the desktop’s shortcut “Install Lubuntu 14.04 LTS”
Partitions: 2 storage devices show up: the device itself and the lvm group
Select the device and manual partitioning, press next
Edit the efi partition: set content to format, set mount point to /boot/efi, ensure the boot flag is set
Edit the boot partition: set content to format, set mount point to /boot
Select the lvm group device
Edit the root partition: set content to format, set mount point to /
At this point, the next button is enabled
Press next and continue the installation
After installation, I noticed that the swap partition of 2 GB was not setup but instead a zram block of 15,5 GB was. I activated the former via KDE Partition Manager by right clicking on the swap partition and selecting “Activate swap”. After this, swapon --show displayed the 2 swapping mechanisms with the zram’s prio (5) being higher than the swap partition’s (-2). htop also displays 17,5 GB which is the sum of the size of both swap devices.