Recover data from a corrupted or damaged hard drive

'' This article Based on work by frontalot, nix, and Seb Stanley. Originally by Seb Stanley. at Linkstationwiki.org '' This article is a rehash of information contained in Create a perfect backup of the LinkStation filesystem and Upgrade (or replace) the existing LinkStation hard drive.


 * The hard drive data is recoverable in many cases. Sometimes the hard drive "failure" can be fixed easily.


 * Buffalo Technology's technical support recommends powering on the LinkStation, pressing and holding the red init button (on the back of the LinkStation) for 30 seconds, unplugging the power cord while holding the init button, waiting 15 to 20 seconds, plugging the power cord back in, and powering on the LinkStation. This method works for only the simplest cases.


 * If the previous method doesn't work, disassemble the LinkStation and connect the hard drive to a workstation. See Disassemble the LinkStation for complete instructions.


 * Boot your workstation using a Knoppix bootable Linux CD.


 * The LinkStation's hard drive may be recognized immediately (usually as hda3 or hdb3). hdx3 is the partition which contains the Samba, Netatalk, and FTP shares. If the hard drive mounts properly, you should be able to see your data.


 * If the hard drive does not mount properly, the directory information may be corrupted. Back up hdx3:

dd if=/dev/hdx3 of=/dev/hdz1


 * Where x is the LinkStation hard drive and z is the backup hard drive.


 * Check the backup drive:

e2fsck /dev/hdz1


 * If that doesn't work, there may be a corrupt superblock which needs to be fixed. Try:

e2fsck -b 32768 /dev/hdz1


 * Other valid superblocks include 98304. Consider making regular backups from now on.