up vote 8 down vote favorite
5
share [g+] share [fb]

I have a 2GB kingston microSD card which is about 3 years old. I put it in a reader today in my Windows Vista computer, wrote a 32MB file onto it, safely removed it, and then tried to read it elsewhere. Nothing. Putting it back in vista 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 gig file, and grepping the file it seems like lots of my data is still there, how can I put it back together?

link|improve this question

75% accept rate
feedback

4 Answers

up vote 9 down vote accepted

Photorec is designed specifically for this.

link|improve this answer
Used testdisk (which is in the same package as photorec). See comment below. – Paul Tarjan Sep 14 '09 at 6:10
feedback

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

link|improve this answer
2  
might want to select that as the correct answer ;) – Journeyman Geek Sep 13 '09 at 2:45
feedback

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.

link|improve this answer
feedback

I've used ZAR with good results on several flaky CF cards. It should do just as well with a µSD, I would expect. For photo recovery, its 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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.