Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

While installing Ubuntu 11.10 (ext4) I accidentally chose a wrong partition and it overwrote my Windows 2003 installation (ntfs). How can I recover files?

So far I tried photoRec and it recovered some. Testdisk refuses to recover the entire partition, perhaps because it would have to recover a partition it is running from. Should I try making a liveCD "rescue disk" and run testdisk from there? Is there any software that could help me? Or should I install Windows again on another partition and try recovery with some Windows software?

share|improve this question
Recovery is a black art, the only security is to backup, regularly. And double-check your partitioning when doing any potentially destructive operation. – invert Jan 23 '12 at 6:10

Your overwritten files are lost forever from that partition. Restore them from backup.

Running Testdisk from a live CD might help a little; use the Testdisk live CD, which has a number of recovery tools. But be aware that recovery quickly gets difficult; it'll be quicker to recover your own data from backups, and to reinstall any third-party software from where you got it in the first place (and you will have to redo a clean installation of Windows itself).

share|improve this answer

You should also try Foremost and Scalpel. Here you can find an excellent article that explains clearly how to do it: http://www.howtogeek.com/howto/15761/recover-data-like-a-forensics-expert-using-an-ubuntu-live-cd/

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.