Control: tags -1 patch On 25/04/2023 at 19:55, Pascal Hambourg wrote:
Suggested fix is two-fold:1) Call clean_method() at the beginning of partman-auto-lvm/autopartition-lvm, as is done in partman-auto/autopartition and partman-auto-crypto/autopartition-crypto. This should solve the issue for swap partitions but is not enough for ESPs.
Patch attached for the partman-auto-lvm part.
From 1d6b590b418184d1f5b92126542f33c90dfda945 Mon Sep 17 00:00:00 2001 From: Pascal Hambourg <pas...@plouf.fr.eu.org> Date: Thu, 27 Apr 2023 08:53:05 +0200 Subject: [PATCH] Call clean_method again The call to clean_method was lost with commit cfc6797f. As a result, if existing swap and EFI partitions on other disks were marked used (which is the default), swap partitions will be used (and get new UUIDs, which is bad if they belong to another system) and any EFI partition on another disk may be used instead of the newly created one (#1034812). This patch fixes the issue for swap partitions but fixing the issue for EFI partitions also requires a change in partman-efi (same as #1034208). --- autopartition-lvm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autopartition-lvm b/autopartition-lvm index e081beb..40026c3 100755 --- a/autopartition-lvm +++ b/autopartition-lvm @@ -5,6 +5,9 @@ devs="$*" method="lvm" +# Ensure we have no pre-existing partitions marked as swap and efi +clean_method + auto_lvm_prepare "$devs" $method || exit $? auto_lvm_perform || exit 1 -- 2.30.2