blog.ecorrado.us

Ramblings about library technology, open source software, and other adventures!

 

Recovering pictures deleted from an SD card 2008 July 9

Filed under: technology — ecorrado @ 08:07:40

While in France (report on the conference coming soon) I was using my trusty little digital camera to take photos until my 2 GB SD card filled up. At this point, I decided to delete a number of photos that I already loaded onto my computer that I forgot to delete previously. Unfortunately, a wombat jumped on my camera and selected “Delete All” on me [1]. Well, the first thing I did once I noticed this was to chase the wombat away. After that, I took the card out of the camera and put it somewhere for safe keeping. It is important, esp. on a full disk, not to write to the disk until after you recover the images or you mat lose some of them. Upon returning to the USA, I needed to figure out a way to recover these files. The camera, look must computing devices, basically just deletes the pointer to the files. The files are still there, just with no name or location information. Knowing I wasn’t the first person ever to have this problem, I looked on the Internet for solutions. What I found was PhotoRec. PhotoRec, available as GPL licensed Open Source software is:

file data recovery software designed to recover lost files including video, documents and archives from Hard Disks and CDRom and lost pictures (thus, its ‘Photo Recovery’ name) from digital camera memory. PhotoRec ignores the filesystem and goes after the underlying data, so it will still work even if your media’s filesystem has been severely damaged or re-formatted.

PhotoRec is a command line utility and there are binaries for Windows, Linux, OS2, and Mac OS X on their web site. I’m sure there are other programs out there – maybe even ones with a pretty graphic interface — but this did what I wanted so I didn’t try anything else. The first thing I had to do was install PhotoRec (it was in the Ubuntu repository, so that was easy). After installing it, I made an image of the SD disk using dd. The actual command I used to do this on my Ubuntu install was:

sudo dd if=/dev/sdb1 of=image.dd

after that, I basically followed the step-by-step directions on the PhotoRec Wiki. Worked like a charm and I got all my photos back. Well, all of them except the one I tried to get of the wombat that caused all of my files to be deleted in the first place.

[1] I don’t know what a wombat was doing in France, but this is my story and I’m sticking to it. After all, I would never accidentally delete any files by myself.

 

1 Comment for this post

 
bandsxbands Says:

It’s interesting to see just how pervasive virtual memory has become in our everyday lives. It’s like everywhere I turn, I see something with a card slot or USB jack, haha. I guess it makes sense though, considering how much cheaper memory has become as of late…Ahhh… who am I to complain. I can’t get by a single day without using my R4 / R4i!(Posted from S3 for R4i Nintendo DS.)