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?
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.
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?
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.
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.
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.
- 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.
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.
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!).
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.
I got a warning, too. Also, nothing was in the trash like I had hoped.
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."
Download PhotoRec for you operating system. It works with Mac, Linux, Windows and more.
Then untar or unzip the file, depending on which file you downloaded, so you can see the folder and its contents.
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:
This will bring up a list of your drives:
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
Now, type your administrator password and press enter.
Run the PhotoRec app by typing in the location, followed by the name of your drive. Mine was:
If you moved or renamed the folder after downloading, make sure to reflect that in the command.
PhotoRec will now open in your Terminal window.
- Make sure to select your disk and [Proceed], then hit enter.
- Then just select [Whole disk] and enter.
- Then select your filesystem, more than likely [Other], then hit enter.
- 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.)
- 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).
- Finally, hit "C" to start the recover process.
You'll see PhotoRec doing its thing now. For my 4 GB card, it took about 5 to 10 minutes.
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.
Then just [Quit] out of PhotoRec and close Terminal.
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.
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.
Want to start making money as a white hat hacker? Jump-start your white-hat hacking career with our 2020 Premium Ethical Hacking Certification Training Bundle from the new Null Byte Shop and get over 60 hours of training from ethical hacking professionals.