Pages

How to Repair a Damaged Partition Table or MBR

If all of a sudden your computer does not boot and you see messages like “operating system not found”, “missing operating system” or “invalid partition table”, you know there is something really wrong with the Master Boot Record (MBR). In this article I will describe how to fix it with a free and open source utility called TestDisk.
TestDisk is a powerful data recovery utility, mainly designed to recover lost partition tables. It can run in various operating systems, including Windows, Linux, Apple, etc. and recover partitions from their filesystems as well. I have tried many other programs in the past with mixed results, however, none come close, not even the utilities that come with the Microsoft CD, like fixmbr or fixboot. If any program can find your lost partition, it will be TestDisk.

Finding your lost partition table
To find you lost partition table, do the following:
1) Download TestDisk and install it *** Don’t get scared because it is text based; it runs from inside Windows just like any other program. Same goes for all other operating systems; it is very easy to use.***
2) Start scan disk (if you are using Ubuntu Linux, make sure you start testdisk with the sudo command in front, otherwise it will not find your disks).
3) In the initial screen it will ask you whether you would like to create a log or not. This is useful when you want to send information to a data recovery specialist, otherwise it is unimportant; choose whatever you prefer. If you are using a Live CD like Ubuntu Rescue Remix, choose “No” since you can’t write to a CD anyways.
4) Choose the partition type. TestDisk usually autodetects what you have; then click [Proceed].
5) Next click on [Analize] to start looking for your partition table.
6) Next, TestDisk will give you a preliminary list of all the partitions it found on the drive; click [Quick Search].
7) Next TestDisk will let you choose what partition you want to explore, and at the bottom of the screen it displays the condition of its structure. This screen also has some tools. Press P to list your files and make sure TestDisk can list them correctly. If it does, this is s good sign they can be recovered as well. Click q (quit) go back to the previous screen and click enter to continue.
8 ) Once it finds click on [Write] and you are done, you can exit the program.
You should be able to access your files now. If your partition is Windows based and you are unable to boot the computer you might need to set your partition as “active”. For this you have to use a Windows computer.