1

How can i access a different form of partitioning, like in old alternate cd's or debian's installer, where i can choose to create a partition, make it encrypted, then add a LVM group to that encrypted partition and add swap, home, root partitions under it, so there is one luks process and all partitions are unlocked via same key?

1
  • what version of Ubuntu?
    – Panther
    Apr 17, 2014 at 23:25

1 Answer 1

0

From See https://help.ubuntu.com/community/EncryptedFilesystemsViaUbiquity -

The Desktop CD installer (ubiquity) currently does not provide support for setting up LVM or encrypted partitions. With the recipe below, the Desktop CD can be used to install Ubuntu on a previously created (optionally encrypted) LVM.

Boot desktop CD, open terminal, and install missing packages:

apt-get install cryptsetup lvm2
sudo modprobe dm-crypt

Now set up the LVM and crypto partitions with the command line tools. If you already have Ubuntu installed on a standard LVM-on-LUKS, this is as easy as:

sudo cryptsetup luksOpen /dev/sda4 sda4_crypt

or whichever partition is the encrypted LVM PV. This should automatically create the LVM LVs in /dev/mapper/.

Start ubiquity with manual partitioning, and use the existing partitions; keep /home etc. as they are, and reformat the root partition in the LVM. Do not reboot immediately, your system will not boot!

Mount the newly installed target system:

sudo mount /dev/mapper/ubuntu*-root /mnt
sudo chroot /mnt mount /proc
sudo mount --bind /dev /mnt/dev
sudo chroot /mnt mount /boot

Create an appropriate crypttab:

echo "sda4_crypt UUID=`sudo blkid -s UUID -o value /dev/sda4` none luks" | sudo tee -a /mnt/etc/crypttab

Reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .