Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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.10, I converted by Fedora's ext4 partition to swap by mistake.

Please assist to recover the files and partition.

share|improve this question
if it's converted to swap, then it's cleared. And all info is gone – Alvar Jan 29 '12 at 14:19
It has been formatted. So long information. Sorry mate. – bioShark Jan 29 '12 at 14:45
It's only gone if the swap has been used by a running OS. – hexafraction Jul 17 '12 at 11:37

When formatting a partition as swap only the first few couples of bytes get overwritten, so the data should be recoverable to some extent.

I'd try testdisk and in its options mark the partition as ext4 and try to list files.

If that doesn't work, I'd try to recover by using the backup superblock (still in testdisk).

If still no luck, then try photorec to recover the files at least.

For more info see

share|improve this answer

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.