Testdisk a.k.a how to save your ass if your Parted screws up

I was installing Kubuntu. Everything was going fine. I clicked on “Partition” and the next thing I know, the stupid thing crashed. In 1 freaking second.

Of course, I then checked my partitions. It had lost everything. It hadn’t followed what I had asked it to do (i.e make a new partition). On its own , Kubuntu decided that I should really switch to Linux completely thus making a 74GB Ext3 partition and a 2GB swap.

First I cursed all graphical installers. Then I thanked god for Slackware. Then I thanked Him again, for crashing Parted. If it hadn’t, it might have written these changes to disc. Right now, it had just changed the partition table entries. It should be possible to get my data back.

Frantic Googleing , IRCing etc. followed. #ubuntu on freenode was a god send and I found out about TestDisk. Man, TestDisk is easy. In a few minutes everything was back. So easy!

I then restart and find that the computer is refusing to start up the original windows. I tried a thousand things , booted a windows Installer CD did fixmbr , fixboot and what not . Nothing worked!!

Then I found out the problem. The windows partition wasn’t marked bootable. Although Linux boots off a partition not marked bootable, Windows doesn’t. A quick fdisk (the same Kubuntu LiveCD!) and I was golden.

Moral of the story : Remember to set the bootable flag.

There are no comments on this post

Leave a Reply