While installing Ubuntu 11.10, I converted by Fedora's ext4 partition to swap by mistake.

Please assist to recover the files and partition.

  • 1
    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
  • 1
    It's only gone if the swap has been used by a running OS. – ζ-- 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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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