Executing the TestDisk Program

Working with Hard Disk Image Files

TestDisk can also work with hard disk images. The disk image must be available under its image_filename in the working directory, or you can add its Path and filename to a TestDisk command line. For example:

testdisk_win.exe C:\BOCHS\DOS\c.img

will include the Path\image_file, c.img, in the list of drives on TestDisk's initial screen. Then open the image file just like any physical drive.

Image files are limited in size by the OS and filesystem:
2 GiB (FAT16), 4 GiB (FAT32), 16 GiB (EXT2/3 with 1kb block), 256 GiB (EXT2/3 with 2kb block), 2048 GiB (EXT2/EXT3 with 4kb block)

TestDisk Startup

When TestDisk is executed, you may see the phrase "Please wait..." on your screen until it has gathered enough data from the BIOS or OS to list the disk drives on the system.


TestDisk 6.2-WIP, Data Recovery Utility, November 2005
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

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

Select a media (use Arrow keys, then press ENTER):
Disk /dev/hdc - 708 MB / 675 MiB
Disk /dev/sda - 120 GB / 111 GiB
Disk /dev/sdb - 120 GB / 111 GiB







[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.

If the reported size doesn't match the harddisk size, i.e., a 120 GB harddisk is recognized as only a 32 GB harddisk, check your BIOS harddisk settings and the jumpers on the disk. On most large hard disks, there are jumpers to limit the size to only 32 or 8 GB. If your HD is detected as 130 GB only, LBA48 support may not be avaible in your OS, read TestDisk and OS choice for more information.

Next step is to select the partition table type


TestDisk 6.2-WIP, Data Recovery Utility, November 2005
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/sda - 120 GB / 111 GiB

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







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

TestDisk Menu Items

TestDisk 6.2-WIP, Data Recovery Utility, November 2005
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/sda - 120 GB / 111 GiB - CHS 14593 255 63

[ Analyse  ]  Analyse current partition structure and search for lost partitions
[ Advanced ]  Filesystem Utils
[ Geometry ]  Change disk geometry
[ Options  ]  Modify options
[ MBR Code ]  Write TestDisk MBR code to first sector
[ Delete   ]  Delete all data in the partition table
[ Quit     ]  Return to disk selection






Note: Correct disk geometry is required for a successful recovery. 'Analyse'
process may give some warnings if it thinks the logical geometry is mismatched.

If you don't understand how to use TestDisk,

Note: TestDisk appends new information to testdisk.log; it does not overwrite an existing file.

Return to TestDisk main page