

Either make a new one, or append to a previous one. TestDisk will ask if you want to make a log file. For example, if the drive is /dev/sda use the following command: If you don't have an image file, use testdisk on the drive directly. Start testdisk on the drive image you created earlier. I would recommend that you start your recovery attempt with TestDisk. Write the image to another drive that has space (this will take a long time, depending on the size of your drive it could be several hours).ĭd if=/dev/sda of=//image.dd TestDisk Avoid mounting the drive while you are trying to determine which device it is. You will need to know the device name of your drive (for example /dev/sda). If you have enough space on another drive to make an image of the affected drive, do that first. As stated above, do not boot your computer from the affected drive.) Making an image of the drive (This entire section assumes you are running from an Ubuntu live disc or another recovery machine.
#Formatted external hard drive recovery password
I have not yet attempted this myself, but I think you would have to recover every deleted file in the encrypted home folder (which may be the entire home folder in your case), and then use ecryptfs-recover-private to unlock the encrypted folder (using the password it was originally encrypted with) and search for the files you need. If you use an encrypted home folder, recovery will be even more difficult. If you have a large empty drive you can use to make a backup image of the drive on, that would be best.Īlso, when you are recovering deleted files, you must write the recovered files to a different drive than the one you are recovering from, or else you risk overwriting the deleted files in the process. Some data recovery operations can cause irreversible changes, so if you make a mistake on an image you can just start again with a fresh image. It is always best to do recovery work on an image of your drive instead of on the drive itself. Calm down and approach the task with a level head.ĭo recovery work from an Ubuntu live cd or by attaching the drive to another machine for recovery (do not mount the drive). Panicking can cause you to rush and do things without being sure they are safe. This goes along with what was said above. Recovering files is a sensitive task and impatience is your worst enemy.ĭon't panic. Just clicking things and trying every random suggestion you see online is a really good way to irrecoverably overwrite your data. The deleted data can get overwritten just by using the drive, and if that happens you will not be able to recover it.ĭon't do anything at all to the drive until you are sure of what you are doing. Don't even boot up the OS on the affected drive. When you realize that you've lost data and you need to recover it, the first and most important step is to stop using the drive entirely. If the data has not been overwritten and if you are able to use the tools well enough, it is very likely that it will be possible. There is no absolute guarantee you can get the data back.

You can try using a variety of recovery options, but be warned they are all a bit complex.

When you say you "reset" you OS, I assume you mean you re-installed.
