today I’m going to show you how to recover data from a severely corrupted hard drive with Internet Linux now this hard drive in particular was sent away to a repair shop but I attempted to do a recovery from within windows and he failed so my brother gave it to me said look quids give it a go see what you can do and I’ve done it crippled my system doing it cause a lot of kernel errors however I’ve recovered about 70% of the data could be more I could have got up to 100% honestly I was getting bored because the drive was so slow caused errors on boot-up fingers like soft ATA reset errors so let me show you what I’ve done the tool I’ll be using is called test disk I’ve installed that in the bun too by using sudo apt-get install test disk and the other tool that I would like is smart mom tools now it drags in a few unnecessary dependencies so I’ve used the flag no in the store recommends with it I want to find out which drive I’m looking for so you can either use a GUI tool like gparted KD partition manager with in KDE systems or the drive manager within like a bun – or I can use f disk – shell and then try and find off the list I believe it was a 320 GB hard drive so long to make easy as one at the end that’s what I’m looking for dev slash SD e let’s get an idea of how badly damaged the drive is using the smart monitoring tool so sudo smart CTL – I slash dev slash SD e gives me a little bit of information first so it’s Western Digital blue 320 gig blah blah blah and not really much relevant there so I want smart CTL – a give me all the information please and let’s take a look what’s happened here immediately scrolling up I’ve seen error got lemon ech 22,000 occurred at disk power on blah blah blah is a lot of errors here so scrolling up I’m looking at the ATA error count their goats make a bit shorter so 88 error count 20 2246 that is horrific interestingly when I started with the drive it was about 14,000 so it’s actually added another 8,000 since I’ve been using it it’s important in this case when you’ve got a heavily corrupted drive to actually try and take a backup of it first if you’ve got the hard drive space about available on your system you can use this program here called test disk so I’m going to run it with sudo test disk you can even run it with just pseudo test disk or you can direct it to a specific location so select the media to use where’s dev SDA that’s the one I’ve gone for so proceed so I press enter now my case here it is a particularly slow drive because it’s so heavily corrupted and it’s causing a lot of issues for my system so it will take a long time here before it sort of responds give test disk some information about the drive so some helps if you know what it is so in this case it’s a Windows drive and it’s quite an old drive so it’s not going to be an EFI GPT it’s not going to be Mac or anything else that it is going to be an Intel so let’s start of analyzing it give me some analysis of drive if you have all the partitions listed here or then great otherwise you can start doing the quick search and then try and rebuild a partition table in my case that’s not needed I have the partition table here that’s correct so now I’m good so let’s quit return to the main menu now go to advanced I’ll scroll down to the third drive again so I’m going to look at image creation just select a location to put it in are using the double dot you can go up a folder level up up takes you to the roots and just now go across the way you want to dump the image so I’m going to stop here because I’m already done wine but basically we’re to go across set the location and then give it a file name so press Q to quit go to quit yep exits quit so what I have is this image D D so I’ve taken 200 gig backup image of that drive now I’m going to run the program photorec that sudo photorec then provide it with the file name if you don’t you get the list of files so in fact you could run photorec on its own and then just try and take the files off the drive it’s just because the drive is so corrupted I want to work with it on the hard drive soup sort of increase my chances of recovering data so select the media yes proceed or select the drive from the list and yes proceed the press Enter now I’m going to look at the file options so this is going to be list of files we’re going to attempt to recover I went and unselected most of the files I just pressed s and then I scroll down the list of files that I actually want to try and recover so I’m trying to recover documents from this drive so I’ve got things like Microsoft Office documents windows metafile yes it’s a Windows drive of try for any audio flash files images I Sony I didn’t know the thought that might be JPEGs yes one those because there’s photos on the drive from trying to recover video files password files from keep are sex in yeah just literally looking down this to fault what what would be on the drive to recover now if you leave it a default selection you will get maybe more than necessary because it started backing up things like executable files and sequel databases and these are things out of the windows programs it’s a bit unnecessary really to get all adds so I just gone for that shorter selection so select partition I’m trying to recover from a whole disk it doesn’t matter because I backed up only one partition so go across the search and press Enter so what type of drive was it if it was a Linux system then odds are it’s going to be an ext two three or four drive if it’s a Windows system then like it is it’s going to be an NTFS or fat drive so other choose where you want to put the data so I just put it over here in rec 1 mini press C when the destination is correct I’m going to stop at this point because I have already done this recovery so what I ended up with a whole lot of data in a lot of folders it’s got about what 500 to 600 files in each folder and trouble is you don’t necessarily know what’s in all these files and I’ve been giving this driver than what’s on it because all across there and think who are these things well odds are that’s a temporary Internet file but it’s got documents in here at this point I could just go and give the drive back and say yet here you go file recovery is done crack on with it get your files back out of it it could be a bit nicer to my brother and his friend and saw the files out into a more convenient method so in this case I’ve got to recover all the images put them into a specific folder I’ll show you how to do that with like documents so it’s going to create a new folder here called rec Docs and navigating across to where that massive list of directories is so I’m going to type in this find command here and type in a selection of file names I’m after so got things like docx docx and go for PDF here as well so just go for that list then set the location where I want all the files to be copied to break Doc’s the b-list of that command in the description so you can run that and it will take this walled so I go across and look at the list of files have been found and you’ll notice here that are quite a lot is found files that have been deleted previously it’s actually done a full recovery of anything that was on that hard drive be it whether they an existing in-use file or a previously deleted file honestly if it was me looking for it I would start the largest items first and then go down from there that’s how to recover data from a severely corrupted hard drive in Linux thanks for watching see you later

Go ahead. It will just take a second!

Enter your Email Address