home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 2828 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  2.4 KB

  1. Path: sparky!uunet!wupost!m.cs.uiuc.edu!roundup.crhc.uiuc.edu!uivlsisd.csl.uiuc.edu!terry
  2. From: terry@uivlsisd.csl.uiuc.edu (Terry Lee)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Bad144 sector mapping tips
  5. Date: 24 Jul 1992 21:41:09 GMT
  6. Organization: Coordinated Science Lab., Univ. of Illinois at Urbana-Champaign
  7. Lines: 45
  8. Message-ID: <l70u7lINNbh2@roundup.crhc.uiuc.edu>
  9. NNTP-Posting-Host: uivlsisd.csl.uiuc.edu
  10. Keywords: bad144
  11.  
  12.     Thanks Bill and Lynne for making 386BSD possible!  For anyone who is
  13. trying to get bad144 bad sector mapping to work for MFM/RLL/ESDI drives, here's
  14. some tips and anomalies (?) I've discovered:
  15.  
  16. 1.  The install program might not put the 'sf' flag (enable bad144 handling) in
  17.     the disklabel.  The output of 'disklabel -r wd0' should have a line that
  18.     says "flags: badsect".  If 'badsect' is not there, use 'disklabel -e wd0'
  19.     to put it there.
  20.  
  21. 2.  According to INSTALL.NOTES, when a bad sector is accessed, an error message
  22.     should indicate the bad sector number.  So far, I've only gotten an error
  23.     message (and not in the form given in INSTALL.NOTES) when the bad sector
  24.     is in the swap partition.  And the sector number reported is relative to
  25.     the start of the 386BSD partition (bad144 expects sector numbers relative
  26.     to cylinder 0).
  27.  
  28. 3.  Be sure to use 'bad144 wd0 0' to first clear the bad sector list.
  29.  
  30. 4.  To find bad sectors in the 386BSD partition, use
  31.     'dd if=/dev/wd0c of=/dev/null bs=512'.  If error 5 is reported, then a bad
  32.     sector is found.  For example, let's assume the offset of wd0c is 200000.
  33.     If 'dd if=/dev/wd0c of=/dev/null bs=512' reports
  34.  
  35.     error 5 ...
  36.     13500+0 records in
  37.     13500+0 records out
  38.  
  39.     then sector #213500 (relative to cylinder 0) is bad.  However, the last
  40.     part of /dev/wd0c (one cylinder + 126 sectors) is reserved for bad sector
  41.     mapping; don't try to map any bad sectors found in this area!
  42.  
  43. 5.  According to INSTALL.NOTES, 'bad144 -a wd0 213500' (for our example) should
  44.     have done the trick.  But on my system, 'bad144 -a -c wd0 213500' is
  45.     needed.  Is this a bug?
  46.  
  47. 6.  Repeat steps 4 and 5 until all bad sectors (except those in the last
  48.     cylinder + 126 sectors) are mapped out (I know, yech!).  This is not very
  49.     elegant, but it works.  I'll try to write a program sometimes to do this
  50.     better.  Is someone already working on this?
  51.  
  52.     I hope this helps someone.  Of course, standard disclaimers apply!
  53.  
  54. ----------
  55. Terry Lee
  56. terry@uivlsi.csl.uiuc.edu
  57.