Mar 15, 2021

Half-assed Step-by-Step Guide on Recovering Lost Files From Corrupted External Drives For Free

 

It's been more than a year since I updated this blog. Life has really been busy, and with international travel out of the question, there was even lesser impetus for me to update this blog. I did however uploaded 2 travel vlog of my Okinawa Trip on Youtube so please check it out!

But this blog is not about the usual skincare or travel. It's about trying to recover lost files from corrupted external media.




If you follow me on Instagram (@Elpheal) you would know I love taking pictures. I've recently started offering free photoshoot sessions with models to hone my skills but something really unfortunate happened this weekend. One of my 64gb SD Card suddenly died while I was transferring the files to my Mac and then I could no longer access the drive any longer. It was corrupted. 

I then when on a heartbreaking journey trying to find a free File Recovery Program only to discover that all of them are NOT free at all. They would allow you to preview a scan of your corrupted drive to see if the files were inside but if you want to recover them, you'd have to pay. 

In case you're curious, I tried Disk Drill and EaseUS Data Recovery Wizard. Both of them performed remarkably well and was able to quickly detect all the files that were still residing in my SD Card. But they cost a heartbreaking amount of AT LEAST SGD $80+ for a one-month subscription and $170 for a lifetime subscription. 😭

I was all ready to throw my money in until a friend recommended I try TestDisk first. 


TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software: certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.


I won't lie, it was difficult to get Testdisk to work for someone who is so rusty on her Command Prompt skills. I don't think I've ever done any Command Prompt actions on Mac before so everything was like coding greek to me. I did manage to get started on my own but got stuck trying to get Testdisk to run. Thankfully God sent an Angel and I was guided through most of it - Thanks Tim!

As someone who has a Bachelor in Information Technology (yes, are you surprised 😏 ) the whole experience felt so foreign to me. Granted I've never been a big coding fan and has hardly touched the stuffs I learnt in school for nearly a decade. I'd still wager I am probably better skilled than most non-IT trained people. I imagined it'd be nearly impossible for someone with no Tech experience to recover their files so I made a short tutorial to help you get started. 

DISCLAIMER ALERT: The information in this post is for reference only and I cannot be held accountable for any lost in data. You proceed at your own risk and you will probably need additional google skills to figure things out yourself. 

The following example is utilising TestDisk to recover photo files lost in a corrupted external SD Card. The example given is for use in a MacOS Catalina 10.15.7. 


Start by typing "terminal" in Spotlight Search to open up the mac command prompt

This is how the terminal looks like. Just a plain white rectangle.
go to homebrew website (https://brew.sh/ ) and copy the script at the top

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 

I recommend you click on the small "copy" icon on the right side of the code. Then paste the code into the terminal



It will ask you for your computer's administrator password. Type it in (it will be invisible)  and press enter. 



When you see the above message, press Return (Enter) on your keyboard. And your installation should begin. 



installing....
Installed. Now don't close the terminal window.

The next thing you need to do is install Testdisk  (https://www.cgsecurity.org/wiki/TestDisk_Download). If you are a Mac user like me, you cannot run the Testdisk UNIX Exe directly and so must install it via Brew (which was what we just installed above).

Make sure you connect the corrupted external drive to your computer now before we beginning the next step.

So back in the same terminal just type " brew install testdisk



In my screenshot example above, I've already installed testdisk so the prompt asks if I want to reinstall it. For you, it should just run automatically.


reinstalling Testdisk on my computer to demonstrate for you....

Done.


After you have installed Testdisk. Type "sudo testdisk". Make sure the spacings are correct.


It will ask for your admin password. Type in and press enter.


Testdisk's Command-Line should appear automatically. It's this boring black window. Here, you cannot click anything to select it as it is not a UI (User-Interface) system. You can only use your keyboard (Up Down Left Right Enter etc )to select the options. 

I selected the [Append] option and pressed enter.

Then it showed me a screen that shows all the connected disk spaces on my computer. Disk0 is of course my Macbook Air's Default HDD. And so is rdisk0 and rdisk1 (both 121GB). 


Disk2 and rdisk2 are actually my connected 4TB External hard disk. It's the same disk so I'm not too sure why it appears twice. But here's where things get experimental.

* In this example photo, it shows my 4TB external HDD which was not the corrupted 64gb SD Card I mentioned above. I was just too lazy to remove the 4TB Ext HDD and attach my SD Card for this demonstration. Just a little FYI in case I confused any of you. 


The first time my friend and I tried recovering the data, we went through all the possible options and eventually 0 files were recovered. The SD Card was so corrupted that it is not even appearing on my Desktop. If I were to open Disk Utility on Mac, it shows that an external drive is connected but it is greyed out. The computer cannot detect the drive and even TestDisk was not able to recover from it.

It's all very technical, I still don't know why and I'm too lazy to figure it out.

But.

Exit from Testdisk and remove the card from your mac now.

What I did was, I reformat the SD Card in my camera (not sure why we couldn't reformat it on the laptop directly). I popped the SD Card back into my DSLR Camera and reformated it within the camera. Then I stuck it back onto the card reader and this time, the mac reads the external disk since it has already been "fixed".

We went back to the terminal, typed "sudo Testdisk" again. Selected the drive and then selected a destination to save the recovered files to. 

Start by selecting the correct external drive with your Up and Down key, then press Enter.


 



This is where my memory gets hazy and I hope I haven't left anything out. As mentioned above, take this blog post as more a reference than a tutorial.

It should bring you to the next page that inquires about the partition type of the file system. I selected "OTHERS (FAT, NSTF etc)". And then it asks for the destination to save the recovered files. 

We selected 
Volumes/
Users/
Elpheal/ (in your case it will be the Username of your log-in account)
Pictures/
and at the top row of the root Pictures folder, we pressed 'C' to select the destination folder.

Basically, I asked Testdisk to save all the recovered files in the Pictures Folder on my local Hard Drive. 





Select the Root "Pictures" Folder and then press "C" to select the folder. Then your backup should start automatically.





This photo was taken during one of my other countless failed recovery attempts and so the error message at the end was notifying me that nothing was found and that the estimated scanning completion time was only 1 minute. 

If you had a few hundred Raw photographs like me, the amount of time required to recover them would be roughly 1 - 2 hours. 


Navigate to the File Destination you selected (In my case, Pictures Folder) and you should see new folders and files pop up automatically. Your files should be in those folders. 


Here are some extra resources you might find useful:


Usually, tech bloggers will ask their readers to leave them a comment or let them know if they have encountered any problems but I'm going to be blunt ... please don't approach me if you run into any problem. I am almost as confused as you are and will likely not be able to answer them *quivers in a corner T_T*. 

I still do hope this post has been useful to you. Let me know if it do!  Adios! 





No comments: