Lubuntu installation: system encrypted + swap partition

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

  1. The disk encrypted
  2. 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.

1 Like

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)
  1. Boot from the USB pendrive where Lubuntu live is, select the language and press “Try Lubuntu”
  2. Open KDE Partition Manager
  3. EFI partition: create a new partition, primary, fs fat32, label efi, size 300MiB
  4. Boot partition: create a new partition, primary, fs ext4, label boot, size 512MiB
  5. Apply
  6. Boot partition boot flag: properties → check flag boot
  7. Apply
  8. lvm2 pv for / and swap: create a new partition, primary, fs lvm2 pv, encrypt with luks, set passphrase, size 975949MiB (remaining space)
  9. Apply
  10. Logical volume group inside the physical volume (pv): Tools → New volume group, select the just created partition, set volume group name to vg
  11. Apply
  12. /: 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)
  13. Swap: select volume group vg and create new partition, primary, fs linuxswap, logical volume name swap, label swap, size 2000MiB (remaining space)
  14. Apply
  15. Close KDE Partition Manager
  16. Double click on the desktop’s shortcut “Install Lubuntu 14.04 LTS”
  17. Partitions: 2 storage devices show up: the device itself and the lvm group
  18. Select the device and manual partitioning, press next
  19. Edit the efi partition: set content to format, set mount point to /boot/efi, ensure the boot flag is set
  20. Edit the boot partition: set content to format, set mount point to /boot
  21. Select the lvm group device
  22. Edit the root partition: set content to format, set mount point to /
  23. At this point, the next button is enabled
  24. 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.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.