From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stocktonflats.co.uk (stocktonflats.co.uk [62.31.71.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 22 May 2019 13:52:18 +0200 (CEST) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by stocktonflats.co.uk (Postfix) with ESMTPSA id B796F61072 for ; Wed, 22 May 2019 12:42:09 +0100 (BST) Received: by mail-qt1-f178.google.com with SMTP id j53so1847032qta.9 for ; Wed, 22 May 2019 04:42:09 -0700 (PDT) MIME-Version: 1.0 From: Dominic Raferd Date: Wed, 22 May 2019 12:41:20 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000964562058978748b" Subject: [dm-crypt] LUKS + dm-crypt Debian/Ubuntu expanding encrypted root LV onto 2nd disk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de --000000000000964562058978748b Content-Type: text/plain; charset="UTF-8" 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 --000000000000964562058978748b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I a= m working with Debian LUKS + dm-crypt solution using Ubuntu 18.04 and now 1= 9.04.

I want the capabili= ty 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 i= t 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 the= n boot.
I have this w= orking under Ubuntu 18.04. I create the new encrypted partition with crypts= etup 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 th= at 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 fe= d to cryptsetup luksOpen for the 2nd partition. So this partition can be mo= unted just before the root LV is activated. The password is only entered on= ce, as before.

But th= is no longer works with Ubuntu 19.04 because of the many code changes in cr= yptroot 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 mak= e it possible without a hack? It seems to me reasonable that there should b= e a straightforward way to expand the root LV in this scenario.

Dominic
--000000000000964562058978748b--