19

I have a USB Thumb Drive that I was going to use to install Windows 7 with. While formatting the drive with the Windows 7 USB/DVD download tool it failed leaving my USB drive in an unusable state.

I can see the drive with the Windows Disk Manager, but it shows that it has a RAW file system, and any time I try to reformat it a second time, it simply says that It can't find the file or partition. Using DiskPart I've also not had very much luck as trying to use the FORMAT command results in an error. These are the commands I'm using and their output.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>diskpart

Microsoft DiskPart version 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: DYGEAR-PC

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           14 GB      0 B
  Disk 1    Online           74 GB      0 B
  Disk 2    Online          698 GB      0 B   *
  Disk 3    Online           15 GB      0 B

DISKPART> select disk 3

Disk 3 is now the selected disk.

DISKPART> detail disk

Corsair Voyager Mini USB Device
Disk ID: 00000000
Type   : USB
Status : Online
Path   : 0
Target : 0
LUN ID : 0
Location Path : UNAVAILABLE
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 4                             Removable     15 GB  Healthy

DISKPART> select volume 4

Volume 4 is the selected volume.

DISKPART> FORMAT RECOMMENDED OVERRIDE

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART> FORMAT FS=NTFS LABEL="Windows7" QUICK COMPRESS

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART>

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           14 GB      0 B
  Disk 1    Online           74 GB      0 B
  Disk 2    Online          698 GB      0 B   *
  Disk 3    Online           15 GB      0 B

DISKPART> select disk 3

Disk 3 is now the selected disk.

DISKPART> clean all

DiskPart has encountered an error: Incorrect function.
See the System Event Log for more information.

DISKPART> list partition

There are no partitions on this disk to show.

DISKPART> online disk

Virtual Disk Service error:
This disk is already online.

DISKPART> attributes disk clear readonly

Disk attributes cleared successfully.

DISKPART> clean

DiskPart has encountered an error: Incorrect function.
See the System Event Log for more information.

DISKPART> convert mbr

DiskPart successfully converted the selected disk to MBR format.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> select part 1

Partition 1 is now the selected partition.

DISKPART> active

DiskPart marked the current partition as active.

DISKPART> format fs=NTFS label=USB quick

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART> format quick

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART> assign letter F

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     V   Video        NTFS   Simple       698 GB  Healthy
  Volume 1     D   SSD          NTFS   Partition     14 GB  Healthy
  Volume 2         System Rese  NTFS   Partition    100 MB  Healthy    System
  Volume 3     C                NTFS   Partition     74 GB  Healthy    Boot
* Volume 4                             Removable     15 GB  Healthy

DISKPART>
11
  • The reason for the problem could simply be the complete hardware failure of the USB drive. Have you tried the USB on another computer ? Or on another USB port ?
    – harrymc
    Sep 26, 2011 at 7:57
  • What does it say in the 'System Event Log'?
    – Paul C
    Sep 26, 2011 at 8:22
  • I have, and the problem is the same. I have recovered a USB drive from this state before, I just don't remember the steps. To that end I am looking for an authoritive source for how to recover a USB drive from this problem. Sep 27, 2011 at 2:09
  • Have you tried the command "Clean ALL" in diskpart (after selecting volume) ? Or running diskpart from a System Repair Disc or after booting from Windows DVD into Command mode ? You could also try EaseUS Partition Master 9.1 Home Edition.
    – harrymc
    Sep 27, 2011 at 6:38
  • is there any data you actually need in there?
    – Journeyman Geek
    Sep 28, 2011 at 5:31

8 Answers 8

39

To attempt to recover a USB drive back to usable state, you should try these commands.

First it should be noted that you should have Windows 7 installed on a computer that you have access to, so that you can use the diskpart command. You'll also need to have administrator access on this computer.

  1. Click on the Start Orb.
  2. Type cmd into the search box.
  3. Shift + Right Click on the CMD icon.
  4. Click on Run as Administrator.

From here, we are going to type in diskpart and run the following commands.

C:\Windows\system32>diskpart

Microsoft DiskPart version 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: DYGEAR-PC

DISKPART>

From here we are going to type list disk to find the current drives connected to the computer.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           14 GB      0 B
  Disk 1    Online           74 GB      0 B
  Disk 2    Online          698 GB      0 B   *
  Disk 3    Online           15 GB      0 B

The 15GB drive is the drive we are looking for, as that's the size of our USB Thumb Drive. So to select that drive, we run the command select disk 3.

DISKPART> select disk 3

Disk 3 is now the selected disk.

If you are not sure if this is your drive, you can request details about the drive by running the command detail disk after you have selected the disk.

DISKPART> detail disk

Corsair Voyager Mini USB Device
Disk ID: 00000000
Type   : USB
Status : Online
Path   : 0
Target : 0
LUN ID : 0
Location Path : UNAVAILABLE
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 4                             Removable     15 GB  Healthy

After we have correct drive, we can select any partitions on the drive select by doing select volume and then the volume number like in our case select volume 4.

DISKPART> select volume 4

Volume 4 is the selected volume.

From here, we will try to recover the drive to a useable state. We are going to attempt to reformat the drive first. FORMAT RECOMMENDED OVERRIDE is the safest way to format your drive back to a normal state.

DISKPART> FORMAT RECOMMENDED OVERRIDE

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

Should that not work, such as shown above, we can try to run a format command that tells it how to format the drive in our case we use FORMAT FS=NTFS LABEL="Windows7" QUICK COMPRESS.

DISKPART> FORMAT FS=NTFS LABEL="Windows7" QUICK COMPRESS

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

In our case, this still does not work. So we attempt to clean the whole drive with the command CLEAN ALL.

DISKPART> clean all

DiskPart has encountered an error: Incorrect function.
See the System Event Log for more information.

If we still are having trouble with the drive at this point. Let's try and list the partitions again, see if any changes have been made to the drive with LIST PARTITION.

DISKPART> list partition

There are no partitions on this disk to show.

As there as been a change, let's see if we can get the drive online with ONLINE DISK.

DISKPART> online disk

Virtual Disk Service error:
This disk is already online.

As the driver is online we can now try and clear any attributes that might be in our way such as the read only attribute. We run ATTRIBUTES DISK CLEAR READONLY.

DISKPART> attributes disk clear readonly

Disk attributes cleared successfully.

Let's see if we can put a boot record on there with CONVERT MBR.

DISKPART> convert mbr

DiskPart successfully converted the selected disk to MBR format.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> select part 1

Partition 1 is now the selected partition.

DISKPART> active

DiskPart marked the current partition as active.

DISKPART> format fs=NTFS label=USB quick

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART> format quick

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART> assign letter F

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     V   Video        NTFS   Simple       698 GB  Healthy
  Volume 1     D   SSD          NTFS   Partition     14 GB  Healthy
  Volume 2         System Rese  NTFS   Partition    100 MB  Healthy    System
  Volume 3     C                NTFS   Partition     74 GB  Healthy    Boot
* Volume 4                             Removable     15 GB  Healthy

As noted all of these commands failed from that point. So we should try one last thing to get the drive working again. In this case, what you should do is uninstall the drivers for the USB thumb drive and then reinstall the drivers again after restarting your computer.


Take a look at the Format utility from the SD-CARD Organization.

Or you could try using a Windows 98 Boot Disk after using Lexar's USB Flip the Removable Media Bit Tool.

9
  • 2
    My pen drive suddenly wasn't even appearing anywhere, from mac's Disk Utility to windows (haven't tried linux)... Something along the way here actually resurrected it! I don't know which one because it only worked after I ejected it and tried elsewhere. So, thank you Mark!
    – cregox
    Jul 3, 2013 at 15:46
  • 1
    That's awesome, I'm glad this helped someone! Jul 4, 2013 at 6:19
  • 3
    I didn't completely follow this though ( i think everybody's case is a little different) but there was enough commands in there to eventually get mine to work. thanks!
    – RoboShop
    Sep 22, 2013 at 13:46
  • 4
    Thanks for the steps. I have an additional step you should try if none of them work... after you use "convert mbr" use "convert gpt" then retry all the steps. I think my usb wasn't set to any mode and converting back to gpt after mbr fixed the issue. Hope this helps somebody :)
    – user259130
    Oct 2, 2013 at 7:47
  • Many many thanks to you...you are awesome man. So nice explanation. thanks a ton !
    – Nitish
    Jul 25, 2014 at 9:07
3

Use the HP Drive Key Boot Utility or HP USB Disk Storage Format Tool 2.2.3, command line or GUI version.

2
  • It fails as well, but good suggestion anyway, I always try the HP USB Disk Storage Format utility.
    – andreszs
    Mar 12, 2017 at 1:55
  • the HP format tool is no longer usable on Windows 10. I used SDFormatter V4.0 instead to recover a ADATA 16GB USB3.0 Flash drive: pendrivelinux.com/restoring-your-usb-key-partition
    – user97662
    Jul 21, 2019 at 8:53
3

I had a similar situation. The USB also seemed to show as both F: and G:. I tried many of the solutions above but a simple reboot worked for me. I could then run the following commands in diskpart to format the disk (doing this will delete all data on the disk):

list disk
select disk X
clean
convert mbr
create partition primary
format fs=fat32 QUICK
exit

Be sure to replace X with the number of your USB. This number can be obtained using the first command which displays all disks connected to the system. From this list, you can determine which of the displayed disks is your USB and copy the number into the set of commands above in the position X. Be sure to select the correct disk or you could accidently wipe the contents of another disk such as your hard drive.

2

Mark Tomlin's post didn't help me, fdisk from linux did.

fdisk /dev/sdX

This will give you the fdisk prompt:

Command (m for help):

It's intuitive and you can use the following options:

c (to activate DOS-mode, although it may not be necessary)
n (to create a new partition, fdisk will suggest sane values like partititon number and size - for a thumb-drive you'll most like want a full-disk partition, so you'll mostly press <enter> here)
t (choose c for a FAT 32 (LBA) partition type)
a (optional, to flag the pen-drive as bootable)
w (to write changes to disk and exit)

And you're done. Obviously, this procedure will destroy all data in your thumb drive, but the original question pertains to recovering a "dead" drive into a usable state, not to recover its contents. (i'd comment on James T's answer but apparently i need more points for than than to write an answer)

2
  • Can you please elaborate on this?  First of all, what do you mean by n (next next next), t (choose c), and a (optional)?  Secondly, what does this do?  (It may be that my two questions can be addressed simultaneously; you don't necessarily need to give two responses.)  Please do not respond in comments; edit your answer to make it clearer and more complete. Oct 24, 2015 at 17:54
  • Good to see another option posted! Oct 25, 2015 at 15:02
1

This was posted as an edit by an anonymous user, but did not seem appropriate as such, so I will re-post it here:

I can help u, I have the solution, so easy (it happened to me), I tried a ton of tools(windows and linux) to get it fixed, but the solution was so easy, just boot with a windows XP cd like if u would like to install, and when it ask u to select and partition the disk to install Windows XP, just delete all your usb disk partitions, then create a new one, then, when u hit continue it can not format the drive, so go ahead and return to windows 7/8 and launch the cmd as administrator then diskpart, then select volume, then assign letter , and then if u want to use the windows disk administrator go and click on your usb and it will let you format your disk, thats all, enjoy it.*

1

I would endorse user259130's comment on Mark Tomlin's (excellent and detailed) answer. I had a USB stick that had been used for a Linux ISO and things went very wrong in trying to get it back to a normal USB drive usable with Windows 10. After all of Mark Tomlin's steps it still didn't work, but then I used diskpart to clean the drive again and then convert to GPT (which took a long time). The conversion eventually completed successfully and I was able to create a primary partition and format it successfully. The partition was then recognised and usable in Windows.

I actually wanted the USB stick to use MBR, so that it would be usable with any computer, so I went back into diskpart, cleaned it again and converted it to MBR. After I had created a primary partition, I couldn't format it because the volume was not detected (either by using "list volume" in diskpart or by “disk management” in the computer management console), although the disk was detectable and in “disk management” I was able to see its properties under “Volumes” as using MBR. I turned off my computer, removed the USB stick, restarted the computer and plugged the USB stick in again. Windows then said that the drive needed to be formatted, and the normal Windows formatting tool worked fine. I now have a usable MBR FAT32 USB stick.

0

You could try to recover the old partition with testdisk. It might get you back to a point where the usb drive is usable again.

You can try to format it using gparted from the live cd.

I fixed a similar issue once using qtparted. For some reason no other partition manager was able to fix it at the time. It would probably be somewhat difficult to find a live cd that has qtparted... I think older versions of Knoppix have it.

0

This can be corrected using the GParted Live CD. I did all of the above with an 8 GB Sandisk Cruzer, experiencing the same failures in Windows 7, but GParted has no problems at all accessing it.

  • Create new partition table, type msdos
  • Create primary partition, type fat32
  • Set active attribute

http://gparted.org/livecd.php

1
  • It's very much dependent on the hardware. Some tricks work better on some cards then others. Dec 14, 2014 at 6:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .