All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominic Raferd <dominic@timedicer.co.uk>
To: dm-crypt@saout.de
Subject: [dm-crypt] LUKS + dm-crypt Debian/Ubuntu expanding encrypted root LV onto 2nd disk
Date: Wed, 22 May 2019 12:41:20 +0100	[thread overview]
Message-ID: <CAF9Mo3JjqorX2q+-FneK9CKdYkaSHUSuiNwG=ywZnCXK8fX9SA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2043 bytes --]

             reply	other threads:[~2019-05-22 11:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 11:41 Dominic Raferd [this message]
2019-05-22 12:46 ` [dm-crypt] LUKS + dm-crypt Debian/Ubuntu expanding encrypted root LV onto 2nd disk Arno Wagner
2019-05-22 12:53   ` Dominic Raferd
2019-05-22 13:15     ` Arno Wagner
2019-05-22 17:16     ` Guilhem Moulin
2019-05-29  9:56       ` Dominic Raferd
2019-05-29 11:06         ` Ondrej Kozina
2019-05-29 11:26           ` Dominic Raferd
2019-05-29 13:43             ` Guilhem Moulin
2019-06-07  8:56               ` Dominic Raferd
2019-06-07 10:52                 ` Guilhem Moulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF9Mo3JjqorX2q+-FneK9CKdYkaSHUSuiNwG=ywZnCXK8fX9SA@mail.gmail.com' \
    --to=dominic@timedicer.co.uk \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.