If you have boot issues which are caused by accidentally deleting a partition table, you can use TestDisk, which is a data recovery software that allows to find lost partitions and repair MBR or damaged partition table.
Here are some features of TestDisk:
- Repair partition table
- Recover deleted partition
- Recover FAT32/NTFS boot sector from its backup
- Rebuild FAT12/FAT16/FAT32/NTFS boot sector
- Repair FAT tables
- 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
In this tutorial, we will show you how to install and run TestDisk under Ubuntu/Linux Mint to repair your partition table or MBR.
Warning: Use TestDisk at your own risk! We are not liable for any misuse of this tool.
Open the terminal and install TestDisk with this command under Ubuntu 12.10/12.04/Linux Mint 13 or older:
sudo apt-get install testdisk -y
Via the terminal, you can start TestDisk with this command (root privileges required):
In the first screen, you will be asked to select whether you want to create a log or not. It is optional, so you can select any option from the list using the arrow keys, then hit Enter:
Select now the media you want to access (hard disk partition) and press Enter:
Select now the partition table type and press Enter:
Highlight now the "Analyze" option and press Enter to search for lost partitions:
At the bottom of the window, leave the "Quick Search" option highlighted and press Enter:
In the newt screen, you will get the structure condition of your disk:
Press Enter to continue, then highlight the "Write" option and press Enter to fix the partition table:
Quit now TestDisk and reboot your system:
You should now re-gain access to your partition files.