Rescueing data of a failed hard drive

I accedientally pulled the power plug of a PC from the socket, and that PC was just starting to boot. The seagate hard drive inside stopped working, and the bad sectors turned out to affect the partition table, in any case, i slaved it on a windows vista PC, then into the Computer management, disk management panel, and what do you know, as if it has no paritions…

The solution to detect the boundaries of the 4 partitions it had is software called XXXX

Ran the software (The analyze option) , and what do you know, my partions exactly, 100MB made by Windows 7, a 479 GB partition for Windows, a 1GB swap partition for linux and an EXT3 partition for Linux…

So happily i asked the software to write the partitioning info to the disk, but the disk won’t hold the data, the bad sectors are where Windows writes the partition information

So, i ran down to the computer shop (In our building), and got the same exact drive (Seagate 500GB Model number xxx)

Mounted both on a Linux machine as slaves, both the damaged and the target.

To find out which one is SDC and which one is SDB, i watched as the linux machine booted, and as it booted, it threw in errors saying SDB all the time, so i know that SDB is the busted drive !

Installed gddrescue (apt-get install gddrescue), and ran it with the following command

ddrescue /dev/sdb /dev/sdc resumelog.log

(The additional log file helps us resume in case of interruption)

Once that is done, i put the new hard drive in a Windows machine, still can not see any partition info

1- Ran xxxx, it can see the 4 partitions, write changes… and what do you know, the partitions stick, we are good to go, i restart, but still, Windows can now see the partitions, but thinks drive G is not formated !

So i opened the command prompt (Elevated), then ran the command

chkdsk g: /f

the /f stands for fix, the thing took some time, but after the restart drive G works fine, all files are in there, and no one wants to kill me no more 🙂

S.M.A.R.T (SMART) data of hard drives under linux

The results of the commands on this post are Here

On windows, You can use speedfan, under linux you can read the smart data as follows

Use the smartctl command, but first you must install the package

apt-get install smartmontools

1- Checking for smart support, (All recent hard drives have it but you need to enable it in BIOS)

smartctl -i /dev/sdb

2- Enable reading it

smartctl -s on -d ata /dev/sdb

See it

smartctl -d ata -H /dev/sdb

Read more

smartctl -d ata -a /dev/sdb

Now some manufacturer specific smart atributes exist, you need to google them out, Also smart is not definitive, if S.M.A.R.T data says ok but there is a ticking noise in your hard drive, Don’t trust the hardware data, get backup.

Some hard drives like the Samsung Spinpoint come with extensive diagnostics software, My 3 2.5′ disks pass the test, pass the smart test, and tick when warm, i will let you know if it was the tick of death sometime soon

To run a self test…

smartctl -t <short|long|conveyance|select> -C /dev/sdb