Yesterday, my mobile phone politely informed me that my 8 GB microSD card was missing, although it was clearly inserted in its slot. Restarting the phone and reseating the card made no difference. Worse yet, Windows refused to recognize the card, too, saying there was no file system on it and it needed to be formatted.
Since half the card was filled with photos, videos, documents and music that were only partially backed up, I decided to recover the data, without spending money. This is the Internet Age. Free stuff is everywhere!
The TestDisk download comes with two programs: TestDisk, which you can use to recover corrupted file systems and FATs, and PhotoRec, which locates and saves files that are still intact. I used both successfully, but TestDisk is not for beginners. You should know something about Windows FAT32 filesystems, which is the de facto filesystem used on SD cards. TestDisk makes good suggestions for settings, however, so the green user can make some educated guesses.
How it happened
Remember the advice that you should eject/unmount a USB drive in Windows before physically removing it? Well, I kinda forgot. I was in a hurry, and disconnected my phone from the USB port on my laptop without first turning off the USB mode on the phone and ejecting the USB drive from Windows. Sometimes, you can away with being sloppy. This time, I wasn’t.
Important things to know
Even if Windows and your phone (or camera) say there is nothing on the SD card, it’s still there. It’s usually the File Allocation Tables (FATs) that have been lost or corrupted. It’s a bit like someone trashing the card catalogue (or its electronic equivalent) at the public library. The books are still there, but now no one can find them easily.
So, don’t reformat the card! Then your data probably will be lost forever. (Even then, sometimes you can still recover it, since the usual reformat just deletes old FATs and creates new, empty ones.)
The files are still there. You just need a way to find them, and copy them to another storage device.
TestDisk uses a console window, rather like DOS in the pre-Windows 95 days. It will scan the system for physical drives. If it finds the SD card, then there is hope. If not, have a sad.
I had my microSD in a card reader. TestDisk found it, and reported the correct capacity. So, I was confident the files were recoverable. There were no usable FAT tables, however. Both were corrupted, but TestDisk found them on the card. Using that data, and the suggested CHS (cylinder, head, sector) parameters of the card, TestDisk was able to recreate enough of the FATs so that file recovery was possible.
It did not recover the folders, at least in my case. Another program I tried, Zero Assumption Recovery, did find most of the folders once TestDisk reconstructed the file allocation tables. It costs $60, though, and I was of necessity doing this recovery on the cheap. Interestingly, when I tried ZAR’s trial software before using TestDisk, it found nothing. After TestDisk, it did. Maybe the paid version of ZAR would do a better job.
The end result was a usable, if somewhat jumbled “library” card catalogue. It knew where the “books” were shelved in the library, but it didn’t know their names or filetypes. [Incidentally, Windows now recognized the card as drive I:, but still believed it to be empty.]
Back in the saddle again
After PhotoRec was done (about an hour in my case), I used chkdsk in Windows to fix any drive errors and recover any data still missing. Then I used Windows’ format command to reformat the SD card. Both of these are console programs, but you can also use Windows graphical interface (the right-click menu) to do the same operations.
My card is working, my phone now sees it, and I still have my files. Granted, they’re still in a big jumble on my hard drive, but that’s a task for another day. Or week.