Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Oct 2009 15:05:19 +0100
From:      Polytropon <freebsd@edvax.de>
To:        =?ISO-8859-1?Q?Gr=FCnewald_Micha=EBl?= <michaelgrunewald@yahoo.fr>
Cc:        freebsd questions general <freebsd-questions@freebsd.org>
Subject:   Re: Bad sectors: how bad can it be
Message-ID:  <20091027150519.dcee178a.freebsd@edvax.de>
In-Reply-To: <FAF67E79-922C-4F54-8BE1-2C3ED88FD3CD@yahoo.fr>
References:  <FAF67E79-922C-4F54-8BE1-2C3ED88FD3CD@yahoo.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 27 Oct 2009 08:31:18 +0100, Gr=FCnewald Micha=EBl <michaelgrunewald=
@yahoo.fr> wrote:
> Starting the machine by other means, I found that the hard-drive is =20
> installed on has bad sectors. I am looking for advices on how to =20
> recover from this, if possible.

If there's data on the disk you want to get back, first
make a dd copy of the drive or the partition in question.
Use an accurately working disk as the target. In case of
bad sectors, you should maybe try dd_rescue and ddrescue
because they can handle bad sectors often better than the
common dd. You'll find them in the ports.

After you got your dd copy, work with that for recovery.
Do not use the defective disk anymore, only if you messed
up the dd copy.

A command would look like this:

	# ddrescue -d -r 3 -n /dev/ad1s1f ads1f.dd ddrescue.log

The result is an image of the partition that you can then
mount again.

	# mdconfig -a -t vnode -u 10 -f ad1s1f.dd
	# mount -o ro /dev/md10 /mnt

If the file system isn't intact anymore, there are other tools
that may be able to help you, such as recoverdisk, ffs2recov,
magicrescue, testdisk, scan_ffs, recoverjpeg, photorec and
finally + ultimately, The Sleuth Kit (fls, dls, ils etc.).



> Basically the question is: shall I discard my hard-drive with bad-=20
> sectors, or can I continue using it?

Discard it. Hard disks are cheap today, and bad sectors may
have the habit to multiply. Don't take that risk.

BUT: Discard it when you got all your important data off the
disk.



--=20
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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