Originally Posted by Vrajgh
The impression I've got from a number of articles on the subject is that a modern drive will automatically internally re-map bad sectors on write if it is unable to write to them. Hence dd to specific blocks could re-map them as necessary but would also destroy file data (which would already have been unreadable anyway.)
This is only partially correct.
I looked at the article you referred too that suggested using dd. I disagree with one statement where the author says that sectors will only be re-mapped when being written too, they will also be re-mapped when there are "signs of failure" when reading also. This is a firmware feature in modern drives that basically makes sure the data contained in sectors with signs of failure (need too many passes to read, values of which are determined by the firmware) will be preserved before it is too late. The author of that article may be referring to early firmware features of this nature that was still premature and not as full featured as today's firmware features.
An excellant utility for re-mapping old drive's bad sectors is SpinRite.
What doesn't make sense is that if you were to use dd to write to a specific set of sectors that were fine with skip and count, dd would just overwrite the existing data and it would be overwritten, not re-mapped. So...looking at it from this perspective, why would a drive re-map existing data if you're trying to overwrite it with dd? I am not as fluent in reiserfs as I am in NTFS as far as journal file systems are concerned due to my data recovery occupation and NTFS makes up 99% of my jobs.
I am quite surprised to have come out the other side with what appears to be a working machine. I would be amazed if there were no corrupted files left over from this but now need to work out how to find them.
When bad sectors are re-mapped, the original sectors are isolated so they can't be used again, this removes the errors. It is possible the drive managed to do the re-map before you ran dd, as mentioned, re-mapping bad sectors is not instantaneous, it requires many passes to verify the data within. Or, running dd to zero them labeled them as un-allocated sectors instead of allocated with errors. And the files that were there may belong to some application rarely used and it may never be an issue.
Here's a little something to ponder.
A friend of mine gave me three hard drives and asked me to wipe them so the data cannot be accessed. I used a zero utility that does the same thing as dd when zeroing. Then I put one of those drives in my unit, it had no partition table and thus, no partitions and could not be read by Windows or Debian. I made an image of the drive using dd and ran photorec against the image and pulled out all his data and whatever system files photorec can find.