3/15/72                                     BOOT PROCEDURES (VII)





NAME            bos, maki, rom, vcboot, msys, et al



SYNOPSIS        --



DESCRIPTION     On the RF disk, the highest 16K words are re-

                served for stand-alone programs.  These 16K words

                are allocated as follows:



                bos             (1K)

                Warm UNIX       (7K)

                Cold UNIX       (8K)



                The UNIX read only memory (ROM) is home cut with

                2 programs of 16 words each.  The first (address

                173000) reads bos from the RF disk into core lo-

                cation 154000 and transfers to 154000.  The other

                ROM program (address 173040) reads a DECtape sit-

                ting in the end-zone on drive 0 into core loca-

                tion 0 and transfers to 0.  This latter operation

                is compatible with part of DEC's standard ROM.

                The disassembled code for the UNIX ROM follows:



        173000: mov     $177472,r0              12700;177472

                mov     $3,-(r0)                12740;3

                mov     $140000,-(r0)           12740;140000

                mov     $154000,-(r0)           12740;154000

                mov     $-2000,-(r0)            12740;176000

                mov     $5,-(r0)                12740;5

                tstb    (r0)                    105710

                bge     .-2                     2376

                jmp     *$154000                137;154000



        173040: mov     $177350,r0              12700;177350

                clr     -(r0)                   5040

                mov     r0,-(r0)                10040

                mov     $3,-(r0)                12740;3

                tstb    (r0)                    105710

                bge     .-2                     2376

                tst     *$177350                5737;177350

                bne     .                       1377

                movb    $5,(r0)                 112710;5

                tstb    (r0)                    105710

                bge     .-2                     2376

                clr     pc                      5007



                The program bos (Bootstrap Operating System) ex-

                amines the console switchs and executes one of

                several internal programs depending on the set-

                ting.  The following settings are currently rec-

                ognized:



                ???     Will read Warm UNIX from the RF into core

                        location 0 and transfer to 600.



                1       Will read Cold UNIX from the RF into core

                        location 0 and transfer to 600.



                10      Will dump all of memory from core loca-

                        tion 0 onto DECtape drive 7 and then

                        halt.



                20      Will read 256 words from RK0 into core 0

                        and transfer to zero.  This is the proce-

                        dure to boot DOS from an RK.



                40      This is the same as 10 above, but instead

                        of halting, UNIX warm is loaded.



                0       Will load a standard UNIX binary paper

                        tape into core location 0 and transfer to

                        0.



                77500   Will load the standard DEC absolute and

                        binary loaders and transfer to 77500.



                Thus we come to the UNIX warm boot procedure: put

                173000 into the switches, push load address and

                then push start.  The alternate switch setting of

                173030 that will load warm UNIX is used as a sig-

                nal to bring up a single user system for special

                purposes.  See init(VII).  For systems without a

                rom, UNIX (both warm and cold) have a copy of the

                disk boot program at location 602.  This is prob-

                ably a better warm boot procedure because the

                program at 602 also attempts to complete out-

                standing I/O.



                Cold boots can be accomplished with the Cold UNIX

                program, but they're not.  Thus the Cold UNIX

                slot on the RF may have any program desired.

                This slot is, however, used during a cold boot.

                Mount the UNIX INIT DECtape on drive 0 positioned

                in the end-zone.  Put 173040 into the switches.

                Push load address.  Put 1 into the switches.

                Push start.  This reads a program called vcboot

                from the tape into core location 0 and transfers

                to it.  vcboot then reads 16K words from the DEC-

                tape (blocks 1-32) and copies the data to the

                highest 16K words of the RF.  Thus this initial-

                izes the read-only part of the RF.  vcboot then

                reads in bos and executes it.  bos then reads in

                Cold UNIX and executes that.  Cold UNIX halts for

                a last chance before it completely initializes

                the RF file system.  Push continue, and Cold UNIX

                will initialize the RF.  It then sets into execu-

                tion a user program that reads the DECtape for

                initialization files starting from block 33.

                When this is done, the program executes /etc/init

                which should have been on the tape.



                The INIT tape is made by the program maki running

                under UNIX.  maki writes vcboot on block 0 of

                /dev/tap7.  It then copies the RF 16K words (us-

                ing /dev/rf0) onto blocks 1 thru 32.  It has in-

                ternally a list of files to be copied from block

                33 on.  This list follows:



                        /etc/init

                        /bin/chmod

                        /bin/date

                        /bin/login

                        /bin/ls

                        /bin/mkdir

                        /etc/mount

                        /bin/sh

                        /bin/tap



                Thus this is the set of programs available after

                a cold boot.  init and sh are mandatory.  For

                multi-user UNIX, getty and login are also neces-

                sary.  mkdir is necessary due to a bug in tap.

                tap and mount are useful to bring in new files.

                As soon as possible, date should be done.  That

                leaves ls and chmod as frosting.



                The last link in this incestuous daisy chain is

                the program msys.



                   msys char file



                will copy the file file onto the RF read only

                slot specified by the characacter char.  Char is

                taken from the following set:



                   b bos

                   u Warm UNIX

                   1 Cold UNIX



                Due to their rarity of use, maki and msys are

                maintained off line and must be reassembled be-

                fore used.



FILES           /dev/rf0, /dev/tap?



SEE ALSO        init(VII), tap(I), sh(I), mkdir(I)



DIAGNOSTICS     --



BUGS            This section is very configuration dependent.

                Thus, it does not describe the boot procedure for

                any one machine.



OWNER           ken