There are a number of Open Source tools that you may find need for when your CF card (or other camera storage media) becomes corrupted (fully or partially.)  In all cases for digital camera media I encourage folks to:

  1. use the camera tools to ‘format’ (erase, clean) the media after you copy your images to your hard drive; if you use your computer to ‘format’ the media it may lead to problems (for various and nebulous reasons) and
  2. once you get your images onto your computer disk then make another copy to a backup drive OR to CD/DVD.

Ok – but we seem to have a problem – we can’t read the media - how do we get the images off of the ‘bad’ CF (or other) card?  There are a number of commercial tools (some free – check with the maker of your media) that you can try OR you can explore the Open Source data recovery tools below.  Note that this type of activity is not for the faint-of-heart and, if you have images with commercial value (i.e. taken on assignment or during studio work) then you may want to contract with a service that specializes in data recovery.

  • photorec - best for image files; relatively simple to use and designed specifically to recover image files.  Two resources with more information include this Wikipedia post and this CGSeurity page.
  • ntfsundelete - restore NTFS drives (and possibly files)
  • testdisk - Restore partitions (Unix/Linux); actually another tool related to photorec.
  • foremost – Configurable – restores files by type from a disk partition.  The recovered files will have numeric names but appropriate extensions (i.e.  .jpg, .gif, .pdf, etc.)  The bad news is your folder structure is lost.

When using these types of tools, I encourage folks to select options that copy lost files from the damaged media to a good drive – don’t try to rebuild, repair the damaged media.  Get your files first and then try formatting in your camera and taking some test images using the suspect media card and then copy the test images to your PC.  In most cases, once I recover any lost images I would discard the potentially problematic media…

The Linux manual page for PhotoRec is quite brief so you may want to explore the links above for more detailed information on using this tool.


PHOTOREC(1)                  Administration Tools                  PHOTOREC(1)

NAME
photorec – Recover lost files from harddisk, digital camera and cdrom

SYNOPSIS
photorec [/log] [/debug] [/d recup_dir] [device|image.dd|image.e01]

photorec /version

DESCRIPTION
PhotoRec  is file data recovery software designed to recover lost files including video, documents and archives from Hard Disks and CDRom and lost pictures (Photo Recovery) from digital camera memory. PhotoRec ignores the filesystem and goes after the under-lying data, so it’ll work even if your media’s filesystem is severely damaged or formatted. PhotoRec is safe to use, it will never attempt to write to the drive or memory support you are about to recover lost data from.

OPTIONS
/log   create a photorec.log file

/debug add debug information

SEE ALSO
testdisk(1), fdisk(1).

For a detailed example using hard disk tools the post on my technology blog may be of interest.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Add to favorites
  • FriendFeed
  • Google Buzz
  • LinkedIn
  • Live
  • StumbleUpon
  • Tumblr
  • Twitter