How to Recover Photos from Erased or Damaged Memory Cards & Hard Drives (For Free)

Apr 15, 2012 08:56 PM
Mar 22, 2017 08:49 PM

Computer crashes, fried hard drives, red rings of death, delinquent memory cards... nothing is worse than dysfunctional technology. In just a minute, your favorite and most used device has become the biggest headache of your life, frustrating you to the brink of madness. But what's worse than your electronics just giving up on you?

User Error

One of the most vexing things for me is accidentally deleting something on my hard drive or memory card that I didn't mean to delete. I've done it a number of times. Once, I even deleted an entire photo album with thousands of pictures off of my hard drive—by accident. And I'm sure I'm not the only one.

Recovery Apps

To get your data back, you could go buy some recovery software online, but you can't trust most of it. You'll spend anywhere from $30 to $100 for some spammy recovery app that might or might not work. And chances are, they'll take the money and run, meaning you'll never get another update, no customer support—zilch. Why make things more frustrating?

Trash Can?

A few days ago, I accidentally erased a couple photos on my CompactFlash card inside of my Canon EOS digital camera. Just a bonehead move. They weren't even important photos, but I was aggravated at myself for deleting something that I didn't mean to delete. And I wanted to get them back, without paying for some spammy crapware.

634818450422892066.jpg

Justin Meyers/Null Byte

As most of you probably know, there are no un-delete options directly on digital cameras these days. Some of you might be able to use your camera as a card reader via USB and mount the memory card onto your computer, enabling you to take the deleted photos out of the trash.

Lucky you.

If you have a Canon (like me), you cannot access the contents of your memory card directly on your computer when you're using your camera as your reader. On a Mac, it either wants to show the images in Image Capture or using the Canon EOS Utility. It will not mount as a drive in your Finder. Which means you need a card reader.

Notes

  • This will work for all kinds of situations, not just user error. If you've got a damaged memory card or want to see if you can recover a few photographs from a couple shoots ago (even after reformatting the card), this could work for you, too.
  • This will also work on other storage devices, like external hard drives, flash drives, etc.—whatever you've got that has media on it. iPhones are a little tricker, though; they need to be jailbroken, among other things.

Step 1: Find a Card Reader

Again, if your device doubles as a card reader, great. Most smartphones do. Some cameras do. If you need an actual card reader, check out your printer first. You might be surprised to see a few memory card slots on there. If yours has the right ones, great. If not, you'll need a solo card reader.

634818459608812201.jpg

Justin Meyers/Null Byte

I just happen to have a Sony multi-card reader. I got it on sale and keep it in my camera case now. Any brand will do, but I suggest getting one with a good rating. I hear this Kingston one is good, too. Just make sure that you get one that reads your cards (all of them!).

Step 2: Mount Your Card

Now that you've got a way to mount the disk image, it's time to connect to your computer. I hooked up my card reader via USB to my computer and plugged in my CF card. Nothing on the card, just as I suspected.

636257117847566856.jpg

I got a warning, too. Also, nothing was in the trash like I had hoped.

634698475286099907.jpg

Now what?

Step 3: Download Some Free Software

Again, there are tons of applications out there for recovering deleted images, and they want your hard-earned dough. Having just purchased a card reader, I didn't feel like buying anything else. Especially an application I would probably only use once. So, I went hunting for a free one and found one—PhotoRec.

"PhotoRec is a 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."

Awesome.

Download PhotoRec for you operating system. It works with Mac, Linux, Windows and more.

636257117975927316.jpg

Then untar or unzip the file, depending on which file you downloaded, so you can see the folder and its contents.

Step 4: "Unmount" Your Card

Now you need to "unmount" your memory card that we mounted in Step 2. If you haven't already, make sure your card reader is hooked up to your computer. PhotoRec will not be able to gain access to your card's contents unless you hide it from your operating system.

Before unmounting the card, we need to find out its name. Open up Terminal. To find the raw device name, use the command:

df

This will bring up a list of your drives:

634699375895334629.jpg

Find your drive and remember its name. It will probably be something different on your system. But mine is the LEXAR one; its raw device name is /dev/disk1s1. Though yours will be different, it should still start with /dev/.

Now, you need to run in root, essentially "unmounting" the volume. We do this by simply hiding it from OS X. Though it will still be physically connected (which means don't disconnect it from your computer), the OS will not think it's there. Use the following command, substituting your device's name for mine:

sudo umount /dev/disk1s1

634699415875396850.jpg

Now, type your administrator password and press enter.

Step 5: Run PhotoRec

Run the PhotoRec app by typing in the location, followed by the name of your drive. Mine was:

downloads/testdisk-6.14-WIP/photorec /dev/disk1s1

If you moved or renamed the folder after downloading, make sure to reflect that in the command.

634699418718189843.jpg

Step 6: Start the Recovery

PhotoRec will now open in your Terminal window.

  1. Make sure to select your disk and [Proceed], then hit enter.
  2. Then just select [Whole disk] and enter.
  3. Then select your filesystem, more than likely [Other], then hit enter.
  4. Then proceed to select your destination address by hitting the right arrows. (I want to place it in my Recovery folder, which is in my Pictures folder.)
  5. When you find your destination folder, open it with the right arrow. If you don't, it will end up in whatever folder you're in now (in my case, Pictures).
  6. Finally, hit "C" to start the recover process.
634699635186510049.jpg

The six quick steps in Terminal as outlined above.

634699635265602188.jpg
634699635331590304.jpg
634699635405222434.jpg
634699635629394827.jpg
634699635840931199.jpg
634699635186510049.jpg

The six quick steps in Terminal as outlined above.

634699635265602188.jpg
634699635331590304.jpg
634699635405222434.jpg
634699635629394827.jpg
634699635840931199.jpg

You'll see PhotoRec doing its thing now. For my 4 GB card, it took about 5 to 10 minutes.

634699614785106216.jpg

When it's done, you'll see just how many files were saved. I was hoping to get back 4 images that I originally lost, but it returned so many more. Over 100 from previous photo-snapping sessions.

636257118517489023.jpg

Then just [Quit] out of PhotoRec and close Terminal.

Step 7: Photos Recovered!

Now, you've just got to check the folder that you downloaded the recovered images and videos to. A folder called recup_dir will house your media, located inside the folder you picked as your destination.

636257118806238417.jpg

I received way more images and videos back than anticipated. I only needed four, but got back 121 total files. They'll be assigned random names, so you'll just have to hunt for the ones you want and delete the rest.

Cover photo and screenshots by Justin Meyers/Null Byte

Just updated your iPhone? You'll find new Apple Intelligence capabilities, sudoku puzzles, Camera Control enhancements, volume control limits, layered Voice Memo recordings, and other useful features. Find out what's new and changed on your iPhone with the iOS 18.2 update.

Comments

No Comments Exist

Be the first, drop a comment!