select partition 1 gives "No partition selected"

12

1

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

Posted 2014-12-14T17:02:16.317

Reputation: 233

2Windows tend to act weird around USB pendrives. (It tends to only recognize a single partition where as all(?) other OS's seems to recognise 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 diskpart clean (after making very sure you selected the right disk!). – Hennes – 2014-12-14T17:05:48.530

2Thanks Hennes. Diskpart clean did the trick. After clean I was able to do diskpart create partition primary. If you post as an answer I will select it. – km1 – 2014-12-14T17:10:38.660

@Hennes - Please post your comment as an answer. – Nifle – 2014-12-14T17:20:36.680

Answers

3

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

Posted 2014-12-14T17:02:16.317

Reputation: 60 739

2The clean command works in Windows 10. – CSharper – 2016-06-16T18:00:04.663

1I would be upset if it did not work in win10, but it is nice to have confirmation for an OS on which I did not test this (yet). – Hennes – 2016-06-17T08:11:57.703

1

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

Posted 2014-12-14T17:02:16.317

Reputation: 226