Recovering Corrupted Memory Card

Corrupted memory card

Some memory cards come with a recovery CD that can really save your life if and when your memory card gets corrupted. However, what do you do if you lose the CD or your card didn't come with one? Here Steve Perks tells us his story.

I thought I would share with you a great disk recovery application called PhotoRec (bundled with TestDisk). Here is the blurb from the website: "PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks, CD-ROMs, and lost pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec ignores the file system and goes after the underlying data, so it will still work even if your media's file system has been severely damaged or reformatted. PhotoRec is free - this open source multi-platform application is distributed under GNU General Public License. PhotoRec is a companion program to TestDisk, an app for recovering lost partitions on a wide variety of file systems and making non-bootable disks bootable again. You can download them from www.cgsecurity.org/wiki/TestDisk_Download".
For more safety, PhotoRec uses read-only access to handle the drive or memory card you are about to recover lost data from.

Last weekend I carried out a portrait shoot using my 8 GB Sandisk Ultra II CF card. I’d started to notice strange things happening a couple of months beforehand. Having got home from a concert shoot and inserting the disk into my PC’s integral card reader, I was greeted with the message ‘This device is not formatted…do you want to format it now?’ Erm…NO!I re-inserted the card into my camera and could view all of the images. I tried again in the PC card reader… same problem. Tried on my backup PC and it worked fine. OK, it seems I have a faulty card reader. This happened a couple of times on other shoots, and the card always read in my backup PC. Occasionally, it worked in my main PC… until last weekend.

To make matters worse and to cause me to break out in a cold sweat, the card no longer read on the backup PC, displaying the same formatting message. To my horror, it gave me the same message when I checked the card back in the camera. It turns out I had a corrupted disk. This was probably caused by not ejecting the card correctly from the PC’s card reader. After falling into the usual trap of downloading the promising freeware/shareware applications that taunt you with how many files they can recover, but only if you pay for the full version, I stumbled across this beauty of a free, open source application. Not only did it rescue all my valuable lost images, it recovered images from the previous three shoots, even though a number of them were deleted on-camera at time of shooting and the card had been completely formatted in-camera a number of times.

As the official blurb says ‘PhotoRec ignores the file system and goes after the underlying data, so it will still work even if your media's file system has been severely damaged or reformatted.’ My card ticked all the boxes! The whole process took less than 20 minutes on an 8 GB card and gave me back the files in their original Canon RAW .CR2 format.

I’ve since tried it on other cards and recovered full shoots from formatted cards including images I remember deleting on-camera. A sheer piece of genius if you ask me, and an absolute lifesaver. I’ve detailed the process steps below with screen grabs, using a working but formatted card, so some of the information will look a little different to a totally Fubar’ed card.


Step 1: Download the TestDisk/PhotoRec app for your operating system here: www.cgsecurity.org/wiki/TestDisk_Download . (You can download the full documentation from the site too)

Step 2: The app is compressed as a .zip file, so you will need to unzip it: Click through the testdisk-6.11.3.win folder (or equivalent for your operating system) until you see photorec_win.exe or equivalent. In the Windows version, this is located in the sub folder named ‘win’.

Step 3: Click on the photorec_win.exe application to launch it. The first DOS screen prompts you to select the correct media disk, in this case ‘Generic USB CF Reader’. Use the up/down arrows on your keyboard to select, then press Enter to proceed:

Corrupted memory card

Step 4: Next, select the partition table type (in the case of Windows, Intel/PC partition). Again, use the up/down arrows and Enter key:

Corrupted memory card

Step 5: Next, select the partition. In the example shown, this is the FAT32 LBA partition labelled [EOS DIGITAL] and press Enter to start the file recovery process:

Corrupted memory card

Step 6: To recover lost files, PhotoRec needs to know the file system type where the files were stored. In this case, ‘FAT’.

Corrupted memory card

Step 7: You now have two choices: to extract the files from free/unallocated space or from the whole partition. I would usually choose ‘whole partition’:

Corrupted memory card

Step 8: The next screen chooses a default download location for the extracted files (make a note of it!). If you are happy with the default location and don’t want to change it, enter ‘Y’ for Yes:

Corrupted memory card

Step 9: You will now see a progress screen. An 8 GB CF card took around 15-20 minutes:

Corrupted memory card

Step 10: On completion, you will be able to view how many files were recovered and the location that PhotoRec has saved them to:

Corrupted memory card

In this case, within the ‘win’ folder, PhotoRec created a folder called ‘recup_dir.1’

Depending on the size of the card and number of found files, there may be a number of folders; ‘recup_dir.1’ -  ‘recup_dir.2’ etc.

Below, you can see the retrieved Canon RAW .cr2 files in the ‘recup_dir.1’ folder:

Corrupted memory card

Below is a screen grab of Adobe Lightroom displaying a few of the rescued Canon CR2 image files:

Corrupted memory card

In summary, PhotoRec will help if you have a memory card with a severely damaged partition, if you accidentally formatted a card, or accidentally deleted an image.

There are some simple steps you can take to prevent card corruption:

1. Always format the card in your camera, not on your PC or Mac.

2. Always ensure the camera power is off before inserting the card.

3. Never remove the card from the camera when it still reading/writing (usually accompanied by a ‘busy’    L.E.D).

4. Never remove the card from your PC or Mac card reader when it is still reading/writing.

5. Always use the correct ‘EJECT’ procedure before removing the card from your PC or Mac.

6. Never play with memory cards when extremely drunk.

I've created a print quality PDF of this blogpost for you to download and save for future use. Feel free to re-distribute, my logo is at the bottom of the PDFwith a copyright notice.

The PDF can be downloaded from here:

Photography tour and workshop in the Lake District in England
Long exposure photography tour and workshop in Northumberland in England
Photography tour and workshop on the majestic island of Milos in Greece
Photography tour and workshop on the Isle of Lewis and Isle of Uist at the Hebrides of Scotland
Long exposure photography tour and workshop in Northumberland in England
Photography tour and workshop in the Lake District in England
Photography tour and workshop on the Isle of Skye in Scotland
Photography tour and workshop at the Inverpolly and Assynt areas of the highlands of Scotland
Photography tour and workshop at the Inverpolly and Assynt areas of the highlands of Scotland
Photography tour and workshop on the majestic island of Milos in Greece
Photography tour and workshop on the Isle of Lewis and Isle of Uist at the Hebrides of Scotland
Photography tour and workshop on the Isle of Skye in Scotland

FavoriteLoadingAdd post to my favourites

Share on FacebookTweet about this on TwitterGoogle+Pin on PinterestEmail to someone

Access The Magazine

Articles, interviews, gear test, portfolios and much more inspirational
and educational content can be accessed with a small monthly fee.


Be a member of the world's leading on-line landscape photography magazine.

Register Now!

  1. Recently I had utilized Remo Recover application to restore video, documents, audio from corrupted SD card. Try once … cost worthy software…

  2. Here’s what the program says : “1586 files saved in testdisk-6.14-WIP/recup_dir directory.” Where can I find that folder please.

  3. You are the best!! It’s totally working and It was going to kill my happy mood because my photos and videos were lost from my camera memory card, which I took in the very same day (today). Thanks a lot!

  4. Hi,
    I have the same problem mentioned above, So i used your software but my memory card only showing 1024 MB while it is 8 GB(Transcend). So what can i do to retrieve my datas. I have to change any setup from Bios. Plz tell me i have data worth of 9 months in it.

    Thanks

    1. As we have already said before, we can’t help you any further than this tutorial. If it doesn’t work for you, I’m afraid you might have to continue your research.

  5. I tried my best by your process, but it can not backup the data from my 4GB Memory Card.
    The recovery backup data folder shows nothing. What can I do ?

    1. Hi Navin

      The help we can provide can be seen in the post above. Besides our findings and the detailed procedure here, there is no more help we can offer. If this procedure does not work for you, we have no idea what else you can do.

  6. Hello ,
    I cant read my memory card in my computer . I have very important things in tht . PLz help me out . This software is not working

  7. I opened the program, but my SD card which is under the F disk doesn't show up, neither does the name of my SD card or anything that points to it. . . . HELP !

    1. My apologies but this article was submitted by one of our readers in order to help others. You will need to reed the instructions carefully and follow them to the letter. If you are not confident enough to proceed, I would suggest to get someone else to help. It is impossible for us to know what is going on in your PC.

      I understand this is not the answer you were expecting but it is the only one I can give you. I believe you need to be slightly advanced with computers to follow the article. I am a mac user myself and haven’t used this little program, hopefully someone else might be able to help you.

  8. I. trying this and it gives me a msg that I should deactivate my antivirus because it's blocking the application, should I do that? it seems kinda fishy to me. I'm having a similar issue where my memory stick is being read by my laptop however when I try to see the files I can't but if I check them from my camera the files are all there. What should I do? :(

    1. Hello Patty

      No one can tell you what you should do, you need to make this decision yourself. If this helps, I believe that your antivirus system thinks the software is not legitimate, however, many people have tried it and it works fine. Going ahead with this will be your own choice.

  9. THANK YOU so much for posting this! I just had an experience with a corrupt card (it was recalled by the manufacturer for this problem) and this worked for me. I tried a different site from ehow.com first and that did not work. This however did. I am soooo grateful, it recovered about 2500 lost pics and videos. i will definitely be making a contribution to their website.
    Thanks again for the posting!
    Sherry

  10. Nice one. Added for future reference.

    I did something similar a few years ago – told linux to erase as it offloaded, which it misinterpreted as `erase and then fail to offload then sit and gibber for a while. In my case, I found http://www.foremost.sourceforge.net (also open-source) which rescued the JPEGs – luckily I'd been shooting both RAW+JPEG – and one of them is now a portfolio image of mine!

    Incidentally, it should be pointed out how this fits in a maximum-safety workflow:
    a) every session starts by formatting the card, in camera
    b) you offload, backup, process, backup some more
    c) all the while you're processing, the card has the raw images
    d) goto A.

Leave a Reply

Your email address will not be published. Required fields are marked *