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

Dominic Raferd <dominic-bG/[email protected]>
Newsgroups gmane.linux.kernel.device-mapper.dm-crypt
Message-ID <CAF9Mo3JjqorX2q+-FneK9CKdYkaSHUSuiNwG=ywZnCXK8fX9SA@mail.gmail.com>
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
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.