Oh no! You deleted, overwrote, or spilled coffee on your partition table! What’s next?
For almost anything (except the spilled coffee), you can check out TestDisk, available in Fedora. Simply launch it and follow the on-screen instructions.
Story
One fine day, with birds singing outside on a bright sunny afternoon, I decided to install Fedora on a test box. Incidentally, that machine had an old hard drive with lots of photos from my school and college days. And so, the saga began.
Working across three systems (an Eee PC, my office laptop, and the test box), I was breezing through the installer clicking “Next.” Suddenly, horror struck: I realized I had selected “Remove all partitions…” In an instant, my hands hit Ctrl+Alt+Backspace. Little did I know, the partition table had already been blown clean and overwritten. All I could take comfort in was the fact that the drive hadn’t been formatted yet and no new data had been written.
Thus began my search for a way to recover the partition table. I first looked up gpart, which looked promising, and downloaded the source. Alas, gpart failed to build with compile errors. Working through options one by one, I ran yum search ntfs, and right on the last line I spotted testdisk.
I saw the light: testdisk worked its magic and saved my data from being lost for eternity.