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 <andrey.smirnov@siderolabs.com>
(cherry picked from commit 3d1301640d44d58303160400e4954c36f53341f9)
This commit is contained in:
Andrey Smirnov 2026-01-19 14:09:41 +04:00
parent 52bed358d3
commit c95c9fd065
No known key found for this signature in database
GPG Key ID: 322C6F63F594CE7C

View File

@ -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)