home *** CD-ROM | disk | FTP | other *** search
- .tr |
- .th "BOOT PROCEDURES" VIII 2/11/75
- .sh NAME
- boot procedures \*- UNIX startup
- .sh DESCRIPTION
- .it "How to start UNIX.||"
- UNIX is started by placing it in core
- at location zero and transferring to zero.
- Since the system is not reenterable,
- it is necessary to read it in from disk or tape.
- .s3
- The
- .it tp
- command places a bootstrap program
- on the
- otherwise unused block zero of the tape.
- The DECtape version of this program is
- called
- .it tboot,
- the magtape version
- .it mboot.
- If
- .it tboot
- or
- .it mboot
- is read into location zero and
- executed there,
- it will type `=' on the console,
- read in a
- .it tp
- entry name,
- load that entry into core,
- and transfer to zero.
- Thus one way to run UNIX
- is to maintain the system code on a tape using
- .it tp.
- Caution: the file /usr/mdec/tboot
- (DECtape)
- or /usr/mdec/mboot
- (magtape)
- must be present when the tape is made!
- When a boot is required,
- execute (somehow) a program
- which reads in and jumps to
- the first block of the tape.
- In response to the `='
- prompt,
- type the entry name of the system on the tape
- (we use plain `unix').
- It is strongly recommended that a current version of
- the system be maintained in this way,
- even if it is usually booted from disk.
- .s3
- The standard
- DEC ROM which loads DECtape is sufficient to
- read in
- .it tboot,
- but the
- magtape ROM loads block one, not zero.
- If no suitable ROM is available,
- magtape and DECtape programs are presented below which may be
- manually placed in core and executed.
- .s3
- The system can also be booted from a disk file
- with the aid of the
- .it uboot
- program.
- When read into location 0 and executed,
- .it uboot
- reads a single character (either
- .bd p
- or
- .bd k
- for RP or RK, both drive 0)
- to specify which device is to be
- searched.
- Then it
- reads a UNIX pathname from the console,
- finds the corresponding file on the given device,
- loads that file into core location zero,
- and transfers to it.
- .it Uboot
- operates under very
- severe space constraints.
- It supplies no prompts, except that it
- echoes a carriage return and line feed after the
- .bd p
- or
- .bd k.
- No diagnostic is provided if the indicated file cannot be found,
- nor is there any means of correcting typographical errors in the
- file name except to start the program over.
- If it fails to find the file, however,
- it jumps back to its start,
- so another try
- can be attempted,
- starting again with the
- .bd p
- or
- .bd k.
- Notice that
- .it uboot
- will only load a file from drive 0,
- and the file system it searches must start
- at the beginning of the disk.
- .it Uboot
- itself usually resides in the otherwise unused
- block 0
- of the disk,
- so it can be loaded by ROM program;
- .it mkfs
- can be used to put it there when the file system is created.
- It can also be loaded from a
- .it tp
- tape as described above.
- .s3
- .it "The switches.||"
- The console switches play an important role in the
- use and especially the booting of UNIX.
- During operation,
- the console switches are
- examined 60 times per second,
- and the contents of the address specified by the switches
- are displayed in the display register.
- (This is not true on the 11/40
- since there is no display register on that machine.)
- If the switch address is even,
- the address is interpreted in kernel (system)
- space;
- if odd,
- the rounded-down address is interpreted in
- the current user space.
- .s3
- If any diagnostics are produced by the system,
- they are printed on the console only if
- the switches are non-zero.
- Thus it is wise to have a non-zero value in the
- switches at all times.
- .s3
- During the startup of the
- system,
- the
- .it init
- program (VIII)
- reads the switches and
- will come up single-user
- if the switches are set to 173030.
- .s3
- It is unwise to have a non-existent address in the
- switches.
- This causes a bus error in the system
- (displayed as 177777)
- at the rate of 60 times per second.
- If there is a transfer of more than
- 16ms duration on a device with a data rate
- faster than the bus error timeout
- (about 10\*us)
- then a permanent disk non-existent-memory error will occur.
- .s3
- .it "ROM programs.||"
- Here are some programs which are suitable for
- installing in read-only memories,
- or for manual keying into core
- if no ROM is present.
- Each program is position-independent
- but should be placed well above location 0
- so it will not be overwritten.
- Each reads a block from the
- beginning of a device into core location
- zero.
- The octal words constituting the program are
- listed on the left.
- .s3
- .ne 5
- .nf
- DECtape (drive 0) from endzone:
- .if n .ta 3 11 15 23 38
- .if t .ta .3i 1i 1.4i 2i 3.5i
- 012700 mov $tcba,r0
- 177346
- 010040 mov r0,\*-(r0) / use tc addr for wc
- 012710 mov $3,(r0) / read bn forward
- 000003
- 105710 1: tstb (r0) / wait for ready
- 002376 bge 1b
- 112710 movb $5,(r0) / read (forward)
- 000005
- 000777 br \fB.\fR / loop; now halt and start at 0
- .s3
- DECtape (drive 0) with search:
- 012700 1: mov $tcba,r0
- 177346
- 010040 mov r0,\*-(r0) / use tc addr for wc
- 012740 mov $4003,\*-(r0) / read bn reverse
- 004003
- 005710 2: tst (r0)
- 002376 bge 2b / wait for error
- 005760 tst \*-2(r0) / loop if not end zone
- 177776
- 002365 bge 1b
- 012710 mov $3,(r0) / read bn forward
- 000003
- 105710 2: tstb (r0) / wait for ready
- 002376 bge 2b
- 112710 movb $5,(r0) / read (forward)
- 000005
- 105710 2: tstb (r0) / wait for ready
- 002376 bge 2b
- 005007 clr pc / transfer to zero
- .s3
- .fi
- Caution: both of these DECtape programs will (literally) blow a fuse
- if 2 drives are dialed to zero.
- .s3
- .nf
- Magtape from load point:
- 012700 mov $mtcma,r0
- 172526
- 010040 mov r0,\*-(r0) / usr mt addr for wc
- 012740 mov $60003,\*-(r0) / read 9\*-track
- 060003
- 000777 br \fB.\fR / loop; now halt and start at 0
- .s3
- RK (drive 0):
- 012700 mov $rkda,r0
- 177412
- 005040 clr \*-(r0) / rkda cleared by start
- 010040 mov r0,\*-(r0)
- 012740 mov $5,\*-(r0)
- 000005
- 105710 1: tstb (r0)
- 002376 bge 1b
- 005007 clr pc
- .s3
- .ne 11
- RP (drive 0)
- 012700 mov $rpmr,r0
- 176726
- 005040 clr \*-(r0)
- 005040 clr \*-(r0)
- 005040 clr \*-(r0)
- 010040 mov r0,\*-(r0)
- 012740 mov $5,\*-(r0)
- 000005
- 105710 1: tstb (r0)
- 002376 bge 1b
- 005007 clr pc
- .dt
- .sh FILES
- /unix \*- UNIX code
- .br
- /usr/mdec/mboot \*- \fItp\fR magtape bootstrap
- .br
- /usr/mdec/tboot \*- \fItp\fR DECtape bootstrap
- .br
- /usr/mdec/uboot \*- file system bootstrap
- .sh "SEE ALSO"
- tp (I), init (VIII)
-