home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 2626 < prev    next >
Encoding:
Text File  |  1992-07-22  |  11.9 KB  |  240 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!tarpit!phoenix!rd
  3. From: rd@phoenix.aii.com (Robert D. Thrush)
  4. Subject: wd boot bug found!
  5. Message-ID: <RD.92Jul22144159@phoenix.aii.com>
  6. Sender: rd@pixie.aii.com (Robert D. Thrush)
  7. Organization: Automation Intelligence, Inc.
  8. Distribution: comp
  9. Date: Wed, 22 Jul 1992 18:42:16 GMT
  10. Lines: 228
  11.  
  12.   Many thanks to Bill and Lynne Jolitz for an extremely valuable
  13. contribution.  We've been delighted with the results.
  14.  
  15.   We've found a showstopper in the secondary boot (bootwd) for some
  16. DTK controllers that we tried to use.  It appears to me that this may
  17. solve the problem that many have reported about not being able to boot
  18. from the hard disk after "install".  At least, it has solved it for
  19. us.
  20.  
  21.   The problem occurs in /sys/i386/stand/wd.c. In wdinit() the
  22. controller is reset; however, the wrong register is tested
  23. for busy.  On some controllers, this mis-test seems to cause
  24. no harm.  However, it seems to hang forever on a few here.
  25.  
  26.   This code only appears to be used by the boot parts.  The
  27. main driver code (in /sys/i386/isa/wd.c) doesn't have the above
  28. problem since it checks the correct status register.
  29.  
  30.   I've attached both the source diff and a uuencoded bootwd that
  31. incorporates this fix.
  32.  
  33. To replace the bootwd on your already "installed" hard disk, do
  34. something like the following:
  35.  
  36.   1. uudecode <attached (This will produce bootwd.)
  37.   2. copy it over /usr/mdec/bootwd on the fixit.fs diskette.
  38.   3. boot from this fixit.fs diskette.
  39.   4. make the floppy writeable, ie. mount -u /dev/fd0a /
  40.   5. obtain the existing hard disk label, ie.
  41.      "disklabel -r wd0 >wd0.label"
  42.   6. replace the primary and secondary boots via
  43.      "disklabel -R -r wd0 wd0.label /usr/mdec/wdboot /usr/mdec/bootwd"
  44.  
  45.   At this point, the hard disk should have the replacement
  46. bootwd installed.  "shutdown" and boot from the hard disk.
  47. Let us know if it works!
  48.  
  49.   The new bootwd can be incorporated on the dist.fs diskette in a
  50. similar fashion.  At that point, "install" per the INSTALL.NOTES
  51.  
  52.   If I had direct ftp access, I could make the fixed dist.fs and
  53. fixit.fs readily available.  Perhaps some kind soul could incorporate
  54. the above changes and make them available.
  55.  
  56.   Most of the credit goes to Jim Huber (jbh@aii.com) for sweating
  57. through comparing and finding this difference between the AT bios and
  58. the 386bsd boot code.
  59.  
  60.   Here's the diff to feed to patch as follows:
  61.  
  62. cd /sys/i386/stand
  63. patch <following-patch
  64.  
  65. *** wd.c    Wed Jul 22 12:58:32 1992
  66. --- wd.c-    Sun Jun 28 00:20:53 1992
  67. ***************
  68. *** 299,305 ****
  69.       DELAY(1000);
  70.       outb(wdc+wd_ctlr,2);
  71.       DELAY(1000);
  72. !     while(inb(wdc+wd_status) & WDCS_BUSY);
  73.       outb(wdc+wd_ctlr,8);
  74.   
  75.       /* set SDH, step rate, do restore to recalibrate drive */
  76. --- 299,305 ----
  77.       DELAY(1000);
  78.       outb(wdc+wd_ctlr,2);
  79.       DELAY(1000);
  80. !     while(inb(wdc+wd_altsts) & WDCS_BUSY);
  81.       outb(wdc+wd_ctlr,8);
  82.   
  83.       /* set SDH, step rate, do restore to recalibrate drive */
  84.  
  85.  
  86.   And here's the uuencoded bootwd.
  87. begin 664 bootwd
  88. M                                                            
  89. M                                                            
  90. M                                                            
  91. M                                                            
  92. M                                                            
  93. M                                                            
  94. M                                                            
  95. M                                                            
  96. M                                                            
  97. M                                                            
  98. M                                                            
  99. M                      "-1"0$N_1_"0!J#%-0Z*P   ")W(GFNP   0"X
  100. M+/X) "V@FPD 4&B@FPD Z'X   ")\"G8@^L44U#H<    .CE!@  B?3HP@  
  101. M .LA:$!"#P#HZ@<  %BX^?___^L/:$!"#P#HV <  %B+1"0$9K@T$F:C<@0 
  102. M +P     PXM4) 0IP.2$Y(3LPXM4) 3DA.2$BT0D".[#BT0D!#'2]W0D",.+
  103. M1"0$,=*9]WPD",-7BWPD"(M,) RP /SSJE_#5E>+="0,BWPD$(M,)!3\\Z1?
  104. M7L-79HM4) B+?"0,BTPD$.2$Y(3\D&;R;9")^%_#5F:+5"0(BW0D#(M,)!#D
  105. MA.2$_)!F\F^0B?!>PP  58GE@^P$5U93BWT0OJ28"0#'1?P     NP"""0!F
  106. M@WL$!'40_S5@@ D Z"$3  ")QX/$!($[5T56@G51,=+K+XG0P> $@[P8E   
  107. M  !T'V:#>P0$=02)^>L&B?D/KTLXB=#!X 0[C!B8    = Q"#[>#B@   #G0
  108. M=\8/MX.*    .=!T"(D];)@) .L&,=*#3?P#BT4,P> 0"T4(P>(("= -    
  109. MH*-HF D _S;H9@D  (G"@\0$@_H"?@]7_W7\4NAF    @\0,ZPUHQ)@) .B'
  110. M!@  @\0$_S9HTY@) .AX!@  @\8$@\0(@SX =06^I)@) /\V:.>8"0#H7 8 
  111. M (L-O)@) (/!"K@!    T^#_!;R8"0!0Z!@&  "#Q SKBHUE\%M>7\G#    
  112. M58GE@>R@    5U93C9U@____4_]U".B5"0  :B"-1>!0:@!3Z"\*  "#Q!B#
  113. M^"!U"8%]X L!  !T"FCTF D Z>@   "+5>2!PO\/  "!X@#P__\#5>@#5>R-
  114. MA6#___\YT',*: V9"0#IOP   +\ $   _W7D:@!7C85@____4.C4"0  @\00
  115. M.T7D#X67     WWDBUWD]\/_#P  = S& P!#]\/_#P  =?3_=>A35XVU8/__
  116. M_U;HG0D  (/$$#M%Z'5D UWHB=@#1>PYQG,4:"*9"0#H5P4  (G9*?&)3>R#
  117. MQ 3_=>Q3Z(K]__^!9?3__P\ :B!H  ,  &@ _PD Z(+]__]7_S5HF D _W4,
  118. MBT7T_]"#Q""%P'074&A"F0D Z L%  #K"FA8F0D Z/\$  "-I53___];7E_)
  119. MPU6)Y8/L&%=64XM="(M%#(E%_(7 ?%:#??P+?QV+1?R+7(,HA=L/A>H   "+
  120. M11#' /_____IZP   +\!    BT7\C5#TB57\O@,   "AM/T) (E%Z(M%Z ^O
  121. M>'0[??Q_""E]_$Z%]G_LA?9U"K@;    Z;    "X P   "GPBUR#6(7;#X6'
  122. M    BT40QP#_____Z8T   "AM/T) (E%Z(M(9-/C.QV@FPD ="/_<#!HI)L)
  123. M %/_-2C^"0#H? 8  (E%Z(/$$(7 = 6+1>CK5XD=H)L) *&T_0D B47PB?B+
  124. M3?"9]WETB47LBWWLBT7\F??_B47TF?=Y=(L<E:2;"0"%VW4+BT40QP#_____
  125. MZQ5&@_X#?H*AM/T) (M(9-/CBT40B1@QP(UEW%M>7\G#  !5B>53BUT(:@[_
  126. M-7R9"0#HT?O__XG8P?@(4*%\F0D 0%#HO_O__VH/_S5\F0D Z++[__^!X_\ 
  127. M  !3H7R9"0! 4.B?^___C67\6\G#58GE@^P$4XI-"(A-_(,]@)D)   /A;P 
  128. M  "A>)D) &:+$&;' %JEH7B9"0!F@3A:I704QP5XF0D    + ,<%?)D) +0#
  129. M  "A>)D) &:)$&H._S5\F0D Z#W[__^A?)D) $!0Z"7[__^)P\'C"&H/_S5\
  130. MF0D Z!_[__^A?)D) $!0Z ?[__\)PX/$&('[T <  '<1B=@!P ,%>)D) *. 
  131. MF0D ZPR+#7B9"0")#8"9"0"A@)D) .L/Q@ @B@UTF0D B$@!@\ "BQ5XF0D 
  132. M@<*@#P  .<)WX8!]_ ET&'<(@'W\"'0YZV> ??P*=%6 ??P-=#3K66H@Z 7_
  133. M__^#Q 2A@)D) (7 ?0.#P ^#X/"+#8"9"0 IP8G(A<!UV>M/@P6 F0D _NM&
  134. MH8"9"0 K!7B9"0"YH    )GW^2D5@)D) .LK@06 F0D H    .L?H8"9"0"*
  135. M3?R("*& F0D B@UTF0D B$@!@P6 F0D  J%XF0D !: /   [!8"9"0!W2F@ 
  136. M#P  _S5XF0D H7B9"0 %H    %#H-?K__Z%XF0D !0 /  "#Q SK!L8 ((/ 
  137. M HL5>)D) ('"H \  #G"=^J!!8"9"0!@____H8"9"0 K!7B9"0!Y 4#1^%#H
  138. MUOW__XUE^%O)PU6)Y5-J9.B>^?__@\0$:F#HE/G__XC#@\0$:F3HB/G__X/$
  139. M!&I@Z'[Y__^#Q 0XV'3HB!VLNPD ]L. =,>X 0   (UE_%O)PU6)Y;@!    
  140. MR<,  %6)Y6IDZ$OY__^#Q 2H G7R:F!J9.A'^?__@\0(:F3H,?G__X/$!*@"
  141. M=?)J36I@Z"WY__^#Q AJ9.@7^?__@\0$J )U\FC_    :F#H$/G__X/$"&I@
  142. MZ/KX__^#Q 0\^G7R:F3H[/C__X/$!*@"=?)HT0   &IDZ.7X__^#Q AJ9.C/
  143. M^/__@\0$J )U\FC?    :F#HR/C__X/$"&IDZ++X__^#Q 2H G7RQ@4D_@D 
  144. M ,8%K+L)  !J8.B6^/__R<,   !5B>5J9.B'^/__@\0$J )U\FC^    :F3H
  145. M@/C__V@ "3T Z"T   #)PP   %6)Y5.*70B ^PIU"FH-Z,7\__^#Q 0/OL-0
  146. MZ+G\__\QP(UE_%O)PP!5B>53BUT(2X/[_W0)Z,K^__^%P'3QA<!T!>C)_O__
  147. MC67\6\G#    58GE5U93C7T,ZQ&%]@^$Y0$  %;HE____X/$!(M%" ^^,/]%
  148. M"(/^)77A,=N+10@/OC"-1I[_10B#^!8/AY8!  #_)(6PC D $XT) )B-"0#/
  149. MC0D /XX) #^."0 _C@D /XX) #^."0 _C@D /XX)  R-"0 _C@D /XX) />-
  150. M"0 _C@D /XX) #^."0"GC0D /XX)  ^."0 _C@D /XX) ">."0"[ 0   .N!
  151. M@\<$BW?\@\<$BU_\#[X#0U!6Z#X!  "#Q B%]@^$3____S'2ZTB)P4FX 0  
  152. M -/@A?!T-872= >X+    .L%N#P   !0Z+O^__^#Q 3K"E#HL/[__X/$!$,/
  153. MO@.#^"!_[KH!    ZP9#@#L@?_H/O@-#A<!UL(72#X3S_O__:C[IY/[__X/'
  154. M!(M'_(/@?U#IU?[__X/'!(M?_ ^^,T.%]@^$R_[__U;H6?[__X/$! ^^,T.%
  155. M]G7OZ;7^__^#QP2+1_R)QH7V?0QJ+>@V_O__]]Z#Q 1J"E;H>0   (/$".F-
  156. M_O__@\<$BT?\B<9J"%;H80   (/$".EU_O__@\<$BT?\B<9J"E;H20   (/$
  157. M".E=_O__@\<$BT?\B<9J$%;H,0   (/$".E%_O__:B7HTOW__X/$!(7;#X0J
  158. M_O__:FSHP/W__X/$!.D;_O__C67T6UY?R<-5B>6#[!!75E.+10B+30R-7?2^
  159. MA)D) #'2]_&)5?"+??"*%#>($T.%P'7LC77T2P^^ U#H>/W__X/$!#G><N^-
  160. M9>1;7E_)PP!5B>6X_/T) ,<      ,= !     #'0 @     QT ,     ,= 
  161. M$     "+512)4!2+50R)4!B+51")4!S'0"0&    @SV@F0D  '03QP6@F0D 
  162. M     %#HO (  (/$!&H$:/S]"0#H[0(  .C\^___,<#)PU6)Y8'L@    %.#
  163. M/;3]"0  =21H "   &BTW0D :A#_-2C^"0#H8O___\<%M/T) +3="0"#Q!"-
  164. M78!3:@+H@@   /]U"%/H"0   (VE?/___UO)PU6)Y8'L# $  %=64XM]"#';
  165. MC;7X_O__C58(B97T_O__: @!  !64U?HZP    ^WA?S^__^-'!C_=0S_M?3^
  166. M___H4P@  (/$&(7 =0B+A?C^___K$3M?"',*9H.]_/[__P!UO3' C:7H_O__
  167. M6UY?R<-5B>6#[!!75E.+70BAM/T) (E%^/]P,&BPO0D B=B+3?B9][FX    
  168. MB57PB<8/KX&\    BWD<]]<A_@^O<1B-% 8#41")5?2+1?"9]WEXB47PBT7X
  169. MBU7PBTA@T^*+1?2-% *+1?B+2&33XE+_-2C^"0#H4?[__VB     _W4,H;3]
  170. M"0")1?B)V(M-^)GW>7C!X@>-DK"]"0!2Z#?T__^-9>1;7E_)PP!5B>6#[!A7
  171. M5E.+30R)3?B+31")3?2+312)3?"+??"%_P^.Z0   (L5M/T) (MU^(M*4-/^
  172. MB77L@_X+?Q")\$"+2E#3X(M-"#M!"'<*H;3]"0"+0##K&(L5M/T) (M"2/?0
  173. MBTT((T$( T(T2"-"3(G#H;3]"0"+0$CWT"-%^(E%Z(U%_%#_=>S_=0CH5?;_
  174. M_X/$#(-]Z !U&SG??!=3_W7T_W7\_S4H_@D Z'+]__^#Q!#K/%-HL+T) /]U
  175. M_/\U*/X) .A9_?__*UWH@\00.=]]!(GXZP*)V(G#4_]U](M-Z(V!L+T) %#H
  176. M0O/__X/$#"G?BTWTC30+B77TBTWXC30+B77XA=MT"(7_#X\7____BT7PC67<
  177. M6UY?R<,  %6)Y?]U"&CWF0D Z*SZ__]J .B;\O__R<,   !5B>564XM="+X 
  178. M@@D 4^@Y P  @\0$A<!T"F@$F@D Z,#___^+0PS!X 2+E#"8    B5,@,<"-
  179. M9?A;7LG#    58GE@^P,5U93BTT(BU$0B57\QT7X (() (M-"(M!%(M-^#'2
  180. M]W$HB<:+30B+01C!X F+3?@QTO=Q*(G#BTT( UD@BWD<A?9^)U=3_W7\_W4,
  181. MZ"H   "#Q!"%P'0'N/_____K$DY#BTWX WDHA?9_V8M-"(M!%(UEZ%M>7\G#
  182. M  !5B>6#["175E.+11")1?R+/:B["0#'1?@     NP"""0"#?0@!=0;&1>@P
  183. MZP3&1>@@BT7\,=+W<SB)5>")1?2+1> QTO=S+(E%\(M%_#'2]W,LB57L@WW\
  184. M$ ^.DP   (M%#,'@"8VPN+L) (M%#,'@"8V N+L) (E%Y ^W#CM-]'=P=6D/
  185. MMT8"B47<BT7PP> (BU7LC10".U7<=5'_=?QH')H) .@W^?__BT,\*T,LB47@
  186. M*W7DB?#!^ *)1=R+1> K1=Q(B47\,=+W<SB)5>")1?2+1> QTO=S+(E%\(M%
  187. M_#'2]W,LB57L@\0(ZP6#Q@3KB/]%[&C_    B?A 4.C^\/__:@&-1P)0Z//P
  188. M____=>R-1P-0Z.?P____=?2-1P10Z-OP__^#Q""+1?3!^ A0C4<%4.C(\/__
  189. MBT4,P> $BU7P@^(/@<J@    "=!0C4<&4.BJ\/__@\00C5\'4^B2\/__@\0$
  190. MJ$!T\P^V1>A0C4<'4.B)\/__@\0(C5\'@'WH('4-4^AK\/__@\0$J(!U[8!]
  191. MZ"!U$(U'!U#H5?#__X/$!*@!=7&-7P=3Z$7P__^#Q 2H"'3S@'WH('40:  !
  192. M  #_=117Z'_P___K#F@  0  _W445^B+\/__@\0,C4<'4.@.\/__@\0$J AU
  193. M*HU?!X!]Z#!U#5/H^.___X/$!*B =>V-1P=0Z.CO__^#Q 2H 74$,<#K:HGX
  194. M0%#HU.___XC!_T7X@\0$@WWX! ^.PO[__X,]L-T)  !U06@\F@D #[;!4&AL
  195. MF@D C4<'4.BB[___@\0$#[; 4/]U_(!]Z"!U![F=F@D ZP6YHIH) %'_=0QH
  196. MJ)H) .AC]___N/____^-9=!;7E_)PP  58GE@>P0 @  5U93BT4(,?^+2!")
  197. MC?#]__^#/(VDNPD   ^%> (  (-X" !T![AP 0  ZP6X\ $  *.HNPD B<;'
  198. MA?3]__\ @@D :@:-A@8"  !0Z!SO___'A?S]___H P  @\0(BX7\_?__2(F%
  199. M_/W__XN%_/W__X7 ?^EJ HV&!@(  %#HZN[__\>%^/W__^@#  "#Q B+A?C]
  200. M__](B87X_?__BX7X_?__A<!_Z8U>!U/HL>[__X/$!*B =?-J"(V&!@(  %#H
  201. MJ.[__X/$"(N%\/W__\'@! V@    4(U&!E#HC>[__^C# 0  :A"-7@=3Z'WN
  202. M___HLP$  %/H9N[__P^VV(/$%/?# 0   '0^:-N:"0")\$!0Z$KN__^#Q 0/
  203. MML!0: N;"0!3_[7P_?__:#R;"0#H&/;__T>#Q!B#_PE^B[C_____Z5,!  "+
  204. MC?3]__^+031 4(U&!%#H$N[__XN-]/W__XM!-$#!Z A0C48%4.C[[?__BX7P
  205. M_?__P> $BXWT_?__ T$P2 V@    4(U&!E#HV>W__XN-]/W___]Q+(U& E#H
  206. MQ^W__X/$(&B1    C48'4.BV[?__@\0(C5X'4^B>[?__@\0$J(!U\[BPNPD 
  207. MBY7P_?__P>()9L=$ @C__XN-]/W___=!6 0    /A*8    QVXN-]/W__XM1
  208. M/"M1+(T4$XV% /[__U!2_[7P_?__:@3H5/O__XG'@\00A?]T$X/# H/["7\+
  209. MBXWT_?__.UDL<L"-E0#^__^%_W4L9H-Z! !U)6:!>@8A0W4=BX7P_?__P> )
  210. MC8"PNPD :  "  !04N@Z[?__ZRZ#/;#="0  =1#_M?#]__]H7)L) .C)]/__
  211. MN+"["0"+E?#]___!X@EFQT0""/__,<"-I>3]__];7E_)PP   %6)Y5=64XL]
  212. MJ+L) #';C7<'5NBB[/__@\0$J(!U\XUW!^L1B=A#/:"& 0!^![C_____ZP]6
  213. MZ'_L__^#Q 2H0'3B,<"-9?1;7E_)PP!5B>6+50B+30SK"XH"0H3 =00QP.L0
  214. MB@%!.@)T[@^V @^V4?\IT,G#0"@C*6AT;VYL+G,)-2XS("A"97)K96QE>2D@
  215. M,3(O,3<O.3  BT0D!(;$P< 0AL3#                     #,X-F)S9  S
  216. M.#9B<V0N86QT #,X-F)S9"YO;&0 8F]O= !V;75N:7@     >)@) '^8"0"*
  217. MF D E9@) )J8"0            #_"0!&:6QE(&YO="!F;W5N9  @+2!D:61N
  218. M)W0@;&]A9" E<RP@ '=I;&P@=')Y("5S"@!.;W0@86X@97AE8W5T86)L92!F
  219. M;W)M870 1FEL92!T;V\@8FEG('1O(&QO860 5V%R;FEN9SH@8G-S(&]V97)L
  220. M87!S(&)O;W1S=')A< !0<F]G<F%M(&5X:71S('=I=&@@)60 4F5A9"!O9B!F
  221. M:6QE(&ES(&EN8V]M<&QE=&4   <     @ L U ,        P,3(S-#4V-S@Y
  222. M86)C9&5F     '=D  "8F0D  0   "1(96%D97(Z("]U<W(O<W)C+W-Y<RXS
  223. M.#9B<V0O:3,X-B]B;V]T+U)#4R]F<RYC+'8@,2XR(#DR+S R+S T(#$T.C$X
  224. M.C X(&)I;&P@17AP("0 1F%I;&5D.B5S"@   '=D(&EN:71I86QI>F%T:6]N
  225. M(&5R<F]R "TM+2!B861B;&]C:R!C;V1E("T^($]L9" ]("5D.R  $ AB861B
  226. M;&L'=6YC;W)R!FED7V-R8P5N;U]I9 -A8F]R= )T<C P, %N;U]D86T $ AB
  227. M=7-Y!G)D>09W<G1F;'0%<V5E:V1O;F4$9')Q V5C8U]C;W(":6YD97@!97)R
  228. M ')E860 =W)I=&4 =V0E9#H@:&%R9" E<R!E<G)O<CH@<V5C=&]R("5D('-T
  229. M871U<R E8B!E<G)O<B E8@H $ AB861B;&L'=6YC;W)R!FED7V-R8P5N;U]I
  230. M9 -A8F]R= )T<C P, %N;U]D86T $ AB=7-Y!G)D>09W<G1F;'0%<V5E:V1O
  231. M;F4$9')Q V5C8U]C;W(":6YD97@!97)R '=D)60Z(')E8V%L('-T871U<R E
  232. M8B!E<G)O<B E8@H =V0E9#H@97)R;W(@:6X@8F%D+7-E8W1O<B!F:6QE"@! 
  233. C*",I<W1R8VUP+F,)-2XU("A"97)K96QE>2D@,2\R-B\Y,0!O
  234.  
  235. end
  236.  
  237. -- 
  238. Bob Thrush rd@aii.com (407) 661-7089    Fax-(407) 661-6966
  239. Automation Intelligence,Inc. -- 850 Trafalgar Court, Maitland, FL 32751
  240.