1BOOT(8)                     System Manager's Manual                    BOOT(8)
2
3
4

NAME

6       boot - 2.11BSD bootstrap proceedure
7

DESCRIPTION

9       The  2.11BSD  system is started by a two-stage process.  The first is a
10       primary bootstrap (limited to 512 bytes) which is able to read in rela‐
11       tively  small stand-alone programs; the second (called boot) is used to
12       read in the system itself.
13
14       The primary bootstrap must reside in block zero of the boot device (the
15       disklabel  resides  in  block  one).   It can be read in and started by
16       standard ROM cold boot routines or, if necessary, by keying in a  small
17       startup routine.  The primary bootstrap is capable of loading only type
18       0407 executable files (impure (non-shared), non-separate I&D.)   Copies
19       of  the block zero bootstraps are kept in the directory /mdec.  Diskla‐
20       bel(8) is normally used to place a copy of the appropriate bootstrap in
21       block zero of new file systems.
22
23       The  primary  bootstrap  loads boot from the file system that starts at
24       block 0 of the drive specified to the  boot  ROM.   Normally  the  boot
25       device  is  automatically used as the root filesystem.  This action can
26       be overriden by specifying the -R command to  boot.   If  boot  is  not
27       found the system will hang as the primary boot spins in an endless loop
28       trying to find boot.  No diagnostic message results if the file  cannot
29       be found.
30
31       ·      In  an  emergency,  the bootstrap methods described in the paper
32              Installing and Operating 2.11BSD can be used to boot from a dis‐
33              tribution tape.
34
35       The secondary boot program, called boot, actually brings in the system.
36       When read into location 0 and executed, boot sets up memory management,
37       relocates  itself into high memory, and types its name and a `:' on the
38       console.  If this is an automatic, unattended reboot, boot will  use  a
39       default file specification for the installation, typing the file's name
40       after the prompt.  Otherwise, it reads a file  specification  from  the
41       console.   Normal  line  editing characters can be used to make correc‐
42       tions while typing this (see below for file specification format).   If
43       only  a  carriage return is typed, a default name (/unix) will be used.
44       Boot finds the [specified] file and loads it into memory location zero,
45       sets up memory management as required, and calls the program by execut‐
46       ing a `trap' instruction.
47
48       For the system to boot, /etc/init must exist and be executable;  if  it
49       is  not, the kernel will print a message to that effect and loop.  Fur‐
50       ther, for a single user boot, the files /bin/sh and  /dev/console  must
51       also  exist and /bin/sh must be executable (if either of these is miss‐
52       ing, init will attempt multi-user operation).  For  a  multi-user  boot
53       the  file  /etc/ttys  must  exist (if missing, init will attempt single
54       user operation).
55
56       Init runs  the  autoconfig(8)  program  to  probe  for  and  initialize
57       devices.   Autoconfig only knows to look in /unix, thus if an alternate
58       kernel name was specified none of the devices except  /dev/console  and
59       the boot disk will be known.
60
61       If  autoconfig  problems are suspected (or if  you are simply voyeuris‐
62       tic) the debug flag can be turned on by  specifying  -D  to  boot  (see
63       below).
64
65       When the system is running in single user mode, it starts a single user
66       shell on the console which types a `#' prompt.  After  doing  any  file
67       system checks and setting the date (date(1)) a multi-user system can be
68       brought up by typing an EOT (control-d) in response to the `#' prompt.
69
70       Boot file specification format: The file specifications used with  boot
71       are of the form:
72
73              device(ctlr,unit,part)path [-aRrDs]
74
75       or
76
77              -bootcommand
78
79       where
80
81       device is the type of the device to be searched;
82
83       ctlr   is the controller number of the disk
84
85       unit   is the unit number of the disk or tape;
86
87       part   is the partition number of a filesystem on the specified disk or
88              the tape file number if the device is a  tape.   The  underlying
89              device driver must support disklabels and a valid disklabel must
90              be present if part is anything except 0.
91
92       path   is the path name of a disk file to be loaded with all mount pre‐
93              fixes  stripped off (path must be omitted for tape files.)  Tape
94              files are separated by single tape marks.
95
96       Flags to boot may be specified in either  of  two  places.   At  the  :
97       prompt and after the file name.  The options are:
98
99       -a     Ask  for  a  kernel  name.   This  is  present for symmetry only
100              because in order to specify this option you already have  to  be
101              at the : prompt.
102
103       -D     Turn on the autoconfig debug flag.
104
105       -R     force  the kernel to use its compiled in root device rather than
106              adapting to the boot device.
107
108       -s     tell init to enter single user state rather  than  bringing  the
109              system  all  the  way  up to multi-user mode.  -r mount the root
110              filesystem read-only.  This is not currently  supported  by  the
111              kernel mostly because pipes are implemented in the filesystem.
112
113       Commands (-bootcommand) to boot are:
114
115       -bootflags N        where N is a decimal number.
116
117       -bootflags flag     where flag is from the list above.
118
119       -bootdebug N        where  N  is  a  decimal number.  This is a general
120                           purpose flag word used by boot and is not passed to
121                           the loaded program or kernel.
122
123       Device is one of the following
124
125            xp   RM02/03/05, RP04/05/06, DIVA, SI Eagle, CDC 9766, Fuji 160
126            rp   RP03
127            rk   RK05
128            hk   RK06/7
129            rl   RL01/2
130            si   RM05, CDC 9766
131            ra   RA60/80/81, RX50, RD51/52/53, RC25
132            ht   TU/TE16
133            tm   TU/TE10
134            ts   TS-11
135
136       The  stand alone tape drive unit number is specially encoded to specify
137       both unit number and tape density (BPI).  Most tape  subsystems  either
138       automatically  adjust to tape density or have switches on the drives to
139       force the density to a particular setting, but for  those  which  don't
140       the  following density select mechanisms may be necessary.  The ts only
141       operates at 1600BPI, so there is no special unit density encoding.  The
142       ht  will operate at either 800BPI or 1600BPI.  Units 0 through 3 corre‐
143       spond to 800BPI, and 4 through 7 to  1600BPI  on  drives  0  through  3
144       respectively.   The  standard  DEC  tm  only supports 800BPI (and hence
145       can't be used with the standard  distribution tape), but several widely
146       used  tm emulators support 1600BPI and even 6250BPI.  Units 0 through 3
147       correspond to 800BPI, 4 through 7 to  1600BPI,  and  8  through  11  to
148       6250BPI on drives 0 through 3 respectively.
149
150       For   example,  to  boot  a  system  from  unit  0  on  an  RK07,  type
151       “hk(0,0)unix” to the  boot  prompt.   The  specification  “ra(1,0)unix”
152       indicates  an  MSCP  disk,  unit  1.  The specification “ra(1,0,0)unix”
153       indicates an MSCP disk, unit 0 but on controller 1.   And  finally  the
154       specification  “ts(0,3)” would cause the fourth file on a tape threaded
155       on `ts' tape drive 0 to be loaded and executed.
156
157       Cold boot loaders: The following programs to load and execute the  pri‐
158       mary bootstrap may be installed in read-only memories or manually keyed
159       into main memory.  Each program is position-independent but  should  be
160       placed well above location 0 so it will not be overwritten.  Each reads
161       a block from the beginning of a device into core  location  zero.   The
162       octal words constituting the program are listed on the left.
163
164       RK (drive 0):
165          012700      mov     $rkda,r0
166          177412
167          005040      clr     -(r0)          / rkda cleared by start
168          010040      mov     r0,-(r0)
169          012740      mov     $5,-(r0)
170          000005
171          105710  1:  tstb    (r0)
172          002376      bge     1b
173          005007      clr     pc
174
175       RP (drive 0)
176          012700      mov     $rpmr,r0
177          176726
178          005040      clr     -(r0)
179          005040      clr     -(r0)
180          005040      clr     -(r0)
181          010040      mov     r0,-(r0)
182          012740      mov     $5,-(r0)
183          000005
184          105710  1:  tstb    (r0)
185          002376      bge     1b
186          005007      clr     pc
187
188       TM (drive 0):
189          012700      mov     $tmba,r0
190          172526
191          010040      mov     r0,-(r0)
192          012740      mov     $60003,-(r0)
193          060003
194          000777      br      .
195

FILES

197       /unix           system code
198       /boot           system bootstrap
199       /etc/init       system process dispatcher
200       /mdec/xxuboot   sector 0 boot blocks, xx is disk type
201

SEE ALSO

203       crash(8V), autoconfig(8), reboot(2), disklabel(8), fsck(8), init(8)
204
205
206
2073rd Berkeley Distribution        May 24, 1996                          BOOT(8)
Impressum