2

Is there a way to recover contents of a bad USB Flash Drive?

I know something has gone wrong when you get asked to format the stick when you plug it in.

3 Answers 3

2

(Commands posted here work on UNIX systems as that's how I solve most of these types of problems)

Before doing much, I would make a copy of the current state of the Flash drive:

$ cat /dev/sdc > drivedump or: $ dd if=/dev/sdc of=drivedump bs=4k conv=noerror

Substitute sdc with the address of your drive. You can try to figure out what it should be by putting it in, and typing:

$ dmesg | less

And seeing what was created at the end. Should be /dev/sd and is probably the lowest letter that exists.

If the memory is going bad, you want to get everything off of it ASAP before it gets worse. If not, a copy won't hurt when you run tools on it.

Now that you have a copy of the drive, you have to figure out what got mangled. You can see if fdisk has some idea what the partition looked like:

/sbin/fdisk -l drivedump

If it gets very confused, you have a partition failure of some kind: you have to rebuild the partition table of the file. If it knows exactly what's up and it all looks right (one partition, and it's the size of the stick) then you can try mounting it to see if it works. If you're missing tons of files after mounting it, you can run any of the usual suspects of file recovery tools. I don't know what they are, but someone else can help with that :)

Make copies of that dump every time you mess with it... you don't want a tool to hose your only copy.

2
  • I find a sudo fdisk -l will usually list the drive without having to search through dmesg, and fsck can repair a feew problems too, but I don't know whether it can be used on a drive dump file.
    – Andy
    May 28, 2009 at 6:20
  • 1
    Additionally, if the original poster doesn't have access to a unix variant, he can download either pendrive linux or portable ubuntu, and run that within Windows without having to reboot
    – Andy
    May 28, 2009 at 6:33
0

It depends if it is a physical or hardware failure.

Chances are it was a USB glitch that messed up the Partition Table. I have had that happen a few times with USB drives; really ticks me off.

I have had success with TestDisk - www.cgsecurity.org/wiki/TestDisk

It may be able to find and recover the partition table and/or FAT/MFT.

If that doesn't work try other file based recovery tools like File Scavenger.

0

On windows try the Hewlett Packard USB Key formating utility:

h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&swItem=MTX-UNITY-I23839&jumpid=reg_R1002_USEN

You could also try any one of dozens of recovery tools to read files off corrupt flash drives.

This one's freeware: www.fileguru.com/Smart-Flash-Recovery/info

You'll have to manually copy those links and add the http stuff @ the beginning as I'm a newb here & not allowed to insert links properly.

You must log in to answer this question.

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