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 had accidentally installed Ubuntu 13.04 on Windows 8 while trying to Dual Boot. I had a single partition(973GB) which had windows with NTFS filesystem. But by the accidental install of ubuntu the filesystem had changed to ext4.

When I tried testdisk, it showed me three partitions:

  1. P EFI System (with very less data)

  2. P MS DATA (the large disk of around 950GB. I think this partition has all the data)

  3. P Linux Swap (same size as my ram)

Now when I tried searching, it showed that the partition MS Data cannot be recovered. I dont need the partition or the windows 8 back. I only need some of my important files that got deleted. Can I recover these files? Please help.

share|improve this question
good question.. actually it happened to me once, and that time I was unaware of any thing. I am much sure answer suggested by Luis Alvarado will work.. – Saurav Kumar Sep 3 '13 at 15:54

You can still recover them by using photorec which comes with testdisk after you install it. Type in a terminal photorec and select the hard drive / partition you wish to analyze and the place where you want to store all recovered files (Should be a place not on the same hard drive you are trying to recover from).

enter image description here

Your same case has also happened to me. Trying to recover files from a previous NTFS or FAT32 partition that was formatted to Ext3 or Ext4. In the end it recovered all files we needed.

share|improve this answer
Thanks for the answer. I have two more doubts. 1. Do I need to run photorec from livecd/liveusb or can I run it from ubuntu I installed on the same drive? 2. My HDD is 950GB approx. I had data of around 600GB. Can I use a usb drive of around 8/16GB to transfer my data to another computer in many trips? – Yasaswy K Sep 3 '13 at 22:24
You can run it from the same drive but you might recover more info than the current HDD. Let's say you have a 1TB HDD but you have formatted the HDD 2 or 3 times. On each of this times, the HDD was 90% full (900 GB). This means that photorec might recover, not only the missing files in the current formatted partition but also from previous ones, recovering 900x3 = 2700 GB of information (Worst case exaggerated scenario). So you need in most cases a larger hard drive than the one you are recovering from. For using USB drives for it, it will not work. You can not unmount while recovering to it. – Luis Alvarado Sep 4 '13 at 0:25
I tried using photorec. But it always gets stuck at some sector while reading and does not go further. It happened twice. Is there any other way I can do it? – Yasaswy K Sep 12 '13 at 4:42
Did you try doing an fsck to the hard drive. For example: sudo fsck /dev/sda1 -f – Luis Alvarado Sep 12 '13 at 5:48

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.