🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.maint.boot
Article #231

partman-crypto luks-<uuid> names + partman-auto* fixes

#231
From: David Härdeman
Date: Fri, 04 Dec 2026 21:10
66 lines
4737 bytes
Hi,

I just wanted to give an overview of a bunch of MRs that I posted today,
to make it clearer how they all fit together (and in which order they
should be merged).

I've been working on partman-crypto MR!9 again, and the latest round of
testing uncovered some other issues (mostly that the mapping name is
assumed/hardcoded in a couple of places for automated installs -
partman-auto guesses that an encrypted PV will be
/dev/mapper/<partition>_crypt (lib/auto-shared.sh), and
partman-auto-raid does the same for crypto-lvm RAID recipes
(/dev/mapper/mdN_crypt).

So, I've posted a bunch of MRs that ensure that partman-auto* records
the partition instead and resolves it to whatever partman-crypto
actually set up (via crypt_realdev) when creating the VGs. That works
with both the current names and luks-<uuid>, and while testing I fixed a
few existing bugs in the same code:

- expert recipes with method{ crypto } vg_name{ ... } fail with
  "Non-existing physical volume"
- only the first method{ crypto } partition in a recipe was encrypted,
  any others silently ended up as plain PVs
- recipe PV lines without device{ } all got the first PV ("Duplicate
  device name found on input", second PV in the default VG), also with
  plain LVM

Since this touches a bunch of partman modules, I had to submit a bunch
of different MRs, the intended merge order is:

1. partman-auto-lvm !8 (adds auto_lvm_resolve_pv(), no-op on its own)
   https://salsa.debian.org/installer-team/partman-auto-lvm/-/merge_requests/8
2. partman-auto-crypto !4 and partman-auto-raid !4
   https://salsa.debian.org/installer-team/partman-auto-crypto/-/merge_requests/4
   https://salsa.debian.org/installer-team/partman-auto-raid/-/merge_requests/4
3. partman-auto !28
   https://salsa.debian.org/installer-team/partman-auto/-/merge_requests/28
4. partman-crypto !9, once cryptsetup !47 (below) is in unstable
   https://salsa.debian.org/installer-team/partman-crypto/-/merge_requests/9

1-3 don't depend on partman-crypto MR!9, so they can go in regardless of
what happens with it.

partman-crypto MR!9 now also writes crypttab's friendly-name= (systemd
263), so the passphrase prompt doesn't show the UUID. Guided encrypted
LVM (the most comomn case, I assume) shows the prompt "Please unlock
disk Debian:" during boot (taken from DISTRIB_ID from the installer's
/etc/lsb-release), other volumes get friendly names like root, /home,
swap or LVM-PV@<vg>.

cryptsetup-initramfs currently warns about the unknown option, which
I've also done a MR for (it still works without the MR though, so this
is purely a cleanup):
https://salsa.debian.org/cryptsetup-team/cryptsetup/-/merge_requests/47

With all of the above MRs merged, the new "friendly" name can also be
set in the partition settings ("Name:").

Everything was tested in trixie d-i (under QEMU): guided encrypted LVM,
expert recipes with one and two encrypted PVs, two VGs, RAID1 +
crypto-lvm, plain LVM and manual partitioning; the partman-auto* cases
with both the current and the new names.

-- 
David Härdeman
Technical Details
Message-ID: <O6IHw-g0lT-7@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-nl.newsdeef.eu!srl.newsdeef.eu!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-nl.newsdeef.eu!srl.newsdeef.eu!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: David Härdeman <david@hardeman.nu>
Newsgroups: linux.debian.maint.boot
Subject: partman-crypto luks-<uuid> names + partman-auto* fixes
Date: Fri, 04 Dec 2026 22:10:02 +0100
Message-ID: <O6IHw-g0lT-7@gated-at.bofh.it>
X-Mailbox-Line: From debian-boot-request@lists.debian.org  Fri Dec  4 21:00:51 2026
Old-Return-Path: <david@hardeman.nu>
X-Amavis-Spam-Status: No, score=-1.7 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1]
 autolearn=no autolearn_force=no
X-Policyd-Weight: using cached result; rate: -4.6
X-Greylist: delayed 369 seconds by postgrey-1.37 at bendel; Fri, 04 Dec 2026 21:00:40 UTC
Mail-Followup-To: debian-boot@lists.debian.org
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Mailing-List: <debian-boot@lists.debian.org> archive/latest/223706
List-ID: <debian-boot.lists.debian.org>
List-URL: <https://lists.debian.org/debian-boot/>
List-Archive: https://lists.debian.org/msgid-search/axMobd0GVimXEE_0@hardeman.nu
Approved: robomod@news.nic.it
Lines: 66
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Fri, 4 Dec 2026 21:54:05 +0100
X-Original-Message-ID: <axMobd0GVimXEE_0@hardeman.nu>