Thursday, November 8, 2018

windows - Options to Reformat USB Drive



I have a 64GB usb thumb drive. When I plug it into a Windows system (I have tried several machines with both Windows 7 and 8), the system attempts to read it and never completes.



The drive does not show up in the device manager, nor does it appear in Computer Management -> Disk Management. If I click on the "Safely Remove Hardware" icon, however, I do get an option for "Eject Mass Storage Media", although it never accomplishes anything. Also, as long as the USB drive is connected, I cannot access other USB drives or even restart my computer. It seems as though it locks up Windows Explorer.



Is there any option to reformat this drive? It was a great drive up until all this craziness began and I would hate to throw it out because it was rather pricey.


Answer



Formatting isn’t your problem, if it were, Windows would prompt you to format it.




Assuming that the drive is not defective, this behavior is common with a faulty connection. That it doesn’t show up in Device Manager is particularly telling.



Do you get a notification-area balloon warning of a malfunctioning USB device? That usually indicates that a device is either bad or has a bad connection.



Screenshot of Windows’ USB-malfunction balloon



Have you tested a different USB port? Make sure there is a good electrical connection. Check that the pins on the flash-drive’s connector as well as the pins in the USB port’s connector are clean and if not, clean them.



Another problem if it has been used a lot, could be that it is simply worn out. Flash-memory has limited write cycles and part of the file-system, especially the FAT which is often modified yet stored in a static location on the disk, could have had sufficient changes that the sectors it was stored on were worn out.




In that case, you could indeed try to reformat in the hopes of getting the drive’s wear-leveling to kick in and remap the FAT’s sector. Obviously if it is not showing up in Windows, then you cannot do this the normal way. One solution might be to use a low-level disk-editor such as HxD (run as Administrator) to open the drive and write 0’s to the first couple of thousand sectors (see below). Hopefully that would let Windows detect the drive as a raw volume and prompt you to format.



You said that it has been tested on other systems and the pins on the drive itself are clean. You also said that it messes up the USB controller and prevents other USB devices from working. This which indicates that it is almost certainly a hardware issue such as a loose connector.



Has it been used a lot? Has it been jostled or bumped? That is a common cause of the connector getting loose.



If so, then fixing it could be as simple as re-soldering the loose connection(s). It could also have a “cold-joint” wherein the solder around one or more pins through the PCB gets cracked:



Photo of a cold-joint solder connection




You can fix it by reflowing the solder into the connection. I did this when the connector nearly got ripped of an 8GB Sandisk:



Photo of a flash-drive with a busted USB connector






Wiping a disk that doesn’t show up in Windows



This only works if you can access the drive at a low level (in raw mode). Of course, if you cannot open it even in raw mode, then obviously there is a serious hardware error. Again, if you are lucky, it is just a bad connection.





  1. Run a disk-editor such as HxD. Open the disk in physical mode—not logical, drive-letter mode. In HxD, Extras ⇨ Open disk…:



    Screenshot of HxD’s drive-selection dialog


  2. Select the sectors to be cleared. In HxD you can use Select block… (under Edit) or use Ctrl+G to jump to the specified offset and then press Ctrl+Shift+Home to select from there to the start of the disk.


  3. Use the Fill Selection function. In HxD, Edit ⇨ Fill selection…:



    Screenshot of HxD’s fill dialog


  4. Eject the drive, unplug it, then plug it back in.





If all goes well, Windows will prompt you to format it. If you got errors during the wipe, then you can try telling it to try again (a flash-drive’s circuitry should automatically remap bad sectors, but it may be designed to do so only after a few failed attempts). You can also tell it to ignore the error and continue on. Hopefully when Windows formats it, the file-system structures are put into other, good sectors.




NB: If you can open the disk in raw mode, then you may as well grab a copy of the contents (e.g., with a drive cloning tool). You can also try using a data-recovery tool like PhotoRec (it recovers more than just photos and was originally designed specifically to recover files from memory cards and flash-drives).


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...