Diskpart/etcher errors - Wiping a removable/SDcard on win10
Tools like etcher use
If you're using diskpart by hand and run
clean it will say access is denied and to check the event log or such:
DISKPART> clean DiskPart has encountered an error: The request could not be performed because of an I/O device error. See the System Event Log for more information.
The event log will have an entry with something like this, which is not helpful
Cannot zero sectors on disk \\?\PhysicalDrive2. Error code: 5@0101000F
The trick is to zero the partition table so it stops getting hung up for who knows why. Of course, if you have a linux machine handy you can just write zeros to the whole device with dd, but you wouldn't be trying to use diskpart in that case anyway. (
dd if=/dev/zero of=/dev/sd<5> bs=8M count=256)
So if you dont want to juggle machines or only have windows, there is a nice little freeware tool that will perform exactly the same thing, designed more for secure wiping disks by repeated writes, but you can do one pass and cancel it like 5% the way through, and then etcher will flash successfully.
The tool is "RoadKil's disk wipe" available here