Can you use the latest version of Ubuntu?
It contains a newer version of TestDisk too.
Do you use a Live-CD.
That depends on, how much data you've already written over your underlying previous OS.
When you've written a new OS over an existing one, you'd need datarecovery software.
In most cases it's possible to recover important underlying data.
Please don't write anything to your disk anymore.
When you were writing only a small amount of data to your disk, I'd consider to run a TestDisk diagnose.
When you were overriding a lot of data, you can try to recover underlying data.
You can use PhotoRec.
Info:
http://www.cgsecurity.org/wiki/PhotoRec
http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step
Tips:
You can run FileOpt and pressing "s" will deselct all file types.Please select only these file types which you'd like to recover.
You should only scan empty space.
It avoids to recover existing files.
Target is the PhotoRec folder.
If you'd like to choose another target/destination you can check these two dots in the upper area of the display and press enter.
Eacht time you'll get 1 directory up, until you get to your disk selection.
PhotoRec doesn't recover directories, and original file names.
If you'dlike to keep file names you should have a look for commercial datarecovery software.
Fion a