Disk repair/fix
Yesterday I made a disaster. Instead of formatting the USB flash drive, I accidentally formatted my 1TB Toshiba hard drive with photos, backups and very important documents. It was late and I was very tired but there is no valid justification for what I did.
Double backup
I had only one backup of my data and this is a serious mistake, this experience helped me and I ordered a second 2TB disk on which I will make a further backup.
I tried to keep calm by immediately disconnecting the disk.
It could happen to other people, so I want to share how I was able to fully recover my data.
Keep Calm & TestDisk
Disconnect the disk immediately and avoid accessing it or even saving anything on it.
Download TestDisk program, you can install it from your Linux distribution’s package manager.
Follow this guide
After running the Deeper Search the partition will appear, click the right arrow key to turn it green. If Write does not appear, select Rebuild BS to recreate the boot loader from the backup one.
After reboot it may be impossible to access the disk with unknown error when mounting dev error … in this case continue to the next paragraph.
PhotoRec
Before making other attempts, run the PhotoRec program from root and follow this step by step guide
Make sure you have enough storage space to save a copy of data you have lost.
After the long disk scan if all goes well you will be able to save your files but you will lose the file names and the original folder structure.
Disk repair from a Windows system (unknown error when mounting dev)
If you have a working Windows installation available, connect the disk giving the error unknown error when mounting dev.
Open the cmd terminal with administrator privileges by pressing the Win + X keys.
From the file manager, locate the drive letter of the disk to be repaired, in my case E:
Run this command from the terminal:
After a long process that can last several hours if you are lucky as in my case you will recover the entire disk with folders and files in the right place as it was originally. Good luck then and do a double backup next time!!
Leave a Reply