Tools - TestDisk (Partition table recovery).

| F.A.Q.

TestDisk is open source software, licensed under the GNU General Public License (GPL v2+). TestDisk is a powerful free data recovery software! It is mainly designed to help recover lost partitions and/or restore the bootability of disks that fail to boot properly due to faulty software, such as certain types of viruses or human error (such as accidentally deleting a partition table). Partition table restoration with TestDisk is really easy.

TestDisk can:

  • Repair partition table, recover deleted partition
  • Restore FAT32 boot sector from backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Repair FAT tables
  • Rebuild NTFS boot sector
  • Restore NTFS boot sector from backup
  • Repair the MFT with a mirrored MFT
  • Locate SuperBlock backup for ext2/ext3/ext4 file systems
  • Restore deleted files from FAT, exFAT, NTFS and ext2 file systems
  • Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions
  • Change disk geometry

TestDisk has features for both beginners and experts. For those who know little or nothing about data recovery techniques, TestDisk can be used to gather detailed information about a failed drive, which can then be sent to a technician for further analysis. Those who are more familiar with such procedures should find TestDisk a useful tool for performing on-site recovery.

Operating systems

TestDisk can run on:

  • DOS (real or in DOS window on Windows 9x)
  • Windows 10/8.1/8/7/Vista/XP, Windows Server 2016/2012/2008/2003
  • Linux
  • FreeBSD, NetBSD, OpenBSD
  • SunOS
  • MacOS X

File systems

TestDisk can find lost partitions for the following file systems:

  • BeFS ( BeOS )
  • BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
  • CramFS, Compressed File System
  • DOS/Windows FAT12, FAT16 and FAT32
  • XBox FATX
  • Windows exFAT
  • HFS, HFS+ and HFSX, Hierarchical File System
  • JFS, IBM's Journaled File System
  • Linux btrfs
  • Linux ext2, ext3 and ext4
  • Linux GFS2
  • Linux LUKS encrypted partition
  • Linux RAID md 0.9/1.0/1.1/1.2
    • RAID 1: mirroring
    • RAID 4: striped array with parity device
    • RAID 5: striped array with distributed parity information
    • RAID 6: striped array with distributed dual redundancy information
  • Linux Swap (versions 1 and 2)
  • LVM and LVM2, Linux Logical Volume Manager
  • Mac partition map
  • Novell Storage Services NSS
  • NTFS ( Windows NT/2000/XP/2003/Vista/2008/7 )
  • ReiserFS 3.5, 3.6 and 4
  • Sun Solaris i386 disklabel
  • Unix File System UFS and UFS2 (Sun/BSD/...)
  • XFS, SGI's Journaled File System
  • Wii WBFS
  • Sun ZFS

Procedure

The program should be run with administrator / root privileges.

The first screen is the option to create a log file after the whole operation, adding to the previous one or not logging the operation. Accept the choice - Proceed.

 

 

After selecting the appropriate option, select the drive where the lost partition or partitions were located and confirm Proceed.

 

Next, we select the partition type, usually Intel or EFI GPT, possibly none. We confirm our choice with the Enter key.

 

In the next step, we can choose one of the following actions:

  • Analyse (Analyze 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)
  • The basic operation when restoring a partition is Analyse.

 

The next window is partition structure, select Quick Search..

 

 

In the next step, the information to be read and approved Continue.

 

 

Display the missing partition - Enter to continue. Here we can add a partition, load a backup, change the partition type or view files..

 

 

If everything checks out select Write to save, if not then select Deeper Search.

 

 

For the first option, confirm that you want to restore the partition with the key Y.

 

 

In the second case, our drive will be thoroughly analyzed and the list of available partitions with the possibility of recovery will be displayed again.

 

 

Applications

The program is intuitive and guides you step by step. When recovering the partition table, of course, we do not lose file names and folders.

Related Articles:

  1. Tools - PhotoRec (Data Recovery)
  2. Backblaze - disk failure report Q1 2023
  3. Backblaze - disk failure report