From:	SMTP%"Info-VAX-Request@Mvb.Saic.Com" 23-SEP-1994 11:11:51.88
To:	EVERHART
CC:	
Subj:	RE: ??? Auto. boot MicroVAX - ethernet card

From: Jerry Leichter <leichter@lrw.com>
X-Newsgroups: comp.os.vms
Subject: RE: ??? Auto. boot MicroVAX - ethernet card
Message-ID: <9409231451.AA01422@uu3.psi.com>
Date: Fri, 23 Sep 94 10:30:56 EDT
Organization: Info-Vax<==>Comp.Os.Vms Gateway
X-Gateway-Source-Info: Mailing List
Lines: 93
To: Info-VAX@Mvb.Saic.Com

	I'm looking for information on automatically booting a MicroVAX
	through the  ethernet card.  A few months ago there was a posting for
	this.  Unfortunately I have misplaced the posting!!!

	I know the sniffer boot does not allow you to automatically boot
	through the ethernet card, however in the previous posting it showed a
	way around this.

The sniffer boot looks for bootable media in a particular search order.  The
Ethernet card is at the end of its list of media, so if you have anything
bootable along the way - like a bootable disk - you'll get the disk.  The
simplest method of ensuring that the Ethernet gets booted is to make all the
other media on the list non-bootable.  For a disk, this means making sure
there is no SYSBOOT in [SYSEXE] or [SYS0.SYSEXE].  The sniffer will decided
very quickly that the disk is unbootable and move on.  The real problem is
with tapes.  If there's a tape in a connected driver, the sniffer will read
all the way to the end of the tape before deciding that there is no SYSBOOT
to be found.  The trick to avoid this is to make the disk actually bootable -
but arrange for the code run from the disk to boot from the Ethernet.  To
that end, see the attached "INFO-VAX Classic".
							-- 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
