TestDisk is an amazing data recovery tool available for Linux, Mac OS X and Windows under GNU General Public License v2+.
TestDisk can -
- Fix partition table
- Recover deleted partition
- Recover FAT32 boot sector from its backup
- Rebuild FAT12/FAT16/FAT32 boot sector
- Fix FAT tables
- Rebuild NTFS boot sector
- Recover NTFS boot sector from its backup
- Fix MFT using MFT mirror
- Locate ext2/ext3/ext4 Backup SuperBlock
- Undelete files from FAT, exFAT, NTFS and ext2 filesystem
- Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions
For more details, http://www.cgsecurity.org/wiki/TestDisk
To install TestDisk on Ubuntu,
You will need root privileges to install it, append
sudo to invoke it as a root.
Open a terminal,
Be sure to run it with root privileges by appending
Select Create using arrow keys and press enter. This will create a log file for further inspection purpose.
Now, select device you want to recover, and then Proceed.
TestDisk will suggest you the partition table type of your drive, select it.
Now, select Advanced. You will see a partition table for your device.
Select a partition you want to recover, and navigate to Undelete form the bottom of the screen and select it.
Found what you were looking for? Navigate to your deleted file or directory and press
You will be asked to provide destination location where you want to save this deleted file, go there and press
c to begin copy.
If you want to recover all the data in a directory, press
a to select all the files and then
Shift + c to copy all the selected files to your destination directory, then provide destination directory, and press
c to begin copy.
When you’re done with recovery, press
q to quit.