Print this page
Wednesday, 20 May 2015 00:00

How to recover the data from the hard drive starting to fail

Rate this item
(0 votes)

You should insert the drive into the knowingly operable machine (because the problem may not necessarily be in the drive, the controller may be faulty) having enough free drive space to store the whole volume of the failed drive and do the following:

    dd if=/dev/hdb1 of=/usr/local/tmp/root_fs.img conv=noerror,sync bs=1024
    fsck -y /usr/local/tmp/root_fs.img
    mount -o loop /usr/local/tmp/root_fs.img /mnt (in Linux)

After that view /mnt to see what was saved.

Mounting the file as a partition in FreeBSD:

   vnconfig -r labels -c vn0 root_fs.img
   mount /dev/vn0 /mnt

In FreeBSD, you can use the ffsrecov utility from the ports for recovery.

If fsck doen not find a superblock, you can specify an alternate location:

"fsck_ufs -b [16|32] .." for FreeBSD, 
"fsck -b [8193|32768|16384]" - for Linux.

Look at the following ports if the failure occurs in FreeBSD:

/usr/ports/sysutils/ddrescue

/usr/ports/sysutils/ffs2recov

/usr/ports/sysutils/gpart

/usr/ports/sysutils/scan_ffs

Last modified on Wednesday, 20 May 2015 13:19
Data Recovery Expert

Viktor S., Ph.D. (Electrical/Computer Engineering), was hired by DataRecoup, the international data recovery corporation, in 2012. Promoted to Engineering Senior Manager in 2010 and then to his current position, as C.I.O. of DataRecoup, in 2014. Responsible for the management of critical, high-priority RAID data recovery cases and the application of his expert, comprehensive knowledge in database data retrieval. He is also responsible for planning and implementing SEO/SEM and other internet-based marketing strategies. Currently, Viktor S., Ph.D., is focusing on the further development and expansion of DataRecoup’s major internet marketing campaign for their already successful proprietary software application “Data Recovery for Windows” (an application which he developed).