Scripted run
From CGSecurity
Use of TestDisk and PhotoRec can be automatised. This document describes the command line syntax.
Contents |
TestDisk
Syntax: testdisk /cmd device cmd
Partition type selection
- partition_i386
- partition_mac
- partition_none
- partition_sun
- partition_xbox
Main menu
- advanced
- analyze
- delete
- geometry
- mbr_code
- options
Analyze menu
- backup
- list
- search
- write
Advanced menu
- type
- boot
- superblock
- number: the partition number to select
FAT1x menu
- rebuildbs
- dump
- repairfat
- initroot
FAT32 menu
- rebuildbs
- dump
- repairfat
- originalfat
- backupfat
FAT rebuild menu
- list
- dump
NTFS menu
- rebuildbs
- dump
- originalntfs
- backupntfs
NTFS rebuild menu
- list
- dump
Geometry menu
- C,number of cylinders
- H,number of heads
- S,number of sectors
- N,sector size
Some examples
testdisk /debug /log /cmd /dev/hda analyze,search testdisk /debug /log /cmd partition.dd options,partition_none,geometry,H,32,analyze,list,advanced,boot,rebuildbs,list partition.dd
PhotoRec
Syntax: photorec /cmd device cmd
Partition type selection
- partition_i386
- partition_mac
- partition_none
- partition_sun
- partition_xbox
Main menu
- number: the partition number to select
- search
- options
Options menu
- mode_ext2
Some examples
photorec /debug /log /cmd /dev/hdb select,search photorec /debug /log /cmd /dev/hda options,mode_ext2,5,search