Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While installing Ubuntu 11.04 I was asked to choose a swap area for better performances, so I chose my 1T hard drive(which had only one partition).

The problem is that I did not know it will use the partition as swap area rather than just put a swap file in the selected partition... (there was an unmarked "format" check box so I assume that my data will be saved)

This hard drive holds all my program files etc so I want it back!

So far I did:

sudo swapoff -a

What can I do in order to make my hard drive come back with its data? I do not wish to retrieve only selected files with some recovery tools.

P.S: it was 5-10% used before the accident and I immediately invoked the swapoff so I hope that my data was untouched.

share|improve this question

As I just answered to another question, if the damage is only a lost partition, you can check TestDisk.

share|improve this answer
I read your answer, however it does not suit my problem. while running TestDisk it finds the "Linux swap" partition. I want to get my previous partition back. Do you know of any way to solve this? (maybe i am using the TestDisk wrong...?) – talel Oct 10 '11 at 21:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.