← Back to Wiki
Windows / Storage

Wipe a USB Drive Windows Will Not Format

Write a mining OS image to a USB stick and Windows may never format that stick again. Disk Management greys the option out or fails partway through. The drive is fine. Windows just will not touch the partitions the image left behind.

Share on X

Why Disk Management gives up

A mining OS image does not lay the drive out the way Windows expects.

HiveOS and images like it write their own partition table. Some of those partitions are Linux filesystems. Some are flagged in ways the Windows format tool will not act on.

So you right click the drive and the format option does nothing useful.

This is not a dead stick. Nothing is wrong with the hardware.

Clear the drive

Open Command Prompt.

Start the partition tool with command diskpart

Accept the UAC prompt with Yes.

A second window opens. You are in diskpart now, not the normal shell.

List every disk in the machine with command list disk

DISKPART> list disk

  Disk ###  Status         Size     Free
  --------  -------------  -------  -------
  Disk 0    Online          931 GB      0 B
  Disk 1    Online          465 GB      0 B
  Disk 2    Online           14 GB      0 B

Find your USB drive in that list. Go by the size column.

BE WARNED: clean wipes whatever disk you selected and never asks you to confirm. Pick the wrong number and you erase the partition table on that drive instead. Match the size to your USB stick before you type anything. If two disks are the same size, unplug the USB, run list disk again, and see which number disappears.

Select the drive with command select disk 2

Use your own number in place of 2.

Wipe it with command clean

That is the whole fix. It returns in about a second.

Bring the drive back

clean removes the partition table and stops there. The drive now has no partition at all.

Windows shows it as unallocated space.

Open Disk Management.

Right click the unallocated space on your drive.

Choose New Simple Volume.

Take the defaults and finish the wizard.

The stick comes back as a normal drive with a letter.

What else this fixes

Any drive Disk Management will not format is a candidate.

Drives written with a Linux installer image.

Drives with a leftover EFI or recovery partition you cannot delete in the GUI.

Drives that report the wrong size after an image was written to them.

The image writing tool is usually what created the problem. clean undoes all of it at once.