LUKS + dm-crypt Debian/Ubuntu expanding encrypted root LV onto 2nd disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am working with Debian LUKS + dm-crypt solution using Ubuntu 18.04 and now 19.04.

I want the capability to increase the space in the LV root partition (not the unencrypted boot partition) by adding a new drive, creating a partition on it, encrypting it with the same LUKS key and adding this encrypted partition to the root LV - so that at boot time the password is entered once and the system can then boot.

I have this working under Ubuntu 18.04. I create the new encrypted partition with cryptsetup luksFormat using the LUKS key of the existing root partition. I hack /usr/share/initramfs-tools/scripts/local-top/cryptroot (version 2.0.2) so that at boot time the LUKS key of the root partition is extracted on the fly (after the root partition has been mounted/password-enabled by user) and fed to cryptsetup luksOpen for the 2nd partition. So this partition can be mounted just before the root LV is activated. The password is only entered once, as before.

But this no longer works with Ubuntu 19.04 because of the many code changes in cryptroot script version 2.1.0.

Rather than my hack, is there a 'recommended' or better way to achieve this? If not, can the (latest) cryptroot script be modified to make it possible without a hack? It seems to me reasonable that there should be a straightforward way to expand the root LV in this scenario.

Dominic
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux