Skip to content

Commit c95c9fd

Browse files
committed
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 3d13016)
1 parent 52bed35 commit c95c9fd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/pkg/partition/helpers.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ func WipeWithSignatures(bd *block.Device, deviceName string, log func(string, ..
4242
),
4343
)
4444
}
45-
46-
return nil
4745
}
4846

47+
// [TODO]: wipe the first/last 1MiB after wiping by signatures to cover somewhat unknown edge cases
48+
// What has been observed so far is that wiping VFAT signature still makes `mkfs.xfs` believe there is
49+
// a VFAT filesystem on the partition, refusing to create XFS over it without `-f` flag.
50+
//
4951
// probe failed or no signatures found, fast wipe
5052
if err = bd.FastWipe(); err != nil {
5153
return fmt.Errorf("failed to wipe block device %q: %v", deviceName, err)

0 commit comments

Comments
 (0)