*BSD News Article 4990


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uniwa!cujo!colin
From: colin@cs.curtin.edu.au (Colin Manning)
Subject: Re: IDE and bad sectors.
Message-ID: <colin.716432674@marsh>
Sender: news@cujo.curtin.edu.au (News Manager)
Organization: Curtin University of Technology
References: <18r9smINNdan@aludra.usc.edu>
Date: Mon, 14 Sep 1992 01:04:34 GMT
Lines: 61

eddy@aludra.usc.edu (George Edmond Eddy) writes:

>How does one deal with bad sectors on an IDE hardrive?  

>After I had done the disklabel and newfs on a conners 3204, the 
>disklabel showed a bad sector map (paraphrase) in the flags field
>and went into the endless reboot cycle.  i used disklabel -e to
>clear the flags field, and everything proceeded fine, (this,
>however is wrong!).  It was suggested that i run bad144, however
>i read the INSTALL.NOTES and know not to do this!  

>Now i suffer from magically corrupting cp, rm and mv commands.
>I will rebuild the commands mv 'em into bin, everything is fine
>for a while, then WHAM! they start core dumping, (in the call to
>rindex).  i'll do a diff on the versions in the build directory
>vs. those in /bin, and diff claims there are differences????

>So will some kind soul illuminate me as to how to handle bad sectors
>on an IDE drive?  or should that flag be showing up at all???

I had the same problem.  I got no resopnce, so I went about it *MY* way.  It
may not be the best, but it works.

I had three bad sectors.

1)  File the hard disk with files of 10Meg, marking the files that cover bad
sectors.

2)  Delete one of the files that has bad sectors.

3)  file the hard disk with files 1/10 the size of the previous file.

4)  repeat steps 2 and 3 until you have sufficently small files.

NOTE:  I did this from a directory called HARDERRORS, and named the files by
the sector number that was bad in it, and removed rw permissions
from all three files AND the directory.  I know this doesn't stop root 
accidently removing them, but who logs in as root all the time anyway?

I think I got each of my bad sector files down to 512 bytes.  It took some
time to do (4 hours I think), but saved frustration later.

If someone has a better idea PLEASE let me know.

>thank you!
Hope it helps.

>- rusty


>eddy@usc.edu
>rusty@kirra.ema.rockwell.com

Colin.


--
Colin [colin@cs.curtin.edu.au]

"Knowledge is not knowing all the answers, but knowing where to find them."
                                                                  -anon.