mirror of
https://github.com/siderolabs/talos.git
synced 2026-05-05 12:26:21 +02:00
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:
parent
52bed358d3
commit
c95c9fd065
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user