]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/8/boot
ip/ipconfig: make ra6 daemon less chatty, log to /sys/log/ipconfig instead of /sys...
[plan9front.git] / sys / man / 8 / boot
old mode 100755 (executable)
new mode 100644 (file)
index 094bf83..fbdf3be
@@ -1,31 +1,30 @@
 .TH BOOT 8
 .SH NAME
-boot \- connect to the root file server
+boot, bootrc \- connect to the root file server
 .SH SYNOPSIS
 .B /boot/boot
-[
-.B -fkm
-]
-[
-.BI -u username
-]
-[
-.IB method ! fs-addr
-]
-[
-.I args
-]
 .SH DESCRIPTION
 .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
+is the first program run after a kernel has been loaded. It
+mounts
+.BR bootfs.paq ,
+a compressed filesystem contained in
+.IR root (3),
+sets up the
+.IR rc (1)
+environment and executes
+.I bootrc
+passing on its arguments.
+.I Bootrc
+connects to the file server that will serve the root, performs any 
+authentication needed to connect to that server, and executes the
 .IR init (8)
-program.
-It is started by the kernel, never run directly by the user.  See
+program. Both 
+.I boot
+and
+.I bootrc
+are started by the kernel, never run directly by the user. 
+See
 .IR booting (8)
 for information about the process of loading the kernel (and
 .IR boot )
@@ -54,63 +53,63 @@ Machines that boot directly from ROM (that is, most machines other than PCs)
 pass the boot line given to the ROM directly to
 .IR boot .
 .PP
-On the PC, each line in the DOS file
-.B plan9.ini
+On the PC, each line in the file
+.IR plan9.ini (8)
 of the form
 .IB name = value
 is passed to the boot program as an environment
 variable with the same name and value.
-The command line is
-.IP
-.B /386/9dos
-.IB method ! server
 .PP
-(The first argument is ignored by
-.IR boot .)
-.I Boot
-must determine the file
-.I server
-to use
-and a
+After
+.I boot
+passed its execution to
+.I bootrc,
+it must determine the fileserver to use and a
 .I method
 with which to connect to it.
-Typically this will name a file server on the network,
-or state that the root file system is on local disk and name the partition.
+Typically
+.I device
+will name a local disk partition or ethernet interface.
 The complete list of methods is given below.
 .PP
-.I Boot
+.I Bootrc
 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.
-.I Boot
+.I Bootrc
 will prompt for these.
 .PP
-Method and address are prompted for first.
+Method and device are prompted for first.
 The prompt lists all valid methods, with the default in brackets, for example:
 .IP
 .EX
-root is from (tcp, local!#S/sdC0/fs)[tcp]:
+bootargs is (tcp, il, local!device) [local!/dev/sdC0/fscache]
 .EE
 .PP
-A newline picks the default.
+A newline picks the default. Entering
+.B !rc
+breaks into the
+.IR rc (1)
+shell.
 Other possible responses are
-.I method
+.IR method ,
+.IB method ! device
 or
-.IB method ! address\f1.
-To aid in automatic reboot, the default is automatically
-taken on CPU servers if nothing is typed within 15 seconds.
+.IB method ! device
+.IR args .
 .PP
 The other interactions depend on whether the system
 is a
 terminal or a CPU server.
 .SS Terminal
-The terminal must have a
+A terminal must have a
 .I username
-to set.
-If none is specified with the
-.B -u
-option,
+set.
+If not specified with the
+.B user=
+.IR plan9.ini (8)
+parameter,
 .I boot
 will prompt for one on the console:
 .IP
@@ -126,37 +125,6 @@ be used as an encryption key on each
 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 the modem to
-dial the number.  What is typed depends on
-the modem and is beyond this discussion.
-.PP
-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
 mounts
@@ -169,9 +137,9 @@ for subsequent processes to
 (see
 .IR bind (2)).
 .I Boot
-completes by
+completes by 
 .IR exec (2)'ing
-.B /$objtype/init
+.B /$cputype/init
 .BR -t .
 If the
 .B -m
@@ -181,9 +149,13 @@ If the environment variable
 .B init
 is set (via
 .IR plan9.ini (8)),
-it is used as a command line to exec instead.
+it is used as an argument to 
+.IR exec (2)
+instead.
 .PP
-If the kernel has been built with the cache file system,
+If the
+.I bootfs.paq
+has been built with the cache file system,
 .IR cfs (4),
 the local disk partition
 .BI /dev/sd XX /cache
@@ -191,25 +163,17 @@ the local disk partition
 .B XX
 is a unit specifier)
 exists, and the root file system is from a remote server,
-then the kernel will insert a user level cache
+then
+.I bootrc
+will insert a user level cache
 process between the remote server and the local namespace
 that caches all remote accesses on the local partition.
-The
-.B -f
-flag commands
-.B cfs
-to reformat the cache partition.
 .SS CPU Servers
 The user owning devices and console processes on CPU servers
 and that user's domain and encryption key are
-read from NVRAM on all machines except PC's.
-PC's keep the information in the disk partition
-.BI /dev/sd XX /nvram\f1.
-If a
-.B -k
-option is given or if no stored information is found
-.I boot
-will prompt for all three items and store them.
+read from NVRAM on all machines except PCs.
+PCs keep the information in the disk partition
+.BI /dev/sd XX /nvram.
 .IP
 .EX
 password: 
@@ -224,7 +188,7 @@ Once connected,
 .I boot
 behaves as on the terminal except for
 .IR exec (2)'ing
-.B /$objtype/init
+.B /$cputype/init
 .BR -c .
 .SS Booting Methods
 The methods available to any system depend on what was
@@ -234,6 +198,8 @@ The complete list of booting methods are listed below.
 .BR tcp
 connect via Ethernet using the TCP protocol.
 The
+.I device
+and
 .I args
 are passed to
 .IR ipconfig (8)
@@ -243,103 +209,28 @@ The
 variables
 .B fs
 and
-.B auth
-override the file server and authentication server IP addresses
+.BR auth
+override the file server and authentication servers
 obtained (if any) from DHCP during
 .IR ipconfig (8).
 .TP 8
-.B local
+.BR il
+the same as
+.B tcp
+but uses the IL protocol to connect to the fileserver.
+.TP 8
+.BR local
 connect to the local file system.
-The first argument is a disk holding a file system.
-.I Boot
-inspects the disk.
-If the disk is a 
-.IR fossil (4)
-file system, it invokes
-.B /boot/fossil
-to serve it.
-If the
-.B venti 
-environment variable (really,
-.IR plan9.ini (8)
-variable) is set,
-.I boot
-first arranges for fossil to be able to
-contact the named
-.IR venti (8)
-server.
-The variable's value can take the following forms:
-.RS
-.TP
-.B /dev/sdC0/arenas
-the file should be a venti partition with a configuration
-stored on it using
-.I venti/conf 
-(see
-.IR venti-fmt (8)).
-.I Boot
-will start a loopback IP interface on 127.0.0.1
-and start
-.I venti
-announcing on
-.B tcp!127.1!17034
-for venti service
-and 
-.B tcp!127.1!8000
-for web service,
-using the configuration stored in that partition.
-.TP
-.B /dev/sdC0/arenas tcp!*!17034
-same as the last but specify an alternate venti service address.
-In this example, using
-.B *
-will announce on all available IP interfaces (even ones configured later)
-rather than just the loopback device.
-The loopback interface is still configured.
-.TP
-.B /dev/sdC0/arenas tcp!*!17034 tcp!*!80
-same as the last but specify alternate venti service and web addresses.
-The loopback interface is still configured.
-.TP
-.B tcp!135.104.9.2!17034 \fR[ \fIargs\fR ]
-the network address of a venti server running on a separate machine.
-.I Boot
-will configure the IP stack by passing
-.IR args ,
-if any, to
-.IR ipconfig (8).
+The 
+.I device
+is a disk partition file holding a file system.
+.I Bootrc
+inspects the disk partition with
+.IR fstype (1)
+to determine the file system type and starts the
+appropriate server with
+.IR args .
 .RE
-.PP
-If the disk is not a
-.IR fossil (4)
-partition, 
-.I boot
-invokes
-.BR /boot/kfs .
-A variety of programs, like
-.I 9660srv
-and
-.IR dossrv (4)
-masquerade as
-.I kfs
-to allow booting from alternate media formats,
-so as long as the disk is not a
-.I fossil
-disk, no check is made that the disk is in fact
-a
-.I kfs
-disk.
-The args are passed to
-.IR kfs (4).
-.PP
-For the
-.B tcp
-method,
-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.
 .SH EXAMPLES
 On PCs, the default arguments to boot are constructed using
 the 
@@ -348,11 +239,11 @@ variable in
 .IR plan9.ini (8).
 .PP
 Start 
-.IR kfs (4)
-with extra disk buffers:
+.IR cwfs (4)
+in config mode:
 .IP
 .EX
-bootargs=local!#S/sdC0/fs -B 4096
+bootargs=local!/dev/sdC0/fscache -c
 .EE
 .LP
 Use an IP stack on an alternate ethernet interface
@@ -362,7 +253,7 @@ server addresses.
 .EX
 fs=192.168.0.2
 auth=192.168.0.3
-bootargs=tcp -g 192.168.0.1 ether /net/ether1 \e
+bootargs=tcp!-g 192.168.0.1 ether /net/ether1 \e
     192.168.0.50 255.255.255.0
 .EE
 .LP
@@ -373,6 +264,8 @@ line is split only for presentation; it is one line in the file.)
 .B #s/boot
 .br
 .B #//boot/boot
+.br
+.B #//boot/bootfs.paq
 .SH SOURCE
 .B /sys/src/9/boot
 .SH "SEE ALSO"
@@ -383,7 +276,9 @@ line is split only for presentation; it is one line in the file.)
 The use of
 .B bootargs
 in general is odd.
-The configuration specification
-for fossil and venti servers
-is particularly odd, but it does
-cover the common cases well.
+.SH HISTORY
+.I Boot
+first appeared in Plan 9 from Bell Labs. It was rewritten
+in
+.I rc
+for 9front (April, 2011).