Recover partitions using TestDisk

It all started with one of my friends coming over to my place to install Mac O/s on a new rig he had just put together from scratch. Since he had a long power cut at his place, i thought it would be interesting to see how ‘Hackintosh’,as its lovingly called, is installed on a normal Intel Machine. My friend went ahead and made a single partition of 100 GB on a 250 GB HDD and left the rest to be partitioned later. After a successful installation, he tried to partition the remaining space and there were strange errors coming up. So i told him to remove the HDD from his machine and put it into mine. I took out my Trusty box of essential stuff to recover from any crash. But when i was doing this, one software which i was using to partition his system screwed up the partition table of my HDD as well, and all hell broke loose. This was the exact partition which had all my Life’s experiences, be it photos or videos, stored right from my school days. So how did i set everything right? Using another trusty tool called ‘The Ubuntu Live CD’ and a software called TestDisk.

Test Disk is an Open Source software, with the latest stable version of 6.10. Its a very handy and powerful data recovery tool which helps users recover lost partitions and also make non-booting disks bootable again. More info available here. So lets see how i used TestDisk under Ubuntu to get back my partitions.

  • Firstly check whether the Universal repository has been enabled in the Software Sources, available under ‘System>Administration>Software Sources’.



  • OPTIONAL: Check it, if its not already chosen, and close the window. You will get a prompt, where you will have to click ‘Reload’ and wait for the process to get completed. In case you have the option already checked, then open up the terminal and type ‘sudo apt-get update’.


  • Next open up the terminal and type ‘sudo apt-get install testdisk’ and confirm any questions asked.


  • After the installation is successful, type ‘sudo testdisk’ to start up the program.You might get a prompt to maximise the terminal window, do so.


  • Now ‘Create’ a new log file, and you will see your hard disk available, so choose the media.


  • Next choose your partition type(Generally Intel/PC partition), and then choose ‘Analyse’. You will be shown the current partitions, so choose ‘Quick Search’ to get the hidden or lost partitions


  • Thus after getting the list of the probable partitions, choose them and then ‘Write’ them to the partition table.


Walla! My partition table was fixed without any data loss. Thus the power of Linux Live CD comes to play here. TestDisk is also available for other operating systems such as DOS, Windows, BSD(Free,Net,Open), SunOS and MaxOS. Testdisk can also find lost partitions of numerous File Systems such as BeFS, CramFS, Dos/Windows FAT12, FAT16, FAT32, HFS, HFS+, HFSX, JFS, ext2, ext3, RAID, LVM, LVM2, Mac partition map, NTFS, ReiserFS, Sun Solaris, UFS, UFS2 and XFS among others. If this software has helped you, and i am sure it has, please consider donating to the author of TestDisk. God Bless.

You can leave a response, or trackback from your own site.

Leave a Reply