Resurrect NTFS partition after Win XP reinstall

Another unpleasant experience with windows last week. (We’ll just disregard the notorious behaviour of Win installer which eradicates any previously installed foreign OS boot manager.)

I have Ubuntu 10.04 and WinXP SP3 multiboot. I have 3 partitions:

1) NTFS, WinXP (defunct)
2) ReiserFS (+ extra swap partition) Ubuntu
3) NTFS, Storage (lots of my windows projects stored there)

Few days ago, my WinXP stopped working, no way to boot it, something went so terribly wrong, and from the previous long year experience with windows I could simply sense when the time for total reinstall has come. Since I have started with Ubuntu 9.04 my GRUB was the legacy mode GRUB, so I prepared an Ubuntu 9.04 live cd to be able to reinstall GRUB after installing WinXP, and naturally: I though I was ready for the operation.

I booted from the Windows XP SP3 installation DVD, selected partition C (NTFS) to be reformatted and chosen as destination. Everything went smooth, C was erased, new Windows appeared on it, I rebooted the computer, and was happy to see that everything is there..

Or at least I thought so.

The system was missing my partition E, or my Storage partition. It was wiped out. Storage manager denoted it as unallocated space. A quick reboot into Ubuntu ended up with same knowledge: Unallocated space.

No space for panic. Google comes, google helps. I found a marvelous little command line tool which was able to revamp my Storage NTFS partition in about 10 seconds. It’s called testdisk.

Open your synaptic, type testdisk, install it.

Open terminal, type
<pre>
$ sudo testdisk
</pre>

1) Now on the first screen select [ Create ] ( Create a new log file ).
2) From listed hard discs select the one that you need to salvage. Then [Proceed].
3) Then [Continue].
4) Then [Intel] – this works in most cases, but if you have some other exotic partition types, you can tell testdisk which one it is on this screen.
5) Then [Analyse].
6) Then [Quick Search] – this will do most of the time. But if corruption was more severe, you might need to select another round of ‘deeper search’.
7) On the next screen select Vista [Y/N] – N, if you used WinXP to create the controversial partition.
8) — disregard the stupid smiley –  Now you will see all partitions that testdisk was able to identify. Press Enter (continue).
9) Ok finally – if you are happy with the results, ie. you see your lost partition in the list, select  [ Write ] and reboot (you will be informed about that on the next screen anyway). But if testdisk wasn’t able to dig out the lost partition, then select [ Deeper Search ].

It saved my night. And a lot of data. I think this tool exists for windows as well. Check it out, remember it. It will come handy sooner or later!

[EDIT]
Yep, TestDisk runs on several platforms – check it out:
http://www.cgsecurity.org/wiki/TestDisk

Tags: , , , , , , , , , , ,

Leave a Comment