off topic - disk crash

Daniel Lang langd-freebsd-hackers at leo.org
Thu Mar 11 06:21:57 PST 2004


Hi,

C. Kukulies wrote on Wed, Mar 10, 2004 at 06:36:52PM +0100:
[..]
> The disk boots into FreeBSD but already at power on time the disk does
> seek retries or some recalibration noise.
> 
> The question is what else can I do to recover the data.
> Put it in the icebox? Turn the computer upside down?
[..]

Put it into another box running a working FreeBSD
and enough disk-space to contain all the contents of
the damaged disk.

Check if you can still read the disklabel
(just do "disklabel ad1s1 (or whatever your device is)).

If you can read the disklabel, grab the contents of
each partition with dd, use the 'conv=noerror,sync'
options to fill unreadable sectors with zeros.

Turn the resulting partition-image files into devices using
vnconfig.

Now you can either:

 a) fsck the devices and then mount them to grab what is left
    of the data. This is the more reliable way, but fsck may
		render some data inaccessible.
		If the superblock is damaged, read fsck and newfs manpages,
		as well as the handbook, how to get a backup-copy
		of your superblock.

 b) mount the device read-only and grab what is left of the data.
    If the filesystem is badly damaged, this could panic your
		machine. So don't do it unless you really have to.

You can make a copy of the partition image-files, and do the
fsck on one copy. You still have the other one if you want
to try without fsck.

If you cannot read the disklabel, you can still use dd to 
make an image of the whole disk. But you will have to find
the partition-boundaries for yourself. There is a tool in the
ports to find filesystem boundaries, IIRC. I don't recall the
name of this tool, though.

HTH,
 Daniel
-- 
IRCnet: Mr-Spock     - Cool people don't move, they just hang around. -  
Daniel Lang * dl at leo.org * ++49 89 289 18532  * http://www.leo.org/~dl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6020 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040311/38b2ca38/smime.bin


More information about the freebsd-hackers mailing list