home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / vmsnet / sysmgt / 220 < prev    next >
Encoding:
Internet Message Format  |  1992-07-26  |  11.3 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!news.cs.indiana.edu!arizona.edu!east.pima.edu!rharwood
  2. From: rharwood@east.pima.edu
  3. Newsgroups: vmsnet.sysmgt
  4. Subject: Re: How to bypass DUA0/DUA1 and boot from DUA2?
  5. Message-ID: <1992Jul26.201247.1@east.pima.edu>
  6. Date: 27 Jul 92 03:12:47 GMT
  7. Lines: 230
  8.  
  9. Reader Note:  The following file is 200+ lines long, including a refresher on
  10. "the question", attributions, and "the answers."  Read at your own risk!
  11.  
  12. My apologies for taking so long to post this reply... a client asked me to do a
  13. 4-month task in 6 weeks.  How could I resist taking their money!? (though the
  14. project involved total commitment for the past 4 weeks)
  15.  
  16. *** The Question Was... ***
  17.  
  18. I had previously asked a question of the net regarding bypassing a disk in the
  19. normal boot sequence.  For example, a valid system exists on DUA0, DUA1, and
  20. DUA2... suppose for an indefinite time I wanted to boot off of DUA2, but be
  21. able to return to booting off of DUA0 (or DUA1, the same principles apply) at a
  22. later date.
  23.  
  24. As a little "boot tutorial," the MicroVAX (and I assume most other VAXen)
  25. performs the following sequence after power-up diagnostics (paraphrased from
  26. MicroVAX II Technical Manual):
  27.    (1)  Locates 64K of good RAM
  28.    (2)  Copies the primary bootstrap program called VMB from ROM to RAM
  29.    (3)  Branches to the VMB program
  30.    (4)  VMB searches for an operating system in the following order:
  31.         (a) Removable volumes, in order of:
  32.              (1)  DUcu (disk) devices, in controller and volume order (DUA0, 
  33.                   DUA1, DUB0, DUB1, for example)
  34.              (2)  MUcu (tape) devices, in a similar manner
  35.              (3)  PRcu (PROMs) devices
  36.              (4)  XQcu (Ethernet) devices
  37.         (b) Non-removable (fixed) devices, in the same order as above.
  38.  
  39. How does the VMB determine if there is an operating system on a device?  I have
  40. not found the "definitive answer", but believe it to be the presence of a file
  41. named either [SYSEXE]SYSBOOT.EXE or [SYS0.SYSEXE]SYSBOOT.EXE (I'm not sure of
  42. the order).  Several answers below depend on this tidbit of knowledge!
  43.  
  44. *** Attributions ***
  45.  
  46. Before revealing the answers, I give many thanks to the following folks who
  47. provided suggestions.  I have purposely NOT put names with their respective
  48. replies to minimize flames.  Please remember: try these at your own risk,
  49. preferably on fully-backed-up systems. If you have disastrous results, you're
  50. welcome to report them here, but PLEASE do not flame the contributors!
  51.  
  52. Some of these folks have responded with suggestions to the draft copy of this
  53. message, and to them I offer special kudos.  My apologies if some of the
  54. changes were not implemented... typos and (inadvertant!) misinformation may
  55. still exist herein, for which only I may be chastised.
  56.  
  57. davidc@montagar.lonestar.org  David L. Cathey
  58. dmatthews@uap.umd.edu         Dr. David Matthews
  59. FORREST@RIGEL.TAMU.EDU        Bob Forrest
  60. jaapjl@tab00.larc.nasa.gov    J Lee Jaap
  61. KIRSCHT@SYSJJ.MDCBBS.COM      KORBEN KIRSCHT
  62. leichter@lrw.com              JERRY LEICHTER (via repost/forward of message)
  63. M.A.Scott@bnr.co.uk           Mike Scott
  64. mark@infocomm.com             Mark Pizzolato 
  65. MJR059@IPL.JPL.NASA.GOV       Malcolm J. Rayfield
  66. RBRYSON@LANDO.HNS.COM         Rob Bryson
  67.  
  68. *** The Answers Were... ***
  69.  
  70. Answers and methods varied in complexity and applicability, and fell into 4
  71. general answer categories.   I'll go over each of these in more detail below. 
  72. Unfortunately, I have not had the opportunity to try each of these, but will
  73. report any successes (and failures!) as time allows.  
  74.  
  75.   (1) Put the unwanted boot disks off line
  76.   (2) Prevent the system from automatically selecting a boot device
  77.   (3) Put a special program on the first-selected boot device to
  78.       select the actual boot device
  79.   (4) "Hide" the boot program from each disk that you do not want 
  80.       to boot from.
  81.  
  82. A 5th choice was suggested, and is provided at the VERY bottom of this message. 
  83. Basically, it amounts to storing the boot device in the hardware's NVRAM, but
  84. this method is not supported on the MicroVAX.
  85.  
  86. And now, specifics of each method and my evaluation of each.  Please note that
  87. these are my PERSONAL evaluations, and your own circumstances may vary.
  88.  
  89. *** (1)  Put unwanted disks off line ***
  90.  
  91. On a MicroVAX, press the button on each disk that you do NOT want booted from
  92. to disable the drive.  After booting begins (you should see the familiar
  93. "VAX/VMS 5.n" message), you can re-enable each disk so that they can be
  94. properly mounted by the selected STARTUP routine.
  95.  
  96. This is okay for a one-time deal, but if you want the system to consistently
  97. reboot frmo some other disk (like when the power goes down in the middle of the
  98. night!), it's not reliable (since I assume you would want to put the other
  99. disks back on line after booting has begun, and a power-reset boot would select
  100. the first disk in the selection sequence).
  101.  
  102. *** (2) Manually select the boot device ***
  103.  
  104. This involves (for the MicroVAX II) flipping the "console enable switch" in the
  105. back of the machine, which causes the system prompt ">>>" to appear on the
  106. console prior fully booting.  Then, of course, the operator would enter a boot
  107. command such as:   >>> B DUA2   
  108.  
  109. This has the same drawbacks as category 1, but does at least prevent the system
  110. from fully booting with the "wrong" disk if the power resets.  Unfortunately,
  111. if you're not there to enter the BOOT command, then the system dutifully waits
  112. for you to arrive and do so!
  113.  
  114. *** (3) Force the selection of boot device from the first available device ***
  115.  
  116. This method was suggested from several sources, and most likely will work from
  117. ANY VAX machine.  It involves writing a program (two examples with instructions
  118. UNTESTED BY ME are included at the end of this message) to be called
  119. [SYS0.SYSEXE]SYSBOOT.EXE.  The purpose of this program is to overlay an area of
  120. the primary boot program (remember? It's called VMB) with the name of the
  121. desired boot device, and then jumps back to the VMB to continue looking for
  122. boot devices.  
  123.  
  124. If you have SEVERAL devices in the boot selection sequence, this allows you to
  125. avoid "hiding" the boot directory on all "intermediate" devices by putting the
  126. "direct selection" on the first device, pointing directly to the desired
  127. device.
  128.  
  129. If you already have a system built on DUA0, for example, you may have to follow
  130. the advice of answer category 4 first (moving the bootable directory SYS0 to
  131. another directory) before doing this.
  132.  
  133. *** (4) "Hide" the bootable system ***
  134.  
  135. This involves two steps.  In my original posting I had performed one step, but
  136. not the other, which caused the system to hang.
  137.  
  138.    Step 1.  Rename SYS0 to something else, like SYS1:
  139.               $ RENAME DUA0:[000000]SYS0.DIR SYS1.DIR
  140.    Step 2.  Remove the link which points [SYSEXE]SYSBOOT.EXE and
  141.             [SYS0.SYSEXE]SYSBOOT.EXE to the same physical file:
  142.               $ SET FILE /REMOVE DUA0:[SYSEXE]SYSBOOT.EXE; /LOG
  143.  
  144. Having accomplished this, VMB will bypass this disk when selecting an
  145. "operating system from which to boot."  The same operation can be performed on
  146. any of the disks in the boot selection sequence to cause them to be bypassed.
  147.  
  148. If you decide, at a later date, that you'd like to boot once more from DUA0,
  149. there are two possibilities:
  150.  
  151.   (1) You only want to boot from DUA0 once (for an alternate system test, for
  152.       example).  Assume you renamed SYS0 to SYS1 above. Put the system into 
  153.       console mode, and (for MicroVAXen) eneter the following:
  154.              >>> BOOT /10000000 DUA0 
  155.       This should look vaguely familiar, IF you do full system backups!  For
  156.       booting standalone backup, you normally BOOT /E0000000, which selects
  157.       [SYSE] as the boot directory.  The first digit of the register parameter
  158.       apparently is appended to "SYS" to arrive at the boot directory for
  159.       disk devices.
  160.   (2) You want to restore DUA0 as the default boot device "forever" (until you
  161.       change your mind!).  I assume (having not tested this theory) that you
  162.       must undo both steps from above, i.e.,
  163.       (a) Rename [000000]SYS1.EXE to [000000]SYS0.EXE
  164.       (b) Restore the link from [SYSEXE]SYSBOOT.EXE to [SYS0.SYSEXE]SYSBOOT.EXE
  165.           with a command like:
  166.             $ SET FILE [SYS0.SYSEXE] /ENTER=[SYSEXE]SYSBOOT.EXE
  167.  
  168. *** Code for Category 3 Answer ***
  169.  
  170. Following is the text, exactly as it was sent to me, of one of two methods of
  171. accomplishing the "directed boot" option.  The second method offered
  172. essentially the same result using a slightly different methodology.
  173. ============== direct quote =============
  174. Leave your DUA1 system in [SYS1...], create DUA1:[SYS0] and DUA1:[SYS0.SYSEXE]
  175. and put a special SYSBOOT.EXE in DUA1:[SYS0.SYSEXE].  The source is at the end
  176. of this message.  When the system tries to boot from DUA1: (DUA0: disabled) the
  177. special SYSBOOT.EXE will change the registers to the values that B DUA2 would
  178. have generated. It then restarts the boot program now in RAM.
  179.  
  180. This program can also be used to force a boot from the Ethernet by changing
  181. the 'DUA2' to 'XQA0'.  Usually the program would go on DUA0:, but you have that
  182. disabled.
  183.  
  184. SYSBOOT.MAR follows
  185.  
  186.     .TITLE        SYSBOOT
  187. ; This program makes a MicroVax II boot from the a different device on powerup.
  188. ; LINK with /SYSTEM=0 then COPY/CONTIGUOUS to DUA1:[SYS0.SYSEXE]
  189. ;
  190.     .PSECT        CODE,CON,EXE,PIC,NOWRT
  191.     MOVL        #^A'DUA2',R0        ; New boot device
  192.     MOVQ        ^X20(R11),R1        ; Restore VMB R1 and R2
  193.     MOVQ        ^X28(R11),R3        ; Restore VMB R3 and R4
  194.     MOVL        ^X30(R11),R5        ; Restore VMB R5
  195.     MOVL        ^X10(R11),R10        ; Restore VMB R10
  196.     MOVL        ^X18(R11),AP        ; Restore VMB AP
  197.     MOVAL        ^X200(R11),SP        ; VMB start address
  198.     MOVL        ^X14(R11),R11        ; Restore VMB R11
  199.     JMP        (SP)            ; Restart VMB
  200.     .END
  201. ============== direct quote =============
  202. *** (5) Alternatives Not Considered Here ***
  203.  
  204. Looking for primarily an EXTERNAL method of changing the selected boot device,
  205. I did not consider the suggestion to re-cable the desired drive to the first
  206. slot (DUA0).  Another suggestion to swap the unit address plugs on the drives
  207. was rejected, since these do not exist on the MicroVAX (though that suggestion
  208. DOES come in handy for use on the SA82s at the college).
  209.  
  210. Here is the text of another answer.  I did not consider this method, because
  211. the MicroVAX II only supports single digit TEST commands (according to the
  212. manual, anyway) and does not support the storage of boot device selections in
  213. NVRAM.  This method apparently WILL work for other VAXen models.  Consult your
  214. hardware guide for details.
  215. ===========
  216.     I think you want to try "TEST 51" at the console (>>>) prompt.  This
  217. is used to change the default boot device.  If this is not set, then the auto
  218. boot sequence is done to locate a boot device.
  219.  
  220.     It should go something like this (at least on a MV2000, and the MVII
  221. is very similar):
  222.  
  223.     >>> TEST 51
  224.     .... ? >>> [DUA2]
  225.     >>>
  226.  
  227. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  228. David L. Cathey                        |INET: davidc@montagar.lonestar.org
  229. Montagar Software Concepts              |UUCP: ...!texsun!montagar!davidc
  230. P. O. Box 260772, Plano TX  75026-0772  |Fone: (214)-618-2117
  231. ====================
  232. Please report the results of your efforts to use these techniques to the net...
  233. "We are all in this together..."
  234. -----
  235. Ray Harwood           |Data Basix           |Adjunct Faculty, East Campus,
  236. Voice: (602)721-1988  |PO Box 18324         |   Pima Community College
  237. FAX:   (602)721-7240  |Tucson, AZ 85731     |Instructor in Ada and Pascal
  238. CompuServe: 76645,1370|AppleLink: DATA.BASIX|Internet: rharwood@east.pima.edu
  239.