Recover data from SD card

25

17

I have a 2 GB Kingston microSD card which is about three years old. I put it in a reader today in my Windows Vista computer, wrote a 32 MB file onto it, safely removed it, and then tried to read it elsewhere. Nothing. Putting it back in the Windows Vista computer it now says:

You need to format the disk in drive F: before you can use it.

What should I do? I have access to many computers and OSes if your recommendations need that. I would be very sad if I lost all the contents of the card. Most of the data is backed up, but there are a few things that aren't. :(

Doing a

# dd if=/dev/sdg of=~/tmp/sd.bin

gives me a 2 GB file, and grepping the file it seems like lots of my data is still there. How can I put it back together?

Paul Tarjan

Posted 2009-09-12T07:34:51.690

Reputation: 780

Answers

19

A link to photorec was posted, but it only finds known file types. My files were of all random types. The nice thing, is photorec comes with testdisk.

Using testdisk, I worked on the image I made with dd :

# dd if=/dev/sdg of=~/tmp/sd.bin
# sudo apt-get install testdisk #if on ubuntu/debian
# testdisk ~/tmp/sd.bin
(Select the partition)
(Advanced)
(Boot)
(Rebuild BS)
(List)

And there were most of my files! It scanned the image looking for a FAT filesystem. Just walk the filesystem and press c to copy important files to a directory on the local disk.

Thanks for pointing out that utility, The Journeyman geek

Paul Tarjan

Posted 2009-09-12T07:34:51.690

Reputation: 780

25

Photorec is designed specifically for this. It looks at file headers for various well known files and recovers photos - it does however mangle up filenames so you may need to rebuild these from exif data.

CGsecurity also has an application called testdisk for whole drive recovery, which the OP ended up using. This is useful where you know the disk is in reasonably good shape.

In general, I'd use several different applications to improve my chances of recovery, and work off an image and/or store recovered files in a different folder.

Journeyman Geek

Posted 2009-09-12T07:34:51.690

Reputation: 119 122

But how does it work if SD card is plugged into Android phone? I don't have a seperate card reader. It only shows local disks on PC – toddmo – 2015-04-24T22:48:29.483

better to have it connected directly. IIRC most phones abstract out storage via mtp – Journeyman Geek – 2015-04-24T23:12:16.620

1Used testdisk (which is in the same package as photorec). See comment below. – Paul Tarjan – 2009-09-14T06:10:02.863

2

I've used ZAR with good results on several flaky CF cards. It should do just as well with a microSD, I would expect. For photo recovery, it's free. For more complete filesystem analysis and recovery of many more kinds of files, they want money, but I'm not sure that the free version won't recover everything allowing you to try before you buy.

RBerteig

Posted 2009-09-12T07:34:51.690

Reputation: 3 235

1

I had a damaged SD card, was working on minute, next time I turned on the camera, card no longer recognized and prompt to format. It had a good number of photos and videos on it. I tried it in a mac, a PC, multiple cameras. Cameras wanted to format it as it couldn't read it and computers simply did not recognize it at all (so all those posts about using software to recover files, no luck, as those all need the computer to at least recognize something is in the drive). I tried a local place in NYC that gets great reviews for recovering electronic data - no luck. I then got in touch with Transcend, the vendor, and I shipped it to the US base in California where they had no luck. Then they shipped it Taiwan (yes this SD card has been all over the world!) for the real makers to work their magic. NO LUCK. I asked them to ship the damaged one back instead of replacing it with a new one which they said they would do as I knew I had one last option left that I was a bit skeptical about.

I then shipped it to Dresden, Germany to a place called RecoverFab: http://recoverfab.com/ 1-2 days after they received the damaged SD card, they have uploaded 100 thumbnails to show proof they've recovered photos, and they have emailed me they recovered 370+ photos and 90 videos. Once I pay (not a small amount) they will give me an FTP site to download from so I don't need to wait for more shipping overseas of a DVD or something to get my data. SUCCESS!

The makers of my SD card could not recover data off of it, RecoverFab did.

I'm sold.

Jordan W.

Posted 2009-09-12T07:34:51.690

Reputation: 931

0

I've used GetDataBack to successfully receover deleted files from an SD card in the past, I've also used it to recover files from a hard drive that Windows couldn't read. So I think it could quite probably do what you're.

It has a free version that scans for recoverable files, but doesn't actually recover anything, so if you give it a go you'll know whether it'll work for you or not without having to hand any money over.

GAThrawn

Posted 2009-09-12T07:34:51.690

Reputation: 4 176