*BSD News Article 3539


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!network.ucsd.edu!usc!wupost!uunet!mcsun!Germany.EU.net!bs
From: bs@Germany.EU.net (Bernard Steiner)
Newsgroups: comp.unix.bsd
Subject: wd1 bad144 woes & workaround
Date: 12 Aug 1992 12:01:25 GMT
Organization: EUnet Backbone, Dortmund, Germany
Lines: 45
Distribution: world
Message-ID: <16auimINNal@disaster.Germany.EU.net>
NNTP-Posting-Host: walhalla.germany.eu.net

Folks,
having installed Tom's patches to the wd & fd driver, I got another
(ESDI) disk hooked up to my system. Since the second drive has rather a lot
of bad blocks I used a hacked wd driver and "dd if=/dev/wd1d of=/dev/null"
to detect them and then bad144'ed them away.

I also moved /usr/src and /usr/local to the second drive and added a second
swap partition as wd1b. I started running METAFONT yesterday but then
interrupted it (takes a lot of time, doesn't it :).

This morning, on reboot, I got something like
swapon: wd1b: device not configured and mount complained in a very similar
fashion.

Hmpf.

I re-disklabled wd1 and re-redisklabled it so the disklabel was the original
one again. At that point, fsck on wd1h reported corrupted directories
and asked whether or not to repair. I didn't let it; instead I got the
old bad144 information from wd1 and used "bad144 wd1 0 <list of bad sectors>"
and then everything seemed to be back to normal.

Questions:
a) why does this happen at all ?
b) is there a fix ? /* as opposed to my workaround */
c) what *exactly* does the "packid" argument to bad144 do ? Ok, so it's
   supposed to be 0,1,2 or 3 - but what does it do ? Does it have to be
   different from the one to wd0 ?
d) (repeat of earlier article) is there a magic flag to disklabel that makes
   the kernel print out bad sector information for a specific drive ?

BTW it's rather useful to save the bad144 information and the disklabel in a
safe place *before* something nasty happens to your second drive.
In particular, keeping that information on the second drive is *not* a good
idea ;-)

Chers,
	Bernard
-- 
Bernard Steiner, FB Informatik/IRB, Uni Dortmund,    vox +49 231 755 2444
Postfach 500500, D-W-4600 Dortmund 50, Germany       fax +49 231 755 2386
bs@Germany.EU.net          ...!uunet!unido!bs

*III  And they gave it Instructions, but knew it not. } From The Book of Nome,
*IV   It is, they said, a Box with a Funny Voice.     }      Mezzanine v.III-IV