Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I formatted a xfs partition by mistake to ext4. Can this be undone and the data recovered?

Actually, I did not chose to have the partition reformatted during installation, I just kept the default partition type ext4, when I should have selected xfs, so I do not know if the installer reformatted it or just changed the partition type. I'll give a try to testdisk since I now have cloned the drive with dd.

share|improve this question

Testdisk couldn't do anything. I was able to use photorec to restore the data, music files mostly, and using Musicbrainz Picard I was able to then rename the restored file automatically.

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.