copying a disk with ignoring errors

Bob Johnson fbsdlists at
Tue Jan 5 19:28:59 UTC 2010

On 1/5/10, Yuri Pankov <yuri.pankov at> wrote:
> On Tue, Jan 05, 2010 at 03:31:46PM +0100, Christoph Kukulies wrote:
>> I recall a case when I had a hard disk that had got bad sectors and
>> it wasn't accessible through normal mounting anymore.
>> Then a tool came into the game that - I believe - Poul Henning had
>> recommended or written for this purpose.
>> It copies a disk sector by sector to a file (kind of dd), but
>> ignores errors, it just skips sectors it couldn't read (after a
>> couple
>> of retries). The result was, that one had a - albeit - worm-eaten -
>> image of the disk allowing to access the filesystem
>> and getting to the important files with a little luck these not
>> being amongst the corrupted data.
>> Anyone knowing what this little tool was named? Something like
>> diskcopy, devcopy, I forgot.
>> --
>> Christoph
> dd conv=noerror?

I think you need sync also. E.g.

dd if=/dev/ad3 of=disk.img bs=512 conv=sync,noerror

will replace the unreadable blocks with blocks of NULs.

-- Bob Johnson

More information about the freebsd-questions mailing list