Welcome!
Thanks for visiting. If you found this information interesting or useful (or you think I'm dead wrong about something) I'd like to invite you to leave a comment on this post. You can also
subscribe to my RSS feed or sign up for email updates on the right-hand side of the page.
If you Digg what you StumbleUpon, find my writing del.icio.us, or are one of the Technorati, you know what to do:
Two simple ways to recover photos from a broken SD card
I just got back from a 18 day trip to Israel and Palestine, and my classmate Dave’s SD card for his digital camera gave out right at the end of the trip. He gave me the card to try to recover the pictures, and I was pretty successful. Here’s what I did.
I needed to grab a pristine copy of the SD card’s data without hardware errors getting in the way. So I used dd to take a snapshot of the card:
sudo dd if=/dev/mmcblk0 of=sdcard.img bs=512b skip=1 conv=noerror
The /dev/mmcblk0 should be replaced with the location of your SD card reader. The magic sauce is conv=noerror, which prevented me from getting an error with Dave’s card about 40% into a 1G card.
First I tried recoverjpeg, available from your friendly local ubuntu repository. Run this program like so:
recoverjpeg -v sdcard.img
Simple and straightforward. This program recovered 108 pictures, all with EXIF data intact (except for no date/timestamps - oh well).
I also tried photorec, which is part of the testdisk package in Ubuntu. Photorec is more complicated, but it recovers more kinds of data too. Fortunately, it’s menu driven and pretty self explanatory. Invoke that program with:
photorec sdcard.img
Not only did this program recover most of the pictures (106), but it also grabbed all sorts of interesting metadata in the form of txt and xml files. It also did a good job with the EXIF data, except for the date/timestamps.
Altogether, I got slightly better results with recoverjpeg, and it was easier to use. Your Mileage May Vary. I was surprised at how easy it was to recover these images!
Special thanks to Cédric Blancher, whose article “Digital Photos Recovery” was very useful as I prepared this article.
Related posts:
- Wedding and Honeymoon Photos Wedding Pictures (Digital Camera) Wedding Pictures (From Film) Honeymoon...
- Fix missing thumbnails in Nautilus As I begin assembling the picture package for my J-term...
- Restoring from backups with F-Spot I recently had to restore from backups on my laptop,...
- Extracting the next 7 days from phpiCalendar to simple HTML Edit: Newer versions of phpiCalendar give you this feature without...
- Java printing broken in Ubuntu Gutsy I use Asaph, a lead-sheet creation program for musicians, and...

