17

I'm trying to fix a USB flash drive to format to the full capacity. When I use diskpart I cannot delete the primary partition.

DISKPART> list disk

Disk ###  Status         Size     Free     Dyn  Gpt
--------  -------------  -------  -------  ---  ---
Disk 0    Online          465 GB      0 B        *
Disk 1    Online           18 GB  1024 KB        *
Disk 2    Online         7720 MB      0 B

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> list partition

Partition ###  Type              Size     Offset
-------------  ----------------  -------  -------
* Partition 1    Primary             24 MB      0 B

Although diskpart shows that Partition 1 is selected by the asterisk I cannot delete the partition.

DISKPART> delete partition

There are no partitions selected.
Please select a partition, and try again.

So I try to select the partition and this is where I am having trouble.

DISKPART> select partition 1

There is no partition selected.
km1
  • 293

2 Answers2

11

I had the same problem which I solved by re-formatting with diskpart:

list disk
select disk X*
clean
create partition primary
format fs=fat32 unit=64k
list partition
active
exit

* Where X is your USB Disk/SD Card

Marc
  • 413
7

Windows tend to act weird around USB pendrives. It tends to helpfully recognize only a single partition where as all(?) other OS's seems to recognize it as mass storage with the ability for multiple partitions.

Thus I would suggest either:

  • using an other OS to delete the partition
  • or using diskparts clean command to completely wipe the disk partition table.
    Make very sure you selected the right disk before using this command.
Hennes
  • 65,804
  • 7
  • 115
  • 169