[Bug 1170827] Re: No way to create a PV from a LUKS volume in installer

Roel Brook rainmaker52 at gmail.com
Mon Apr 22 11:24:06 UTC 2013


I have devised a workaround for this, and will share this here:

- Boot the system with a gparted CD
- Partition your disk, in my case:
    - Partition 1: 250 MB
    - Partition 2: 20 GB
- Now, luksFormat /dev/sda2 (replace with your partition):
    - cryptsetup luksFormat /dev/sda2
- Open the luks volume:
    - cryptsetup luksOpen /dev/sda2 pvCrypt
- Partition LVM:
    - pvcreate /dev/mapper/pvCrypt
    - vgcreate vgSystem /dev/mapper/pvCrypt
    - lvcreate -nlvRoot -L10G vgSystem
    - lvcreate -nlvSwap -L1G vgSystem
- Reboot with the install CD / DVD loaded
- *Before* starting setup, unlock and open the crypt. Open a terminal.
    - cryptsetup luksOpen /dev/sda2 pvCrypt
    - pvscan
    - vgchange -ay
- Install ubuntu. Enter the LVs and their respective mountpaths. /dev/sda1 will be /boot
- On first boot, the boot fails. Enter the same commands as above, followed by ctrl-D.
- In a shell:
    - echo -e "#<Target>\t<Source>\t<Key file>\t<Options>\npvCrypt\t\t/dev/sda2\tnone\tluks" >> /etc/crypttab
    - update-initramfs -u
- Reboot

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1170827

Title:
  No way to create a PV from a LUKS volume in installer

Status in “ubiquity” package in Ubuntu:
  New

Bug description:
  - Slightly related to https://bugs.launchpad.net/ubuntu/+source
  /debian-installer/+bug/923552, but actually different -

  In the 13.04 installer, during custom partitioning, you can create a
  partition, then set "Use as" to "Physical Volume for Encryption".

  This creates a LUKS volume, with a ext4 filesystem inside.

  It should be possible (and was, in older versions), to use the LUKS
  volume as a LVM Physical Volume. You can select the ext4 partition and
  select "Change". However, you cannot select physical volume.

  Selecting "Physical Volume for Encryption" again, crashes the
  installer.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1170827/+subscriptions




More information about the foundations-bugs mailing list