4

I'm trying to install Ubuntu 20.04 Desktop in a lvm-inside-luks type of configuration. This works fine with both the graphical fedora workstation installer, the debian installer, and the ubuntu 20.04 server installer.

Debian and Ubuntu 20.04 server even offer this as a guided (automatic) installation type: enter image description here

Unfortunately, I couldn't find out how to setup LVM with the Ubuntu desktop installer.

Is this not possible?

Zulakis
  • 149
  • Having the same issue. I think Desktop does not support this in the graphical installer. Probably one way to do it would be to press Try Ubuntu (eg: loading Ubuntu from an USB stick), setup your LVM partitions, then run the Installer again and just use those partitions. While being in the Try Ubuntu you might install and use GPartEd to make this easy. Check this link, is about encryption, but does setup LVM with encryption, is heavy on command line, but maybe GPartEd might help you a bit instead of some commands: https://help.ubuntu.com/community/Full_Disk_Encryption_Howto_2019 – andreim May 30 '20 at 11:28
  • Confirming that creating the LVM scheme in preview mode worked on a VMWare virtual disk. The answer below is appropriate and works fine however it includes an EFI partition which I don't need and makes future vmdk expansion more difficult. – Josiah DeWitt Nov 02 '20 at 22:55

2 Answers2

2

When you're in the desktop installer of a Live USB or Live DVD version of Ubuntu 20.04, progress to the Installation Type screen.

  1. Select Erase Disk and Install Ubuntu
  2. Click on the Advanced features button
  3. Choose the second option, Use LVM with the new Ubuntu installation
  4. Choose the optional checkbox option, Encrypt the new Ubuntu installation for security

You now have an LVM-encrypted install of Ubuntu 20.04.

flith
  • 161
  • This is true, but there is no option for additional partitions. The whole installation is done on one partition only. Any ideas on how to implement LVM+Encryption+Partitions? – Lucas Aimaretto Dec 05 '20 at 22:41
  • 1
    Why not just encrypt your additional partitions after the fact, and set them up to be securely decrypted on successful login to the system partition? sudo cryptsetup luksOpen /dev/sdb1 sdb1_crypt and add this line: sdb1_crypt /dev/sdb1 /root/keyfile luks and continue: sudo mkdir /YourPartition && sudo chmod 0400 /root/keyfile && sudo cryptsetup luksAddKey /dev/sdb1 /root/keyfile && sudo nano /etc/crypttab and add this line: /dev/mapper/sdb1_crypt /YourPartition ext4 defaults 0 2 and continue: sudo nano /etc/fstab && sudo mount -a. Sorry for the formatting. – flith Jan 11 '21 at 13:48
  • yes, after some reading, I finally implemented this: leaving unnencripted the partitions for efi and boot and encrypting the rest ... it's working like a charm. However it's a very manual process: I really miss this possibility in the installer ... – Lucas Aimaretto Jan 11 '21 at 14:28
  • Ubuntu LVM install creates a single volume group with a single logical volume. If you shrink that logical volume, it will destroy your data. So unless I'm missing something, it looks completely pointless. – Sridhar Sarnobat Mar 28 '22 at 07:16
0

I used to get the server installation and do precisely what you described, but with the new live installation we get the same issue, you just can't do it! I have reported this as a bug a few times but it was never fixed!

One alternative is to download an older version of Ubuntu like ubuntu-18.04-server-amd64.iso

http://old-releases.ubuntu.com/releases/18.04.3/

Then update it to the version you would like and then just install the desktop (if the case) ...

In My case I want first to encrypt the Linux disks (2 HDs) and have something like this:

  • Disk 1 (SSD)

    /boot
    /encrypted/lvm/root
    /encrypted/lvm/swap
    
  • Disk 2 (Big HD)

    /encrypted/home
    
  • Disk 3

    /windows (ntfs)
    
Carlo
  • 1