Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!metro!sequoia!ultima!kralizec.zeta.org.au!kralizec.zeta.org.au!not-for-mail From: bde@kralizec.zeta.org.au (Bruce Evans) Newsgroups: comp.os.386bsd.bugs Subject: Re: bad144 problem? Date: 22 Aug 1993 11:58:26 +1000 Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32bis Lines: 61 Message-ID: <256js2INN1jk@kralizec.zeta.org.au> References: <9322908.27770@mulga.cs.mu.OZ.AU> <1993Aug16.180751.16931@crash> <24qnlt$s4p@hrd769.brooks.af.mil> NNTP-Posting-Host: kralizec.zeta.org.au In <24qnlt$s4p@hrd769.brooks.af.mil> burgess@hrd769.brooks.af.mil (Dave Burgess) writes: >In article <1993Aug16.180751.16931@crash> warelock@crash.cts.com (Tom Zacharoff) writes: >> >>How do I set the badsect flag in my disklabel? Is it a function of the >>disklabel program? >> >In the disklabel in disktab, there should be an entry ':sf'. There is a >similar entry ('flags:') in the 'text' version of the disklabel. The easiest way to put it on a disk with an existing label is to run "disklabel -e -r diskname" where diskname is, for example, wd0 for the first (non-SCSI) drive. This gives you a label to edit using vi. Change the line "flags:" to "flags: badsect". Beware that versions of elvis (aka vi) before 1.7 (or maybe 1.6) have their exit statuses for changed and unchanged files back to ftont so that disklabel may ignore the changes. >>I have a full disk configuration. Where does the table have to be? How do I >>get it there? What does it mean that I won't be able to ipl my system? >With a full disk configuration, your bad sector table should be the last >track. Not quite. The bad sector table is on the last _tracks_ of the 'c' partition. The number of tracks required is one plus the number of tracks required to hold the spare sectors. There are about 128 spare sectors (126, 127 or 128). >There have been problems identified with disk drives that >physically have more than 1023 cylinders (which I think the disk in So don't last the 'c' partition extend past cylinder 1023. The 'c' parition is supposed to be "the part of the disk reserved for 386BSD". You have to lie about this to get the bad sector table in the right place. I previously gave an (untested) example of how to split a disk so that the 'c' partition ended at cylinder 1023. It would probably be better to end it just above partition 'a', e.g.: 386BSD partition: cylinders 400-1746: 'a' partition 400-598 (root) 'b' partition 600-799 (swap) 'c' partition 400-599 (label is on 400, bad144 stuff on 599) 'd' partition 0-1746 (whole disk) 'e' partition 600-1746 (usr) This is also untested. >Putting the bad track on the disk involves making sure that the >disklabel identifies your disk as as a 'sector forwarding' drive and >having run bad144 to locate and lock out the bad sectors. Be sure to >run fsck after you run bad144 to make sure that any files that are >affected by the change are flagged as broken. You should run bad144 before newfs, so the disk shouldn't have any files on it to be fixed up by fsck. -- Bruce Evans bde@kralizec.zeta.org.au