I have recently corrupted a hard disk on my machine by accidentally typing fdisk -I /dev/ads:12 in FreeBSD and overwriting the partition table. Therefore I am using testdisk from http://www.cgsecurity.org. I got this installed on Sabayon by typing emerge testdisk and waiting a couple of minutes. After this, I selected the /dev/sda device and performed a deep search of partitions and I am able to recover my Debian installation. The testdisk software is the best solution for attempting to recover your files that you previously thought were lost.
Get more information from the Wiki website here: http://www.cgsecurity.org/wiki/TestDisk.
Update: I have finished the testdisk operation and I managed to recover my Debian installation on /dev/sda. This shows how good this software is. The two NTFS partitions are damaged and can not be recovered, but the Debian installation is what mattered.
To install testdisk on Ubuntu and Debian, type sudo apt install testdisk
.
Select the disk to be recovered like this.
root@Yog-Sothoth:~# sudo testdisk /dev/sde |
This is very useful software, this is able to read Xbox partitions as well, this is interesting.