.TH BOOT 8
.SH NAME
boot \- connect to the root file server
.SH SYNOPSIS
.B /boot
[
.B -afkmp
]
[
.BI -u username
]
[
.IB method ! fs-addr
]
.SH DESCRIPTION
.PP
.I Boot
is the first program run after a kernel has been loaded.
It connects to the file server that will serve the
root, performs any authentication needed to
connect to that server, and
.IR exec (2)'s
the
.IR init (8)
program.
.PP
Once loaded, the kernel initializes its data structures and devices.
It sets the two environment variables
.B /env/cputype
and 
.B /env/terminal
to describe the processor.
It then binds a place-holder file server,
.IR root (3),
onto 
.B /
and crafts an initial process whose sole function is to
.IR exec (2)
.BR /boot ,
a binary which is compiled into
.IR root (3).
.PP
The command line passed is dependent
on the information passed from boot ROM
to kernel.
On the MIPS Magnum and SGI Power Series
the command line passed to
.I boot
is the same as that given to the ROM monitor.
.PP
On AT&T Gnots the command line is
.IP
.B /68020/9gnot
.IB method ! server
.PP
On the Nextstation and the Safari, no information is passed from
the boot ROM or program.  Their command lines are
.IP
.EX
.B /68020/9nextstation -p
.EE
.PP
and
.IP
.EX
.B /386/9safari -p
.EE
.PP
.I Boot
must determine the file server to use
and a method with which to connect to it.
It must also set a user name to be used
as the owner of devices and all console
processes and an encryption key to be used
when challenged.
If the
.B -m
or
.B -p
option is given (or the
.I method
on the command line
is invalid)
.I boot
will prompt for these.
.PP
Method and address are prompted for first.
The prompt lists all valid methods, the default in brackets.
.IP
.EX
root is from (il, tcp, hs, local)[il]:
.EE
.PP
A newline picks the default.
Other possible responses are
.I method
or
.IB method ! address.
.PP
The other interactions depend on whether the system
is a
terminal or a CPU server.
.SS Terminal
.PP
The terminal must have a
.I username
to set.
If none is specified with the
.B -u
option,
.I boot
will prompt for one on the console:
.IP
.EX
user: 
.EE
.PP
The user will also be prompted for a password to
be used as an encryption key on each
.IR attach (5):
.IP
.EX
password: 
.EE
.PP
With most
.I methods
.I boot
can now connect to the file server.
However, with the serial line
.I methods
.B 9600
and
.BR 19200 ,
the actual mechanics of setting up the complete connection
are too varied to put into the boot program.
Instead
.I boot
lets the user set up the connection.
It prints a prompt on the console and then simulates
a dumb terminal between the user and the serial line:
.IP
.EX
Connect to file system now, type ctrl-d when done.
(Use the view or down arrow key to send a break)
.EE
.PP
The user can now type at a modem or a Datakit
.B "destination please:"
interface to set up the connection to a TSM8 card.
At Murray Hill, a user would type
.B nj/astro/plan85
at this point.
When the user types a control-D,
.I boot
stops simulating a terminal and starts the file
system protocol over the serial line.
.PP
Once connected,
.I boot
.BR mount 's
the root file system before
.B /
and makes the connection available as
.B #s/boot
for subsequent processes to
.B mount
(see
.IR bind (2)).
.I Boot
completes by
.IR exec (2)'ing
.B /$objtype/init
.BR -t .
If the
.B -a
or
.B -m
options are given they are also passed as options to
.IR init .
.SS CPU Servers
.PP
The user owning devices and console processes on CPU servers is
always
.IR bootes .
It is immutable.
(The name is compiled into the system as the value of the variable
.BR eve ;
local sites may choose a different name.)
If a
.B -k
option is given
.I boot
will prompt for an encryption key to be stored in the
CPU server's non-volatile ram.
.IP
.EX
key:
.EE
.PP
This key is used to verify to callers of the CPU server that it is indeed
the server being called.
.PP
Once connected,
.I boot
.BR mount 's
the root file system before
.B /
and makes the connection available as
.B #s/boot
for subsequent processes to
.B mount
(see
.IR bind (2)).
.I Boot
completes by
.IR exec (2)'ing
.B /$objtype/init -c.
If the
.B -a
or
.B -m
options are given they are also passed as options to
.IR init .
.SS Booting Methods
.PP
The methods available to any system depend on what was
compiled into the kernel.
The complete list of booting methods are listed below.
.TP 8
.B cyc
connect via a point-to-point fiber link using Cyclone boards.
If specified, the address must be the number
of the Cyclone board to be used, default 0.
.TP 8
.B il
connect via Ethernet using the IL protocol.
.TP 8
.B tcp
connect via Ethernet using the TCP protocol.
This method is used only if the initial file server
is on a Unix system.
.TP 8
.B hs
connect via Datakit using the high speed Datakit
card.
.TP 8
.B incon
connect via Datakit using the Incon interface.
.TP 8
.B 9600
connect via Datakit using the serial interface
at 9600 baud.
.TP 8
.B 19200
connect via Datakit using the serial interface
at 19200 baud.
.TP 8
.B local
connect to the local file system.
.PP
For the DARPA Internet methods,
.B il
and 
.BR tcp ,
the address must be a numeric IP address.
If no address is specified
a file server address will be found from another
system on the network using the BOOTP protocol and
the Plan 9 vendor specific fields.
For the Datakit methods,
.BR hs ,
.BR 9600 ,
.BR 19200 ,
and
.BR incon ,
the address must be specified and must
be a relative path name to the file server.
If no address is specified, the address
.B Nfs
is used.
.SH FILES
.B #s/boot
.SH "SEE ALSO"
.IR root (3),
.IR bootp (8),
.IR init (8)
