Recovering images

September 16th, 2007

Today I wanted to import a lot of images which were made using my digital camera and saved on an SD card which was previously used in another camera. And well, when trying to import those images I realized that Linux didn’t like that disk. While mounting the disk worked ok (I just connected my camera to the PC using USB and it showed up as a removable disk as always), doing anything else did not work so flawlessly. ls /media/DigitalCamera took several minutes to complete and just showed charset crap in the end. fsck.vfat didn’t help either (it made it even worse—fortunately I worked on a disk image only and not on the real device).

Then I tried using our great Windows XP installation on another computer and well—Windows showed an empty 6 MB disk, so no luck there either. :)

Fortunately I found a nice toolkit called TestDisk/PhotoRec (app-admin/testdisk on Gentoo) which was able to restore all 576 pictures and 2 movies without any problems. Thanks to the author of this great tool!

And now I think I know why the file system on that disk was broken: fdisk listed the (only) partition as FAT16—apparently the other camera formatted the disk like that while my camera usually uses FAT32. Apparently my camera ignored the FAT16 partition header and just wrote images in “FAT32 style” to the disk. Anyway, that’s just a theory and might be complete crap. ;)

Leave a Reply