tool for mapping away bad blocks on an external disk

Steve O'Hara-Smith steve at
Sun Apr 17 08:40:23 UTC 2016

On Sun, 17 Apr 2016 09:26:41 +0200
Matthias Apitz <guru at> wrote:

> Hello,
> I have an older external disk, connected through USB, which has bad
> blocks:

	The tool you're looking for is badsect - I'm moderately surprised
it's still around, the last time I used it was on FreeBSD but it is
still in FreeBSD 10.3.

	It doesn't do the analysis though - you'll have to do that with the
filesystem unmounted and just used dd conv=noerror if=<device> of=/dev/null
to read the whole device and pull the duff sectors out of the error

	However it's been a *long* time since this was worth doing except
perhaps as a last ditch data recovery exercise, drives have had internal
sector remapping for a long time now and when that stops working they are
well and truly banjaxed.

Steve O'Hara-Smith <steve at>

More information about the freebsd-questions mailing list