Research V4 release
[unix-history] / man / man8 / bproc.8
CommitLineData
5da7e2bc
KT
1.tr |
2.th "BOOT PROCEDURES" VIII 11/1/73
3.sh NAME
4boot procedures \*- UNIX startup
5.sh DESCRIPTION
6The advent of the new system has
7changed the boot procedures.
8.it "These procedures apply only to C-language systems."
9.s3
10.it "How to start UNIX.||"
11UNIX is started by placing it in core
12starting at location zero and transferring to zero.
13There are various ways to do this.
14If
15UNIX is still intact after it has been running,
16the most obvious method is
17simply to transfer to zero.
18.s3
19The
20.it tp
21command places a bootstrap program
22on the
23otherwise unused block zero of the tape.
24The DECtape version of this program is
25called
26.it tboot,
27the magtape version
28.it mboot.
29If
30.it tboot
31or
32.it mboot
33is read into location zero and
34executed there,
35it will type `=' on the console,
36read in a
37.it tp
38entry name,
39load that entry into core,
40and transfer to zero.
41Thus the next easiest way to run UNIX
42is to maintain the UNIX code on a tape using
43.it tp.
44Then when a boot is required,
45execute (somehow) a program
46which reads in and jumps to
47the first block of the tape.
48In response to the `='
49prompt,
50type the entry name of the system on the tape
51(we use plain `unix').
52It is strongly recommended that a current version of
53the system be maintained in this way,
54even if the first or third methods of booting the
55system are usually used.
56.s3
57The standard
58DEC ROM which loads DECtape is sufficient to
59read in
60.it tboot,
61but the
62magtape ROM loads block one, not zero.
63If no suitable ROM is available,
64magtape and DECtape programs are presented below which may be
65manually placed in core and executed.
66.s3
67A third method of rebooting the system involves the otherwise unused
68block zero of each UNIX file system.
69The single-block program
70.it uboot
71will read a UNIX pathname from the console,
72find the corresponding file on a device,
73load that file into core location zero,
74and transfer to it.
75The current version of this boot program
76reads a single character (either
77.bd p
78or
79.bd k
80for RP or RK, both drive 0)
81to specify which device is to be
82searched.
83.it Uboot
84operates under very
85severe space constraints.
86It supplies no prompts, except that it
87echos a carriage return and line feed after the
88.bd p
89or
90.bd k.
91No diagnostic is provided if the indicated file cannot be found,
92nor is there any means of correcting typographical errors in the
93file name except to start the program over.
94.it Uboot
95can reside on any of the standard
96file systems or may be loaded from a
97.it tp
98tape as described above.
99.s3
100The standard DEC disk ROMs will load and execute
101.it uboot
102from block zero.
103.s3
104.it "The switches.||"
105The console switches play an important role in the
106use and especially the booting of UNIX.
107During operation,
108the console switches are
109examined 60 times per second,
110and the contents of the address specified by the switches
111are displayed in the display register.
112(This is not true on the 11/40
113since there is no display register on that machine.)
114If the switch address is even,
115the address is interpreted in kernel (system)
116space;
117if odd,
118the rounded-down address is interpreted in
119the current user space.
120.s3
121If any diagnostics are produced by the system,
122they are printed on the console only if
123the switches are non-zero.
124Thus it is wise to have a non-zero value in the
125switches at all times.
126.s3
127During the startup of the
128system,
129the
130.it init
131program (VIII)
132reads the switches and
133will come up single-user
134if the switches are set to 173030.
135.s3
136It is unwise to have a non-existent address in the
137switches.
138This causes a bus error in the system
139(displayed as 177777)
140at the rate of 60 times per second.
141If there is a transfer of more than
14216ms duration on a device with a data rate
143faster than the bus error timeout
144(approx 10\*us)
145then a permanent disk non-existent-memory error will occur.
146.s3
147.it "ROM programs.||"
148Here are some programs which are suitable for
149installing in read-only memories,
150or for manual keying into core
151if no ROM is present.
152Each program is position-independent
153but should be placed well above location 0
154so it will not be overwritten.
155Each reads a block from the
156beginning of a device into core location
157zero.
158The octal words constituting the program are
159listed on the left.
160.s3
161.ne 5
162.nf
163DECtape (drive 0) from endzone:
164.if n .ta 3 11 15 23 38
165.if t .ta .3i 1i 1.4i 2i 3.5i
166 012700 mov $tcba,r0
167 177346
168 010040 mov r0,-(r0) / use tc addr for wc
169 012710 mov $3,(r0) / read bn forward
170 000003
171 105710 1: tstb (r0) / wait for ready
172 002376 bge 1b
173 112710 movb $5,(r0) / read (forward)
174 000005
175 000777 br . / loop; now halt and start at 0
176.s3
177DECtape (drive 0) with search:
178 012700 1: mov $tcba,r0
179 177346
180 010040 mov r0,-(r0) / use tc addr for wc
181 012740 mov $4003,-(r0) / read bn reverse
182 004003
183 005710 2: tst (r0)
184 002376 bge 2b / wait for error
185 005760 tst -2(r0) / loop if not end zone
186 177776
187 002365 bge 1b
188 012710 mov $3,(r0) / read bn forward
189 000003
190 105710 2: tstb (r0) / wait for ready
191 002376 bge 2b
192 112710 movb $5,(r0) / read (forward)
193 000005
194 105710 2: tstb (r0) / wait for ready
195 002376 bge 2b
196 005007 clr pc / transfer to zero
197.s3
198.fi
199Caution: both of these DECtape programs will (literally) blow a fuse
200if 2 drives are dialed to zero.
201.s3
202.nf
203Magtape from load point:
204 012700 mov $mtcma,r0
205 172526
206 010040 mov r0,-(r0) / usr mt addr for wc
207 012740 mov $60003,-(r0) / read 9-track
208 060003
209 000777 br . / loop; now halt and start at 0
210.s3
211RK (drive 0):
212 012700 mov $rkmr,r0
213 177414
214 005040 clr -(r0)
215 005040 clr -(r0)
216 010040 mov r0,-(r0)
217 012740 mov $5,-(r0)
218 000005
219 105710 1: tstb (r0)
220 002376 bge 1b
221 005007 clr pc
222.s3
223RP (drive 0)
224 012700 mov $rpmr,r0
225 176726
226 005040 clr -(r0)
227 005040 clr -(r0)
228 005040 clr -(r0)
229 010040 mov r0,-(r0)
230 012740 mov $5,-(r0)
231 000005
232 105710 1: tstb (r0)
233 002376 bge 1b
234 005007 clr pc
235.dt
236.sh FILES
237/usr/sys/unix \*- UNIX code
238.br
239/usr/mdec/mboot \*- \fItp\fR magtape bootstrap
240.br
241/usr/mdec/tboot \*- \fItp\fR DECtape bootstrap
242.br
243/usr/mdec/uboot \*- file system bootstrap
244.sh "SEE ALSO"
245tp(I), init(VII)