Restore formatted partition

Using TestDisk to undelete files
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
Carlttt
Posts: 3
Joined: 15 Jun 2019, 17:17

Restore formatted partition

#1 Post by Carlttt » 15 Jun 2019, 18:16

Here's a breakdown:
I accidentally formatted a partition during a windows reinstall. I want back either the partition or certain files.
This partition has not been overwritten yet, I installed windows on a different partition.
The formatted partition takes up half the space on a 512GB SSD so recovery should be relatively fast.

I have previously managed to get back files with testdisk but that was years ago (with a HDD instead of SSD - if that matters)
I can't figure it out anymore. Last time went intuitively but this time I'm finding files that are already on the disk? I keep finding the file-trees of the current windows install, very confusing.
I tried photorec to recover all files it found but none of them were of the file type I'm wanting back.

This is what I'm doing:
Start test disk, no logs (I can make one if you want) Select 512GB disk, intel partition, analyze...
Now it lists three partitions. This is correct. It used to be two 256GB partitions but I chopped one partition in half making it three. My lost data is on the 256GB partition I did not chop up.
After running quick search I get this, the formatted partition is the bottom one:
screeni.png
screeni.png (19.83 KiB) Viewed 1364 times
So I select the bottom partition and press P to list files. But all it lists is the recycle bin (which basically contains nothing) and system information (again nothing except some odd files)
So go back by pressing esc. I see that I can change the P in front of the partition to become a * or L or D and this turns all the partitions grey. But again when I press p to list files I find nothing.
When I search the top partition I find the current windows install which is the only thing it currently contains.

So I put everything back to green and I press enter which takes me to deeper search. Deeper search brings up another partition. This partition is the whole disk from 0 to 62260.
I press P to list files. It contains the same files as the current windows install.
The other partitions contain what they previously contained. Switching from D to L to * to P doesn't list any different files.

Press enter to continue. Discard the results Y. Quit.

What am I doing wrong?

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 4846
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Restore formatted partition

#2 Post by cgrenier » 16 Jun 2019, 09:45

As the partition has been reformated, you should try TestDisk, Advanced, select this partition, Undelete and if it doesn't work, use PhotoRec instead. Be careful to store the recovered files on another partition.

Carlttt
Posts: 3
Joined: 15 Jun 2019, 17:17

Re: Restore formatted partition

#3 Post by Carlttt » 16 Jun 2019, 19:18

Thanks for your reply! I had already tried PhotoRec but it recovered over 200 folders full of "junk" that I still have to look through. I did already run a search through windows for a specific file extension and it found nothing so I continued trying to restore the old partition.

Restoring the old partition went a little less smooth than I thought. I was getting a bit desperate so I restored a partition which contained no files just to see what would happen. I even pulled up the help pdf to confirm I wasn't making mistakes. So I restored the old partition but then the new partitions disappeared (and the restored partition didn't contain any files of course). This meant that my windows partition was gone so I ended up using an old pc to restore the partition again, using testdisk, and now I have it back but still not the old partition or my files.

I should give some more background info:
Previously the disk had two partitions. One had windows 7 installed, the other windows 10. I was dual booting. Windows 7 was installed first, then years later windows 10. Not a big fan of windows 10 so I want an alternative but windows 7 is near end of service. The plan was to delete windows 7, turn that partition into two partitions and install two linux based OS's to try them out or maybe keep one linux and go back to windows 7 anyway.

I tried to simply format the partition that contained windows 7 but there were files it didn't allow me to delete, even with admin privileges. Undeterred I tried using Hardwipe (disk cleaning tool) to format the partition. However after I started it I noticed that it was going to overwrite the entire partition and not just the data on the partition (I had messed up a setting) so I quickly cancelled it while it was still at 1% done. After that the partition required a format to be able to access it so I did that and now it was nice and empty. So I continued with my plans and used MiniTool Partition Wizard to split the partition into two partitions. Then, with windows 10 still installed (and containing the files I want back) and two empty partitions I rebooted. If unlike me you're experienced with dual booting you might be having a bit of a laugh by now. I'm saying that because I'm suspecting that I simply messed up the dual install somehow, either when deleting windows 7 (which windows 10 really didn't want me to do) or when re-partitioning my drive (which windows 10 didn't like either that's why used a third party tool) And I can imagine that even 1% of Hardwipe would be enough to destroy a file system in such a way that TestDisk wouldn't find it anymore. However I didn't imagine that the windows 10 partition would somehow rely on that file system too, then again for the dual boot maybe it makes sense.

So when I rebooted windows 10 didn't work anymore. Ironically the only OS I had ready to install from USB stick was windows 7 so I decided to install that again. But after I did that and rebooted to complete the install of windows 7 it gave me booting errors again. This is when I decided to format the partition that contained windows 10, assuming that it was simply broken. I thought that the only stuff lost would be some games that I can just reinstall with Steam but I had forgotten that I had recently moved some more important files to the drive from an old external one, those are the files I'd still like back. Anyway: formatting the windows 10 partition made the fresh install of windows 7 work, immediately after that I tried recovering the files using TestDisk but it didn't work so I went here and started this thread. Long story but there it is.

So again if anyone can point out where I made a mistake or how to still get back my files I would greatly appreciate it. I have another option too: simply try to restore the files from the old external one. But I have used it quite a bit since so there's a good chance it's overwritten by now and it's an old slow HDD so deep search will take much longer. I'll probably set it to deep search before going to sleep tonight but I'm losing hope.

recuperation
Posts: 216
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Restore formatted partition

#4 Post by recuperation » 16 Jun 2019, 20:22

Carlttt wrote:
16 Jun 2019, 19:18
Thanks for your reply! I had already tried PhotoRec but it recovered over 200 folders full of "junk" that I still have to look through. I did already run a search through windows for a specific file extension and it found nothing so I continued trying to restore the old partition.

Restoring the old partition went a little less smooth than I thought. I was getting a bit desperate so I restored a partition which contained no files just to see what would happen. I even pulled up the help pdf to confirm I wasn't making mistakes. So I restored the old partition but then the new partitions disappeared (and the restored partition didn't contain any files of course). This meant that my windows partition was gone so I ended up using an old pc to restore the partition again, using testdisk, and now I have it back but still not the old partition or my files.

I should give some more background info:
Previously the disk had two partitions. One had windows 7 installed, the other windows 10. I was dual booting. Windows 7 was installed first, then years later windows 10. Not a big fan of windows 10 so I want an alternative but windows 7 is near end of service. The plan was to delete windows 7, turn that partition into two partitions and install two linux based OS's to try them out or maybe keep one linux and go back to windows 7 anyway.

I tried to simply format the partition that contained windows 7 but there were files it didn't allow me to delete, even with admin privileges.
1. error: Forcefully deleting a partition with obvious signs of use.


Undeterred I tried using Hardwipe (disk cleaning tool) to format the partition. However after I started it I noticed that it was going to overwrite the entire partition and not just the data on the partition (I had messed up a setting) so I quickly cancelled it while it was still at 1% done. After that the partition required a format to be able to access it so I did that
2. error: Trying to repair something with the "FORMAT" command.
and now it was nice and empty. So I continued with my plans and used MiniTool Partition Wizard to split the partition into two partitions.
Then, with windows 10 still installed (and containing the files I want back) and two empty partitions I rebooted. If unlike me you're experienced with dual booting you might be having a bit of a laugh by now. I'm saying that because I'm suspecting that I simply messed up the dual install somehow, either when deleting windows 7 (which windows 10 really didn't want me to do) or when re-partitioning my drive (which windows 10 didn't like either that's why used a third party tool) And I can imagine that even 1% of Hardwipe would be enough to destroy a file system in such a way that TestDisk wouldn't find it anymore. However I didn't imagine that the windows 10 partition would somehow rely on that file system too, then again for the dual boot maybe it makes sense.

So when I rebooted windows 10 didn't work anymore. Ironically the only OS I had ready to install from USB stick was windows 7 so I decided to install that again.
3. error: Overwriting stuff on a disk in need for recovery.

But after I did that and rebooted to complete the install of windows 7 it gave me booting errors again. This is when I decided to format the partition that contained windows 10, assuming that it was simply broken. I thought that the only stuff lost would be some games that I can just reinstall with Steam but I had forgotten that I had recently moved some more important files to the drive from an old external one, those are the files I'd still like back. Anyway: formatting the windows 10 partition made the fresh install of windows 7 work, immediately after that I tried recovering the files using TestDisk but it didn't work so I went here and started this thread. Long story but there it is.

So again if anyone can point out where I made a mistake
see remarks above
or how to still get back my files I would greatly appreciate it. I have another
Sorry, after testdisk and photorec failed I can only recommend using a professional recovery service.

Carlttt
Posts: 3
Joined: 15 Jun 2019, 17:17

Re: Restore formatted partition

#5 Post by Carlttt » 17 Jun 2019, 00:21

error: Forcefully deleting a partition with obvious signs of use.
Yes, I already suggested that was probably a bad idea. But you're not explaining how two partitions containing windows installs would be connected to each other and why I couldn't just delete one and have the other still working. I already looked it up though. I should have changed a setting in System Configuration to single boot first. That's all I probably messed up.
error: Trying to repair something with the "FORMAT" command.
I just had to format the drive to be able to access it. After that the data was gone like I wanted it to be. I didn't have to repair anything at that point and my windows 10 install was still working fine until I rebooted. You're not explaining how this messed up the install. You're just pointing out what I was already trying to make obvious in my post. In fact you sound like you're angry that you had to read my post. Well, nobody forced you to read it and guess what? You didn't do a very good job at reading my post because...
error: Overwriting stuff on a disk in need for recovery.
I didn't. I'll repeat for you: win10 and the data was on partition 1. I installed win7 on partition 2 before formatting partition 1. I saw that partition 1 still contained data before and after installing to partition 2. But when I rebooted I still had the error so that made me format partition 1, which in turn made win7 on partition 2 work. I just can't figure out what causes the old partition tables to not show up in TestDisk after a deeper search. Maybe it was the 1% hardwipe or maybe it was just the format at the install screen. Since the hardwipe wasn't made on partition 1 nor did it immediately affect partition 1 I tend to lean in favor of the format at the install screen. Just to be clear: it used to be two partitions neither of which is showing up anymore. It only finds the current three partitions. A deep search only discovers a fourth partition which is the whole disk empty, from when I bought it I assume.

But like I already said I'm having problems with TestDisk. Since I didn't find partition 1 containing files I recovered partition 1 containing nothing, just to see what would happen. Like I said this messed up the other partitions so I had only one empty partition of half the drive left. Shouldn't it have kept partition 2 (containing the fresh win7) and partition 3 (still empty) intact? I managed to restore partition 1 back again but now the other partitions are gone and I have to remake them. Does TestDisk automatically change the entire disk or should it leave other partitions intact? Any actual help will be greatly appreciated.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest