- Computers & Software
Fix and Repair Partition Table linux and windows
How to Repair Partition Table
Many of us love to play around with our boxes and customize it to our liking. I love to give my box the best possible look with the best software underlying it. But even in the finest environment and with utmost care, sometimes computers behave in ways we don't want them to. I love Linux and always keep on trying the newest distributions. One of the most common problems that one can face while playing with Linux distributions is a partition table error. Partition table is basically meta-data stored on the first sector of a hard-disk that contains information about the disks partitions such as type, capacity and whether its primary or logical, etc.
Partition table can be corrupted due to many reasons like a boot-sector virus, an unsuccessful operating-system installation and even by certain softwares. I've encountered the situation many times when an installation is incomplete or unsuccessful and I get a bad partition table. And I tell you a bad partition table can really cause you a lot of headache!
Possible Effects of a Bad Partition Table :
Linux fails to detect any partitions.
Linux fails to install properly. The installation goes up to where it'll say that installation is complete but when you reboot, you don't see any OS entry in the boot-loader.
You are unable to boot the computer.
You are unable to do certain operations with your partitions such as shrinking or resizing.
Here's how the problem starts:
Suppose you have Microsoft windows on your computer, and you're trying to install a new Linux say Ubuntu. But Ubuntu fails to install (I know....mostly Ubuntu doesn't fail, but its just an assumption) and it leaves your computer in a very undesired state where your partition table is corrupted, the windows boot-loader has been overwritten and the Ubuntu won't boot .
Now Ubuntu will not even reinstall because it can't detect the partitions on the hard-disk. When you boot up the live CD and run the installer, it says that for installation to take place, the partition table needs to be initialized, deleting all data on the hard-disk. Most of us won't like to do that unless we have a hard-disk backup image. So the last resort for you is to somehow repair the partition table!
Here's how to fix it:
1. Going back to where you started :
Reinstalling windows is one of the ways to fix it because Windows can read the disk partitions even when the partition table is corrupt(yes, somehow it does, provided your MBR is otherwise intact). But you don't want this as a possible makeover because it will wipe out your existing installation of Windows. Moreover, although Windows will install, you may not be able to install Linux over it until the partition-table is fixed. So you'll be back in the position where you started – installing Linux over Windows.
2. Partition Table Doctor comes to the Rescue :
Now that you've Windows installed, you can run many partition-table recovery softwares among which, PTD is the best. PTD can really fix partition tables. You need the full version to save any changes you do with PTD. Choose the option that says 'Rebuild Partition Table'(if I remember it correctly). It'll take only a few minutes to detect the existing partitions and only a few seconds to rebuild the partition-table.
3. GParted Comes to the Rescue
Sometimes fixing the partition table using PTD doesn't help(as was the case with me), in that case Gparted can be of great help. Gparted is a free software and it comes bundled with several Linux live CD's including Ubuntu. You can also run Gparted from a live CD. All you have to do with Gparted to fix the broken partition-table is to do some changes like edit or shrink a partition, create a new one out of existing space or so. Then save the changes to the disk. Reboot and now you shall be set free!
Happy Linuxing Guys.
Active@ Partition recovery is also an easy way to repair your partition table. You just need to download Active@ partition recovery and run the quick scan or super scan depending on how bad your partition's health is (which is depending on how many times you have overwritten data on the same sectors of the hard-disk), and choose the partition to repair. It takes just a few seconds to restore the partition information.
It will even tell you if any of your current partitions would be overwritten when restoring an old one! If such is the case with your PC, don't lose hope, you can still recover the contents of the partition by making a raw data image of the partition. It takes a while (a few hours actually) to write the partition image using this method but it restores all your data and doesn't even change your current partitioning setup.