On Mon, 2005-04-25 at 09:44 -0400, Paul Koning wrote:
 
>>>> "Vintage" == Vintage Computer Festival <vcf at
siconic.com> writes: 
  Vintage> Is there anything in Linux that will dump a disk image and
  Vintage> put blank space where bad sectors are?  It's not certain if
  Vintage> dd does this.
 Neither Linux the manpage nor the info for dd is clear on this.  But
 the NetBSD manpage says that if you say "conv=error" then dd will omit
 any bad blocks from the output, while if you say "conv=error,sync" it
 will substitute zeroes for bad blocks. 
 
That's interesting. I've not seen a mention of an 'error' param before
in the *linux* dd man pages, and don't recall it from other platforms
that support dd either. There's a *noerror* param though - if set then
it allows dd to continue even if it hits a read (and presumably write)
error. If not set then dd will bail at the first sign of trouble.
One thing that'd be useful would be a patched version of dd that could
also retry reading bad blocks n times up to some command-line supplied
maximum; quite often I find for marginal data (such as flakey floppies
and hard disks) an initial read might work but one or more subsequent
reads work find. Far as I know standard dd won't retry reading data at
all.
I've hacked together scripts before to do this, but a patch to the
actual dd code would be a lot more elegant.
cheers
Jules