Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jan 2010 14:28:57 -0500
From:      Bob Johnson <fbsdlists@gmail.com>
To:        FreeBSD Questions <questions@freebsd.org>
Cc:        Christoph Kukulies <kuku@kukulies.org>
Subject:   Re: copying a disk with ignoring errors
Message-ID:  <54db43991001051128s3521b7b5hdf70f60672437533@mail.gmail.com>
In-Reply-To: <20100105191645.GA1782@darklight.org.ru>
References:  <4B434D52.3030301@kukulies.org> <20100105191645.GA1782@darklight.org.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/5/10, Yuri Pankov <yuri.pankov@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54db43991001051128s3521b7b5hdf70f60672437533>