From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 11-JUN-1992 14:51:47.88
To:	INFO-VAX@KL.SRI.COM
CC:	
Subj:	re: How to stop MV2/GPX from disk booting?

	I saw a post on this at least a year ago but at the time I had no need
	for the info.  We have inherited three MV2/GPX systems that we added
	to our cluster. Could someone mail or post the code for a program that
	will cause them NOT to try to boot from the disk (the boot rom is not
	configurable). We want the things to boot from ethernet (B XQ) into
	the cluster upon powerup without human intervention.

It was almost exactly one year ago.  I saved the message, and use the code on
my own system.  VERY handy - a big thank you to the author, John Osudar.

							-- Jerry

Date: Wed, 12 Jun 1991 19:20:04 CDT
From: bunker!ANLCMT.CMT.ANL.GOV!OSUDAR (John Osudar {708 972-7505})
Subject: SET BOOT (almost-) equivalent on MicroVAX II
To: info-vax@sri.com

Many people have asked about a way to get a MicroVAX II to boot from a specific
device (e.g. XQA0, the Ethernet interface) without going through the normal 
"sniffer boot" sequence.  The MicroVAX II console code doesn't provide a way to 
"SET BOOT" or anything equivalent.  The "sniffer boot", which goes through a
fixed sequence of tests to look for a bootable system, can cause problems; the
first bootable disk may not be the one you want to boot, or you may want the
default power-up boot to always go to the Ethernet even though there's a
bootable disk on the system.  There's no *supported* way to do this, but
there *is* a way -- at least one that works for me:

To make this work, you need to have a disk (preferably the lowest unit on the 
DUA controller, and preferably a removable disk -- though I'm doing it with
DUB1:).  This disk must have an ODS-2 file structure on it, but should have 
no automatically-bootable system (i.e. no [SYS0] system.)  There should be no 
bootable disks in the "sniffer" sequence prior to this disk.
 
You then create the directory [SYS0.SYSEXE] on this disk, and place an image
named SYSBOOT.EXE in that directory.  The SYSBOOT.EXE that you place there is
*not* the one that you find in your SYS$SYSTEM, but instead is a short program
described below.  You can create this SYSBOOT.EXE image a number of ways; the
following description tells you how to do it with PATCH.

To create the SYSBOOT.EXE, copy a VMS image file (.EXE) to SYSBOOT.EXE in your
current directory, and execute the following procedure:

$ PATCH/ABSOLUTE SYSBOOT.EXE
DEP/INSTR 0
"MOVL #30415158,R0"
"MOVQ B^20(R11),R1"
"MOVQ B^28(R11),R3"
"MOVL B^30(R11),R5"
"MOVL B^10(R11),R10"
"MOVL B^18(R11),AP"
"MOVAL W^200(R11),SP"
"MOVL B^14(R11),R11"
"JMP (SP)"
EXIT
UPDATE
EXIT

The number "30415158" is hex for "XQA0" with the characters read right-to-left;
you can replace this with the boot device of your choice.

Copy the resulting SYSBOOT.EXE file to the [SYS0.SYSEXE] directory on the
aforementioned disk.  Make sure it's a contiguous file.  (If you like, you can
set the EOF pointer at the end of the first block, and truncate the file; the
single-block SYSBOOT.EXE is all that's needed, and of course it'll always be
contiguous!)  That's all there is to it.

Now, when the MicroVAX II's VMB goes looking for a bootable system, it will
find this SYSBOOT.EXE file, and will load it as the secondary bootstrap.  All
that the code in this SYSBOOT.EXE does, is to set the real boot device name in
R0, reload the registers the way VMB wants them when VMB is first executed, and
jump to the VMB code.  VMB then re-executes, but with the correct boot device
this time.

If you want to, you can also tinker with the other registers, besides R0, to
produce a different automatic boot.  I haven't tried it; that's left as an 
exercise for the reader :-)

As always, no guarantees... if it doesn't work for you, or it causes your
disks to melt down or your MicroVAX to explode, it ain't my fault.  :-)

					John Osudar
					osudar@anl.gov

