*BSD News Article 90595


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.internetmci.com!news.easystreet.com!not-for-mail
From: tedm@agora.rdrop.com (Ted Mittelstaedt)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: how to recover from bad blocks?
Date: 7 Mar 1997 06:58:01 GMT
Organization: Cool Dudes Inc.
Lines: 50
Message-ID: <5foe9p$jri$1@easystreet03>
References: <daniel-0603970043260001@giffin.student.harvard.edu>
NNTP-Posting-Host: sunnet.portsoft.com
X-Newsreader: WinVN 0.92.6+
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:36739

In article <daniel-0603970043260001@giffin.student.harvard.edu>, daniel@eecs.harvard.edu (Daniel B Giffin) says:
>
>
>I just took my FreeBSD box down to install some more memory (which,
>from the PC's BIOS messages, appears to be fine) and, upon restarting,
>found I had some bad blocks in my root partition (some of the log
>messages are below).
>
>I have been trying to fix the hard drive (it is IDE) with the fixit disk.
>The relevant tools appear to be "bad144" and "badsect",
>but I have not used these before and the documentation is very
>confusing.
>

bad144 is to take care of physical media damage on the disk drive
present before you install FreeBSD.

If the disk develops bad spots after the system has been running a
while, your screwed.  Fixing it involves wiping the disk, running the
bad144 scanner to create the bad block list, writing the bad block list
to the disk, then reinstalling FreeBSD.  Then you restore from your
backups that you presumably made.

Fortunately, these days most decent IDE disk drives have internal bad
sector defect mapping.  If the disk develops a bad spot you still
wipe it, but you may be able to run a manufacturer-supplied utility
that will update the drives internal defect map, which will then make
the disk appear as though it doesen't have any bad spots again.
(of course it will be slightly smaller in capacity)  You then go
through the usual reinstallation-restor from backup procedure.

If the disk sustains physical damage, you cannot expect to retrieve
data from it by running bad144, the program isin't intended to do that.

Based in the description of your problem, it sounds more likely that
the disk didn't sustain physical damage, but rather that the additional
memory somehow caused something to scribble all over the filesystem
data structures on the disk.  By any chance, was the additional ram
non-parity?

It is important to understand here that this is where one of those
fundamental differences between Unix and some other operating systems
is: Unix doesen't have that great disk data recovery tools because the
idea is that your going to be making continual backups of your Unix
system, the way to fix a troubled Unix disk is to reformat and recreate
the filesystem, not go in there with scandisk or whatever and attempt
to put Humpty Dumpty back together again.  It's unfortunate that this
can sometimes be a painful lesson to a newbie.