in the city
Hard drive recovery
My home server’s hard drive and the backup drive failed on the same day, so I’m trying to extract whatever I can from the bad disk. Here are my notes so far:
Boot the dead machine with a Linux live CD; the failed drive won’t mount because the main superblock is one of the sectors that failed.
Make a disk image on a remote machine:
$sudo dd if=/dev/hda bs=512 conv=noerror,sync | ssh user@othermachine:server_hd_backup
conv=noerror tells dd to skip over bad sectors; conv=sync tells it to pad the holes with zeros, so that the resulting disk image will still have everything that it can read in the right place.