PDA

View Full Version : Photorec: Recover deleted pictures from a CF card


bhobjj
03-30-2007, 08:29 AM
Recover deleted pictures from a camera card
(and lots of other files too)
This also may work with cf cards that are unreadable



Photorec is designed for recovering *jpg files that have been deleted.
Photorec is included in the TestDisk (http://www.cgsecurity.org/wiki/TestDisk) tools.

It will actually recognize about 80 different file types. It can be used to recover deleted files from harddrives and unreadable CDs.



Install the Debian package with:
# apt-get install testdisk


Photrec is very easy to use. It is so easy to use, that a how-to is not necessary. Simply start the program and work your way through the menu screens.
It needs to be run as root since you are accessing root devices.





EXAMPLE

In this example, I have someone's 16MB SD card that is unreadable with their camera. The PC I am using has a 200GB SATA drive.


To start the program:
# photorec

In the 1st screen, select the device:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~

PhotoRec 6.5, Data Recovery Utility, October 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

PhotoRec is free software, and
comes with ABSOLUTELY NO WARRANTY.

Select a media (use Arrow keys, then press Enter):
Disk /dev/sda - 200 GB / 186 GiB (RO)
Disk /dev/sdb - 14 MB / 14 MiB (RO)


[Proceed ] [ Quit ]

Note: Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has incorrect size, check HD jumper settings, BIOS
detection, and install the latest OS patches and disk drivers.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 2nd screen select the partition table type, which should in most cases be "Intel":



PhotoRec 6.5, Data Recovery Utility, October 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/sdb - 14 MB / 14 MiB (RO)

Please select the partition table type, press Enter when done.
[Intel ] Intel/PC partition
[Mac ] Apple partition map
[None ] Non partioned media
[Sun ] Sun Solaris partition
[XBox ] XBox partition
[Return ] Return to disk selection


[Proceed ] [ Quit ]

Note: Do NOT select 'None' for media with only a single partition. It's very
rare for a drive to be 'Non-partitioned'.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The 3rd screen choose the partition:

PhotoRec 6.5, Data Recovery Utility, October 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 14 MB / 14 MiB (RO)

Partition Start End Size in sectors
D empty 0 0 1 454 1 32 29120 [Whole disk]
1 P FAT12 0 1 26 454 1 32 29063 [NO NAME]




[ Search ] [Options ] [File Opt] [ Quit ]
Start file recovery

Note: Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has incorrect size, check HD jumper settings, BIOS
detection, and install the latest OS patches and disk drivers.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
The 4th screen choose where to save your recovered files:

PhotoRec 6.5, Data Recovery Utility, October 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Do you want to save recovered files in /home/bob/temp ? [Y/N]


To select another directory, use the arrow keys.
drwxr-xr-x 1000 1000 4096 29-Mar-2007 13:32 .
drwxr-x--- 1000 1000 8192 29-Mar-2007 10:31 ..
drwxrwxrwx 0 0 4096 29-Mar-2007 10:31 recup_dir.1


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~
The last screen shows the status of the recovery:

PhotoRec 6.5, Data Recovery Utility, October 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 14 MB / 14 MiB (RO)
Partition Start End Size in sectors
1 P FAT12 0 1 26 454 1 32 29063 [NO NAME]


66 files saved in /home/bob/temp/recup_dir directory.
Recovery completed.




[ Quit ]
Quit this section

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~



Testdisc is included on many live CDs including Knoppix, Sysrescue and Gparted. There are also Windows, Dos and OsX versions available.
http://www.cgsecurity.org/wiki/TestDisk_Download