Orquid "Phoenix"

Orquid "Phoenix"

by ceinmart

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

I know this is not specifically a photography issue but since many of us with prosumer/professional-level DLSRs use Compact Flash cards, it is bound to happen to others as well.

I have a Sandisk 16GB Ultra card that occasionally had the camera reporting inability to access the card. I had to reinsert the card to continue using it. I was able to read the card and transfer the photo files to my computer drive. Today, the same thing happened again, just that nearing the capacity of the card, it failed one last time and the camera was subsequently unable to read it anymore. Despite reinsertion.

My other CF cards never once exhibited this problem, so it's pretty much isolated to this card.

The card is similarly unrecognisable on my computer CF card reader. I think the filesystem is toast, but I suspect the photo files are still intact. I would like to find ways where I can inspect the raw binary data in the card and hopefully recover the photos?

share|improve this question
1  
See also: photo.stackexchange.com/questions/1125/… –  Rowland Shaw Sep 16 '10 at 18:29
    
I did see that question but I did not possess fundamental understanding about the differences between CF and SD card recording formats (not OS filesystem), and if raw card readers need to do anything special. –  icelava Sep 17 '10 at 13:48
    
the electronic interface is different, but CF and SD are effectively the same for this purpose. So the answers in photo.stackexchange.com/questions/1125/… also apply. It's possible some low-level drivers could do other more-clever things, but i'm not aware of any software that works that way. Usually, recovery software uses the operating system's low-level driver to attempt to copy at the below-the-filesystem level, and then scans that for intelligible fragments of photos. –  mattdm Mar 27 '11 at 23:19
add comment

7 Answers

up vote 13 down vote accepted

There are two utilities from CGSecurity that might help.

  • TestDisk - Allows direct access to disk data and file recovery from corrupt partition tables.
  • PhotoRec - Specifically targeted at recovering photos by identifying byte patterns in images (& video) files.

Depending on what has caused your card to fail will depend on which of these tools will work best.

You can use TestDisk to do a raw backup of the card first to prevent further damage by using recovery tools incorrectly.

share|improve this answer
2  
I used PhotoRec to recover my files thanks. Great that it's free, so guess cannot complain about the lack of a GUI. –  icelava Sep 17 '10 at 14:00
2  
+1 for PhotoRec: My card had a destroyed file system (Windows and camera didn't recognise it), but I was able to recover all photos from it by using this great software. Can't recommend it more! –  Robert Koritnik Mar 29 '11 at 9:48
    
+1 for PhotoRec here also. –  James Youngman May 16 '12 at 15:11
1  
+1 for recommending free and open source software that works. I tried to find the raw backup option in TestDisk but couldn't find it. I eventually just went ahead and copied the files on the card. It managed to recover every single photo. Excellent program. –  Lilienthal Jul 29 '12 at 9:04
add comment

Can you distinguish if it's the card that is inaccessible, or just it's filesystem? I know in Linux, you can access the raw device and try to get you data out of that (which should be possible, since it's usually just sequentially stored JPEG files).

On Windows and Mac, you can try recovery software recommended by SanDisk, demo version which shows you what it can rescue is avaiable here: http://www.lc-tech.com/software/rprodetail.html (see also SanDisk FAQ entry about that).

If you can't see the raw hardware then I guess your only chance is to try some data recovery service to tear the card apart and attempt to get you data from the flash chips.

share|improve this answer
    
The filesystem table itself somehow got corrupt. I have been testing out the various utilities and they can retrieve the data files. –  icelava Sep 17 '10 at 14:01
    
This software is more user-friendly than the open-source TestDisk, so i'd recommend for non-tech-saavy folks. Otherwise, TestDisk/Photorec can still get by with reasonable software experience. –  icelava Sep 17 '10 at 14:10
add comment

If you are able to get to the card at all, you could try using Recuva from Piriform, Inc. It is a free download, and I have used it to get back files that were accidentally deleted.

One of the features listed is:

Recovery from damaged or formatted disks

Even if you've formatted a drive so that it looks blank, Recuva can still find your files on it.

share|improve this answer
    
Recuva appears to expect a known filesystem (i.e. FAT32, NTFS) before it can scan the card's drive. My card's filesystem is corrupt. –  icelava Sep 16 '10 at 15:53
    
@icelava - it may need to know what the filesystem was, but it shouldn't need a good filesystem on the drive to work. –  Fake Name Aug 30 '11 at 7:27
    
nope, Recuva couldn't do anything because there was no intact filesystem for it to even recognise. –  icelava Aug 31 '11 at 3:23
add comment

You can try using chkdsk first to recover partition. I am assuming your card is FAT32 formatted. You can use following command on Windows Command Prompt (cmd):

chkdsk g: /f /r /x

Please note that you should write your memory card drive name instead of g:

After chkdsk is completed and your drive is visible again, you should be able to recover your files.

If you cannot see your image files but can access to the memory card, you can use the software Recuva to rescue your image files.

share|improve this answer
    
I wouldn't feel comfortable using a writing operation like this on a medium before backing it up. –  CodesInChaos Mar 13 at 22:25
    
Used chkdsk commands are not writing operations. As a logical choice it is of course would be a bad idea to use writing operations. –  Selim Arikan Mar 14 at 10:14
    
How can it fix errors without modifying the volume? –  CodesInChaos Mar 14 at 10:21
    
It can fix partition table without touching the data. Also it can look for file signatures and fix them on MFT and File Allocation Table. –  Selim Arikan Mar 14 at 11:28
    
You cannot fix the MFT without modifying it. And modifying it risks breaking it even more. So I consider this a risky approach that shouldn't be done before creating a low level copy of the whole card. –  CodesInChaos Mar 14 at 11:44
add comment

As Simon wrote, photorec is a good tool to recover lost data, not only image files. I the past I recover jpg files with success, but it used signatures to find the files, and I don't know if it has signatures for raw files.

Just a tip, first copy the content of the card with dd and the used photorec with the image created by dd. By making this one-time copy, you avoid making more damage to the card.

If photorec doesn't recognize raw files, see if you have any luck with other tools, as example: Foremost.

You also can read this article about recovering files from wiped disks.

share|improve this answer
    
Some of the disk-recovery tools like ddrescue actually work specifically by reading problematic sectors repeatedly. I don't know if this strategy is helpful with flash media, but honestly I wouldn't be too concerned about further damage to the card. Media is cheap enough that I follow a "one strike, you're out" policy — if a card has errors, I save what I can and then trash it. –  mattdm Aug 30 '11 at 4:52
add comment

I'm currently in the process of using ddrescue to recover photos from a corrupt CF card (I believe hardware failure).

The problem I have is not only parts of the filesystem/files being unreadable, but when I attempt to read a specific part of the CF card, the disk stops responding entirely, which makes it quite difficult to import files off it.

I imagine this might be a pretty special case, but in any case I've been able to piece most of the disk back together with ddrescue, using the -i option to skip the chunk where it fails, and otherwise read the sectors that work, to generate a new disk image file to use with PhotoRec.

If the CF card wasn't having such serious failures, I think it'd be possible with PhotoRec alone, as others have suggested.

ddrescue's main utility seems to be the way it lets you get as much of a disk as is available, and use various techniques (e.g. retries, which can be good on magnetic/optical disks) to fill in the gaps. You can keep re-running it to build up an image of the disk from whatever is readable with the various techniques. And it automatically works out how much it can actually read successfully between the failed/damaged sectors.

share|improve this answer
add comment

I had an SD card go bad during a vacation to Disney World. The camera said the card was unreadable. And the computer said the card was blank. When I knew I had 100+ pictures on there. And this was before I got back to the hotel to back them up.

So I remembered this un-erase program called "Recuva" (Windows only) that scans a volume (hard drive, flash, etc) looking for deleted files.

Sure enough, it found every single one of them and I was able to restore them all. Best of all, the program is free.

So Google "Recuva" and try it.

share|improve this answer
    
Duplicate answer. I did try recuva before but it expected a known filesystem to be present on the card. My card was toasted until the filesystem was unrecognisable. –  icelava Mar 29 '11 at 4:46
add comment

protected by mattdm Aug 30 '11 at 4:46

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.