del.icio.us .:. tweet

Easy Flash Drive Data Recovery with PhotoRec .:. kentbrewster.com

Had a bit of trouble today: one of Vickie's two-gig thumb drives went catatonic. All Windows could come up with was the scary message that the disk in drive E wasn't formatted, and did she want to format it now? (Answer: nooooooo!) After a bit of investigation--the usual stuff: reboot, pray, try it on several machines, sacrifice a chicken--we came to the conclusion that the thing's file system had broken.

So, armed with foggy memories of how Norton Utilities used to work, off I went into the wilds of the Net, searching for recovery advice. Mostly I found questionable stuff; there are many operators out there who will charge you hundreds of dollars to take a crack at your data with no guarantees, and there are plenty of freeware/shareware downloads that claim to recover lost files but were last updated in 1997, and have since been turned into those $49.95 bloatware packages you see at Office Depot. Most of these are about hard drives or floppy disks, not memory sticks; I tried a half-dozen, but got nothing back from Vickie's poor dead baby.

Finally I found Christophe Grenier's TestDisk/PhotoRec suite, at http://cgsecurity.org. PhotoRec ignores the file system in favor of finding lost files, so it works on FAT, NTFS, EXT2/EXT3, HFS, and (with certain caveats) ReiserFS. And since it's looking for known file headers and using data carving techniques, more than eighty file types--among them DOC, PDF, and PPT--are instantly recoverable. Here's how it went:

  • I downloaded the ZIP file, extracted it to my desktop--no installation required, awesome!--and fired up PhotoRec. After smiling at the text-only interface, I hit the down-arrow to highlight the drive--in my case it was /dev/sdb--and hit Enter to continue.
  • Next I needed to choose the partition table type. Not knowing what else to do, I chose Intel, since the last time the thing had run successfully was on a Windows machine. (I'm guessing this would want to be set to Macintosh if one was attempting recovery from a Mac-formatted iPod.)
  • The next screen showed an empty partition and a FAT16 partition, both of which took up pretty much the entire disk. I crossed my fingers and hit Enter again, choosing the empty partition.
  • Next, it asked me to choose my filesystem; I was pretty sure we weren't looking at an EXT2/EXT3 system, so I hit Enter to accept Other, the highlighted default.
  • Finally it asked for a location to store recovered data; I went again with the default, which creates a new directory wherever you have the program installed. And we were off and running; the first file to pop up was a PDF, and since my new directory showed thumbnails by default, I could see that everything was going to be okay. Four minutes later, we were all done; all Vickie had to do was re-create her directory structure, re-name her files, and figure out which belonged where.
  • Many thanks, Christophe; you ought to be receiving one of your US Amazon wish-list items from us shortly.

    Comments from before Disqus:

    anime .:. 2010-08-18 13:56:06
    PhotoRec ignores the file process in favor of finding lost files, so it works on FAT, NTFS, EXT2/EXT3, HFS, and (with sure caveats) ReiserFS. And since it is looking for known file headers and using information carving techniques, over eighty file types—among them DOC, PDF, and PPT—are instantly recoverable.
    watch anime
    Neil .:. 2010-08-18 11:03:58
    Thank you so much for making this software available. I was able to retrieve some documents that I had been working on for days and had stupidly not backed up! You've saved me dozens of hours of work.... thanks again!!
    Richard2000 .:. 2010-08-12 03:25:15
    When runnning either TestDisk or PhotoRec they only see my HDD. No Flash Drive is recognized. It appears I need to do something different. Any input or ideas are welcome! Thanks. earth4energy Electronic Cigarette reverse phone detective tava tea error fix
    Kent Brewster .:. 2010-05-23 12:53:52
    Happy to year it, Amy. Please send Christophe something nice from his Amazon wishlist!
    Amy .:. 2010-05-23 11:25:48
    Thank you so much! This program worked great. My USB flash drive wouldn't open and kept saying it needed to be formatted. This drive had 6 years worth of college files on it and numerous family pictures. I was willing to try almost anything to get my files back. I called GeekSquad and they were pretty sure that they couldn't get my files back, so I tried this. I was skeptical at first, but it truly did work. Thank you sooooooo much!!!!!!!
    lexi .:. 2010-02-15 14:49:29
    thank you photorec

    i got my life back
    Kent Brewster .:. 2010-01-14 16:22:07
    Linley: was the desktop machine a Windows box? If so, I've had trouble with Macs in the past after removing a drive from a Windows machine without un-mounting it through the Windows-approved "safely remove" procedure.

    This was also true for older versions of Ubuntu, but (curiously enough) when I forget to unmount from Ubuntu and it won't recognize the drive again, mounting it and unmounting it safely from Windows seems to magically fix it.
    Linley .:. 2010-01-14 15:31:44
    Hi Kent, I am having the same problem with a 16gb Sandisk cruzer. I used it in a Mac pro and on a desk top. Now on the desk top it says it is either not formatted or formated for mac. In the Mac it says it isn't formated. I tried using the programme as you said but it asks if I want me flash drive reformated and nothing happens. Any suggestions would be greatly appreciated. thanks, Linley.
    Kent Brewster .:. 2010-01-08 14:45:24
    Okay, all you SEO spammers, OUT OF THE POOL. I'm talking to YOU, Capstone, and YOU, Pankaj. Knock it off, or I will take steps.
    Vivid .:. 2009-08-31 07:48:09
    @Graham: He had an window open (AKA explorer of sorts) that automatically showed previews for all of the files as they were being recovered.

    If you just step through the program it will give you the option to save the files, at which point you can browse around the file system and or select "Y" to accept the location to store the files. In my case it also created a RECUP_D1.DIR which is just a standard directory where it saved all my files without issue. This program was fantastic in that it recovered my files.

    Also, with regards to your Excel spreadsheets, feel free to write a better program, this program is given to the world for free for you to use and all you do is bitch and complain because you can't figure out how to use it?
    Graham .:. 2009-08-28 00:17:58
    I have some issue with this post. How did you "see a thumbnail" in a dos-based program? Also, Photorec is great in that it can access low-level drive data, but it offers me absolutely NOWHERE to store my recovered files. It doesn't recognize my USB drives. It tells me, "cannot create file in current directory" no matter what. Also, the one time i DID get it to somehow agree to save the recovered files there ended up being nothing but a file called RECUP_D1.DIR that nothing could do anything with and contained nothing.

    And Photorec does not support .xls files? Come on. Everybody needs to get their Excel spreadsheets. I sure a hope a better program comes along soon.
    Mack .:. 2009-08-04 12:14:32
    I am having trouble getting my .doc files back in working order. Images, .xls, etc is just fine but MS Word files seem to be missing encoding perhaps? They just appear as a bunch of meaningless characters. I have tried various encoding choices as prompted when opening with no luck. Any ideas??
    Chris .:. 2009-07-06 06:46:00
    Dennis,

    Did you try creating a dd_rescue image of the physical drive first then recovering the data from that?

    Chris
    Dennis .:. 2009-07-04 14:51:15
    This software won't even see a corrupted flash drive. No use of it at all.
    Jim .:. 2009-06-01 08:33:14
    Figured I would try this out. Have a new 16GB USB Flash Drive that I was moving files to when my computer locked up due to spyware. Had to hard shut down PC and since then, Windows Explorer can see the drive when insterted but prompts "Please insert a disk in drive G:" when it is clicked on. Files that existed on the drive cannot be seen. Properties of G; drive show it as a "Removable Disk", File System: "Unknown" and 0 bytes of used or free space. When runnning either TestDisk or PhotoRec they only see my HDD. No Flash Drive is recognized. It appears I need to do something different. Any input or ideas are welcome! Thanks.
    Michael .:. 2009-05-27 11:49:45
    Thanks so much for this suggestion. I'm in the process of getting back 3 years worth of pictures that were deleted by system recovery process (an accident). I used PhotoRec. I'll attempt to use TestDisk to see if I can get the files with the original name.
    Dinesh Thapa .:. 2009-05-24 03:13:02
    Excellent program. Thanks god I recovered very important pictures of my research experiment
    kevyshaun .:. 2009-03-12 13:20:42
    This finds files that arent in the same order that they were on the4 usb flash drive that I was trying to do a recovery with PhotoRec restoring files but without the original names, and in a serial sequence. Is there a way to recover them the same way as they were on the disk that you are trying to recover tyhem from. Makes it veryu hard to know what files belong together.

    Thanks
    KJ .:. 2009-02-22 19:19:23
    my USB doesn't work on any computers, it doesn't light up or show up in My Computer
    i downloaded PhotoRec, but i can't find my USB, it's usually under Removable Disk L:
    only my HD was in the list of options
    I don't know what to do, can someone help me?
    ObsidianGT .:. 2008-12-04 13:07:47
    UPDATE!: I found that because the partition was actually deleted, I had to choose "None" as the partition table type when asked. Once I picked that, it was able to pull up the file structure. It showed the files as they were when the partition was deleted, and older deleted files were marked in red. It was a simple keystroke to restore a file. Amazing!!

    PhotoRec restored files but without the original names, and in a serial sequence. It also was unable to tell older deleted files apart from the current files as of the partition wipe. Both are excellent tools, however. It's just a matter what situation to apply each one to.
    ObsidianGT .:. 2008-12-04 12:32:45
    I used PhotoRec with great success. I was even more shocked to learn that it's under GNU/GPL licensing. TestDrive unfortunately was unable to find my partition (it was JUST accidentally deleted during Windows XP text setup), but at least the actual files were recovered by PhotoRec. I sent the author a few Euros to thank him.
    Kent Brewster .:. 2008-10-29 09:08:47
    Hmm ... that's perilously close to spam, Chris. I'm going to leave it for now, just in case somebody hits a wall with PhotoRec and needs help.

    Folks, remember to do your back-ups, and to try free solutions first and send the authors your support if they work.
    Chris P .:. 2008-10-29 05:53:43
    Excellent article. I’ve now had 2 flash drives die on me and each time I let myself lapse into a false sense of security, by not making regular backups of the data. I recently read an article in the news about discarded flash drives and hard drives contained in old PC’s that people just throw away, and the subsequent data protection issues this creates. Most people would rightfully just format the hard drive or flash drive and dump it thinking that they had done enough, when in actual fact this data is often recoverable. I work for a company that works in this kind of area, recovering data from, promotional usb drives, memory cards and hard drives. There's not always a certainty of getting your data back, but often a very good chance!
    Jack .:. 2008-09-04 03:08:17
    Very nice and informative article. I have recentaly face the problem of data loss. I have used Stellar data recovery software to recover my data.I do not know much about the process of data recovery but through the software I am able to recover the data very easily. Software GUI interface makes recovery very easy.
    Alex Krenvalk .:. 2008-03-17 05:38:17
    On as regards flash drive data recovery i know little,but for restore zip files,use-zip file recovery,application is the fact that it employs several heuristic algorithms and methods to repair zip file or recover information from damaged zip files, use of multiple algorithms allows the program to minimize data loss during zip recovery, therefore the user sees as much as possible about the files being recovered,will have to enter the password when prompted and the application will make a fix zip file attempt using the specified password,program supports Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows XP SP2, Windows 2003 and Windows Vista.

Copyright Kent Brewster 1987-2014 .:. FAQ .:. RSS .:. Contact