2

So I wanted to install Ubuntu on USB, and I think I installed it to my 1TB hard drive instead. The hard drive has/had very important data on it, mainly family photos and work assignments...

Doing some research, I want to use testdisk to try and recover my data and I was wondering if I can recover them to the same hard drive as what was overwritten If that's possible?

Jeff
  • 1,674
HorizonBloom
  • 81
  • 1
  • 6
  • If it got overwritten, no recovery is possible. You might only recover data from sectors that did not get overwritten and were only marked as free to reuse. However, recovery onto the same partition is normally not possible, as the risk is high that you overwrite not yet recovered sectors with the recovered data. – Byte Commander May 02 '18 at 15:43
  • What if the data was erased, as it tools about 5-10mins to install Ubuntu... and I have almost all of the 1tb drive filled... if it were to let's say erased, it can be probably be recovered right? – HorizonBloom May 02 '18 at 18:17
  • If it was erased and not overwritten there is some small hope. But don't use the USB for anything until you run the recovery software. and don't boot from it either as the OS will start writing to an area of the disk where your erased files might be. – Jeff May 02 '18 at 18:23
  • Maybe this link can help, Accidentally did dd /dev/sda. Try Testdisk, and if no luck PhotoRec. -- If you have not yet shutdown or rebooted the computer, the accepted answer (to that question at AskUbuntu) might do a miracle. – sudodus May 02 '18 at 18:49

1 Answers1

1

First, DO NOT USE THE DRIVE FOR ANYTHING! at least until you decide what you want to do. Booting from it could allow the OS to start overwriting what may be left of your files. Other actions could cause problems too. It is probably best to leave it powered off (especially if it's a HDD) and disconnected from the system so that no disk clean up tool runs on it by mistake.

Byte Commander is mostly right. If you installed your OS on top of where you had your important data recovery is probably not possible, at least not on your own.

You might be able to get it back if you are willing to fork out a bunch of money for it. There are some recovery companies out there that use special equipment to try to read what was on the drive before it got overwritten. Look for a data recovery service that has the ability to do more than just run a software recovery (for example drive saver). If you want to try this DO NOT USE THE DRIVE FOR ANYTHING! Any writes that happen to the drive at this point will reduce the chances of getting the data back. There is also no guarantee you will get the data.

If the data is not worth spending money on you can try something like testdisk (as you suggested) or easeus or other recovery programs. I have not used either one myself and it's been a long time since I had to do a data recovery so do your research before you pick one.

If you have another disk to write the recovered files to that is also the safer option.

Please note I do not have a lot of experience in data recovery. so I'd be happy for someone else to answer but I know enough that I wanted to help where I can to avoid you doing something that could make it harder to get the data back.

Jeff
  • 1,674