From c95c9fd06508f02a770100f87da754a6fd3b9fa8 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 19 Jan 2026 14:09:41 +0400 Subject: [PATCH] fix: wipe the first/last 1MiB in addition to wiping by signatures I got a failure when dual-boot image refuses to format EPHEMERAL partition where `EFI` partition used to be (VFAT). So until we have a resolution, do this workaround. Signed-off-by: Andrey Smirnov (cherry picked from commit 3d1301640d44d58303160400e4954c36f53341f9) --- internal/pkg/partition/helpers.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/pkg/partition/helpers.go b/internal/pkg/partition/helpers.go index a0d2357b0..011d08220 100644 --- a/internal/pkg/partition/helpers.go +++ b/internal/pkg/partition/helpers.go @@ -42,10 +42,12 @@ func WipeWithSignatures(bd *block.Device, deviceName string, log func(string, .. ), ) } - - return nil } + // [TODO]: wipe the first/last 1MiB after wiping by signatures to cover somewhat unknown edge cases + // What has been observed so far is that wiping VFAT signature still makes `mkfs.xfs` believe there is + // a VFAT filesystem on the partition, refusing to create XFS over it without `-f` flag. + // // probe failed or no signatures found, fast wipe if err = bd.FastWipe(); err != nil { return fmt.Errorf("failed to wipe block device %q: %v", deviceName, err)