TransWikia.com

How can I recover photo files from a memory card with a corrupt filesystem?

Photography Asked by icelava on June 20, 2021

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?

8 Answers

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.

Correct answer by Simon P Stevens on June 20, 2021

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.

Answered by che on June 20, 2021

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.

Answered by chills42 on June 20, 2021

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.

Answered by Pipe on June 20, 2021

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.

Answered by cbmeeks on June 20, 2021

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.

Answered by drfrogsplat on June 20, 2021

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.

Answered by Tyathalae on June 20, 2021

"The card is similarly unrecognisable on my computer CF card reader."

Basically for software to work, the card has to be detected in Windows Disk Management with correct capacity.

enter image description here

Verify with a different reader, if card still isn't recognized then in general this can't be recovered using software. If I am asked to handle a case like that I:

  • Open the 'case' and inspect the PCB using multimeter and microscope. If I can spot defects I'll try repairing them, and if successful I can now access the card. Some times it's enough to reflow the solder under the NAND chips. If a working and matching donor board is available, often NAND chips can be transferred to donor PCB.

  • If unable to repair I unsolder NAND chips and 'dump' them using a reader. Using specialized software I then convert the dump to a logical file system using software that emulates the controller (or tries as good as it can) from which files can be recovered. Ideally result is a coherent file system, however sometimes raw recovery is highest achievable. It's the logical image reconstruction part that is most complex and time consuming.

NAND readers are not overly expensive (but still too for a single case probably), it's the software that is needed to convert the raw dump to a logical image that is. I use the Soft Center reader and software (called Flash Extractor).

With regards to logical photo recovery software, often mentioned names are PhotoRec and Recuva, also free and very good is R-Photo made by the company that produces R-Studio which is used in many labs for logical data recovery.

If card (whatever card, CF, SD etc.) is detected but physical capacity is incorrect:

In these cases dumping the NAND is almost always required. Typically physical capacity is decreased to MBs rather than GBs. It's an indication controller is working but in let's call it a safe mode. It is either unable to detect the NAND memory -or- NAND translation table is corrupt. See this translation table as a 'FAT' for the firmware, only this table is used by firmware to map LBA addresses to actual NAND pages.

Answered by Joep van Steen on June 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP