While Installing Gentoo Linux I Erased My Windows NTFS Partition

I’ve been using Ubuntu for my desktop OS and my labmates finally convinced me to replace it with Gentoo. They are heavily in favor of the Portage package management system and Ben spent some time earlier today showing me the coolness of Gentoo. I returned convinced of its superiority and was determined to have it installed on my system by the evening.

Got the installer live CD, fired it up and did an incredibly stupid thing – I used the partitioning util that comes with Gentoo to configure THE WRONG DRIVE. Yes, I killed the partition table of my windows partition thinking it was a different disk where I wanted to install Gentoo.

Fortunately I found a kick-ass util called TestDisk: http://www.cgsecurity.org. The great thing about this program is that it can scan for lost partition data and restore it. In the case of NTFS its a bit more complicated because this filesystem has two boot sectors – a primary one and a back-up located elsewhere on the drive. If there is a mismatch the filesystem will be unreadable. This was the case for me and I just figured it out and restored my Windows drive! Phew… my thesis is on that drive and its not done yet!!!