How to recover a damaged USB partition

Today I was trying to add a winxp partition to my Ubuntu PC and I stupidly left my 640GB external usb disk attached.

I made the mistake of “deleting” the wrong partition to install winxp and accidentally zapped the USB disk partition!

To the rescue came testdisk which can be added using the “Ubuntu software centre” menu.

Once installed type:

sudo testdisk

and simply follow the menus.

As far as I remember I selected “intel” as the type, and then “write” to write back the partition and I got my partition back fine.

Thanks testdisk!

( http://www.cgsecurity.org/wiki/TestDisk )