--- starting.mm	2002/03/28 05:33:44	4.1
+++ starting.mm	2003/05/18 02:20:20
@@ -1,26 +1,46 @@
 .\" This file is in -*- nroff-fill -*- mode
-.\" STATUS: draft 4th edition
-.\" $Id: starting.mm,v 4.1 2002/03/28 05:33:44 grog Exp $
+.\" STATUS: 4th edition
+.\" $Id: starting.mm,v 4.22 2003/05/18 02:20:20 grog Exp $
 .\"
 .Chapter \*[nchstarting] "Starting and stopping the system"
 Before you can run FreeBSD, you need to start it up.  That's normally pretty
 straightforward: you turn the machine on, a lot of things scroll off the screen,
-and about a minute later you have a \f(CWlogin:\fP prompt on the screen.
-Sometimes, though, the things that scroll off the screen are of interest.  In
-particular, the boot process tells you a lot of information about the system
-hardware configuration.  This can be of use when upgrading the system, or if you
-have problems.
-.P
+and about a minute later you have a \f(CWlogin:\fP prompt or an X login window
+on the screen.  Sometimes, though, the process is of more interest.  You have a
+number of options when booting, and it's also a source of a number of problems,
+so it pays to understand it.  In this chapter we'll look at the following
+topics:
+.Ls B
+.LI
+In the next section, we'll look at the startup process in more detail.
+.LI
+On page
+.Sref \*[before-boot] \&
+we'll look at how to control the boot process.
+.LI
+If something goes wrong, and the system doesn't come up, those messages that
+scrolled off the screen are very important.  We'll look at what they mean on
+page
+.Sref \*[booting] .
+.LI
 It's not so obvious that you need to adhere to a procedure when shutting down
-the system.  We'll look at the hows and whys on page \*[shutdown].
+the system.  We'll look at the hows and whys on page
+.Sref \*[shutdown] .
+.LI
+There are a number of ways of starting the system for particular applications.
+On page
+.Sref "\*[diskless]" \&
+we'll look at how to run FreeBSD without a disk.
+.Le
+.sp -1v
 .H2 "Starting the system"
-.X "starting the system"
 .Pn bootup
 When you power up the system, or when you reboot, a number of actions occur
 before the system is up and running.  Starting the system is usually called
-``bootstrapping'', from the concept of Baron von Munchhausen pulling himself up
+``bootstrapping,'' after the story of Baron von Munchhausen pulling himself up
 by his own bootstraps.  The following sequence describes the sequence on the PC
-architecture.  There are only relatively minor differences on other platforms.
+architecture, but there are only relatively minor differences on other
+platforms.
 .Ls B
 .LI
 .X "Power On Self Test"
@@ -30,119 +50,132 @@
 .X "BIOS"
 .X "Basic Input/Output System"
 .X "SRM"
-More accurately, the system firmware.  The firmware is called \fIBIOS\fP\|
-(\fIBasic Input/Output System\fP\|) on the i386 architecture, or \fISRM\fP\| on
-the Alpha architecture.
+.X "Open Firmware"
+More accurately, the system firmware.  The firmware is called \fIBIOS\fP\/
+(\fIBasic Input/Output System\fP\/) on the i386 architecture, \fISRM\fP\/ on the
+Alpha architecture, and \fIOpen Firmware\fP\/ on a number of other
+architectures.
 .FE
-performs tests which check that the machine is working correctly and determines
-the hardware configuration.  This \fIPower On Self Test\fP\| or \fIPOST\fP\| has
+performs tests that check that the machine is working correctly and determines
+the hardware configuration.  This \fIPower On Self Test\fP\/ or \fIPOST\fP\/ has
 nothing to do with FreeBSD.
 .LI
 .X "starting the system"
 .X "bootstrap"
-Next, the BIOS bootstrap loads the \fIMaster Boot Record\fP\| from the first
+.X "master boot record"
+Next, the BIOS bootstrap loads the \fIMaster Boot Record\fP\/ from the first
 sector of the first disk on the system (\f(CWC:\fP in BIOS parlance) into memory
 and executes it.    This step is the same for all operating systems on PCs.
 .LI
 It's up to this bootstrap to decide which operating system to boot.  The
 bootstrap in the MBR may or may not be part of the FreeBSD system.  FreeBSD can
-install two different MBRs, as we saw on page \*[MBR-choices-page].  The
-standard MBR works without intervention, while the boot manager gives you the
-choice of booting from any partition on the disk.
+install two different MBRs, as we saw on page
+.Sref \*[MBR-choices-page] .
+The standard MBR works without intervention, while the boot manager gives you
+the choice of booting from any partition on the disk.
 .LI
 .X "BTX"
 The FreeBSD bootstrap first loads the second-level bootstrap, \fIBTX\fP, from
 the next 15 sectors on disk and executes it.
 .LI
-.X "/kernel"
 .X "loader, bootstrap"
 The second-level boot locates the third-level bootstrap, called \fIloader\fP,
 and loads it into memory.  \fIloader\fP is an intelligent bootstrap component
-which allows preloading of multiple kernel components.  See the man page
-\fIloader(8)\fP\| for more information.  By default, \fIloader\fP\| locates the
-kernel, the file \fI/kernel\fP\| on the root file system, and loads it into
-memory.  You can interrupt the loader at this point, for example in order to
-load different or additional files.
+that allows preloading of multiple kernel components.  See the man page
+\fIloader(8)\fP\/ for more information.  By default, \fIloader\fP\/ locates the
+kernel, the file
+.File /boot/kernel/kernel
+on the root file system, and loads it into memory.  You can interrupt the loader
+at this point, for example to load different or additional files.
 .LI
 .X "probing"
-Next, on the PC architecture only, the kernel switches the machine into 32-bit
-mode and disables the system BIOS.
-.LI
 The kernel performs its own tests to look for hardware it knows about.  It's
 quite verbose about this, and prints messages about both the hardware it finds
-and the hardware it doesn't find.  This operation is called \fIprobing\fP.  It's
-normal to have more ``didn't find'' messages than ``found'' messages.
+and the hardware it doesn't find.  This operation is called \fIprobing\fP.  Most
+kernels are built to recognize a large selection of hardware, so it's normal to
+have more ``not found'' messages than ``found'' messages.
 .LI
 .X "swapper"
-After the probe, the kernel starts two processes, numbered 0 and 1.  Process 0
-is the \fIswapper\fP\| and is responsible for emergency clearing of memory when
-the standard virtual memory algorithms aren't fast enough.
+After the probe, the kernel starts two processes.  The first, process 0, is the
+.Daemon swapper
+and is responsible for emergency clearing of memory when the standard virtual
+memory algorithms aren't fast enough.
 .LI
 .Pn init
-.X "init"
-.X "/etc/rc"
-Process 1 is called \fIinit\fP.  As the name suggests, it is responsible for
-starting up the system and dmons.  When coming up in the default multi-user
-mode, it spawns a shell to execute the shell script \fI/etc/rc\fP.
-.LI
-.X "/etc/defaults/rc.conf"
-.X "/etc/rc.conf"
-\fI/etc/rc\fP\| first reads in the description files
-\fI/etc/defaults/rc.conf\fP, which contains defaults for a number of
-configuration variables, and \fI/etc/rc.conf\fP, which contains your
-modifications to the defaults.  It then proceeds to perform the steps necessary
-to bring up the system, first starting virtual disk drivers, mounting swap space
-and checking the file system integrity if necessary.
-.LI
-.X "/etc/ttys"
-When \fI/etc/rc\fP\| exits, \fIinit\fP\| reads the file \fI/etc/ttys\fP\| and
+Process 1 is called
+.Daemon init .
+As the name suggests, it is responsible for
+starting up the system and daemons.  When coming up in the default multi-user
+mode, it spawns a shell to execute the shell script
+.Command -n /etc/rc .
+.LI
+.Command -n /etc/rc
+first reads in the description files
+.File /etc/defaults/rc.conf ,
+which contains defaults for a number of configuration variables, and
+.File /etc/rc.conf ,
+which contains your modifications to the defaults.  It then proceeds to perform
+the steps necessary to bring up the system, first starting virtual disk drivers,
+mounting swap space and checking the file system integrity if necessary.
+.LI
+When
+.Command -n /etc/rc
+exits,
+.Daemon init
+reads the file
+.File /etc/ttys
+and
 starts processes as determined there.  It spends the rest of its life looking
 after these processes.
 .Le
-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
-.H3 "Wiring down SCSI devices"
-.X "SCSI, target names"
-.X "target names, SCSI"
-.X "/etc/fstab"
-.X "wiring down SCSI devices"
-.X "SCSI, wiring down devices"
-.X "LUN"
-.Pn wiring
-By default, FreeBSD assigns SCSI unit numbers in the order in which it finds the
-devices on the SCSI bus.  This means that if you remove or add a disk drive, you
-may have to rewrite your \fI/etc/fstab\fP file.  To avoid this problem, you can
-\fIwire down\fP your SCSI devices so that a given bus, target, and unit
-(\fILUN\fP\|) always come on line as the same device unit.
-.P
-The unit assignment begins with the first non-wired down unit for a device type.
-Units that are not specified are treated as if specified as LUN 0.  For example,
-if you wire a disk as \f(CWsd3\fP then the first non-wired disk will be assigned
-\f(CWsd4\fP.
-.P
-The syntax for wiring down devices is:
-.Dx
-controller	scbus0 at ahc0		# Single bus device
-controller	scbus1 at ahc1 bus 0	# Single bus device
-controller	scbus3 at ahc2 bus 0	# Twin bus device
-controller	scbus2 at ahc2 bus 1	# Twin bus device
-disk 		da0 at scbus0 target 0 unit 0
-disk		da1 at scbus3 target 1
-disk		da2 at scbus2 target 3
-tape		sa1 at scbus1 target 6
-device	cd0 at scbus?
-.De
-Units that are not specified are treated as if specified as LUN 0.
-XXXXXXXXXXXXXXXXXXXXX
-.H3 "Boot messages"
+.H2 "Things you can do before booting"
+.Pn before-boot
+You can do a number of things before you boot the system:
+.Ls B
+.LI
+The most obvious thing to do is to decide what you're going to boot.  The boot
+loader gives you the chance to load different operating systems or different
+FreeBSD kernels and modules.  We'll look at that below.
+.LI
+You can also set a number of options for the kernel loader, including
+specification of hardware and software characteristics.  We'll look at that on
+page
+.Sref \*[io-config] .
+.Le
+.H2 "What are you going to boot?"
+.Pn booting
+If you have multiple operating systems on your system, you can use the boot
+manager described on page
+.Sref \*[bootmgr] ,
+to choose which one to boot.  For example, if you have two disks, the first of
+which contains four partitions, the first stage of the boot looks something like
+this:
+.Dx
+F1: FreeBSD
+F2: Windows
+F3: Linux
+F4: FreeBSD
+F5: Drive 1
+
+Default: F1
+.De
+After 10 seconds, the boot manager attempts to load the bootstrap from the
+default partition; you can choose any of the selections by pressing the
+corresponding function key.  If you press \fBF5\fP, you get a menu showing the
+partitions on the second disk, with F5 to return to the first disk.
+.P
 .Pn boot-msg-start
-As the bootstrap loaders load, you will see something like:
+If you choose to boot FreeBSD, the bootstrap loaders load, and you see something
+like:
 .Dx
-/							\fIthis is a ``twirling baton''\fP\|
+/                                               \fIthis is a ``twirling baton''\fP\/
 BTX loader 1.00	 BTX version is 1.01
 BIOS drive A: is disk0
 BIOS drive C: is disk1
+BIOS drive D: is disk1
 BIOS 639kB/130048kB available memory
 .De
+.X "BTX"
 These messages are printed by \fIBTX\fP.  
 .X "baton, twirling"
 .X "twirling baton"
@@ -150,52 +183,105 @@
 line keeps changing through \f(CW-\fP, \f(CW\e\fP, and \f(CW|\fP before going
 back to \f(CW/\fP again, giving the impression that the character is rotating.
 This display, called a \fItwirling baton\fP, is your indication that the system
-hasn't crashed and burned.
+hasn't crashed and burned.  It's normal for it to take a few seconds before the
+baton starts to twirl.
 .P
-Next, \fIloader\fP\| prints its prompt:
+Next,
+.Command loader
+prints its prompt:
 .Dx
-FreeBSD/i386 bootstrap loader, Revision 0.5  640/64512kB
-(jkh@time.cdrom.com, Sun Jul 24 16:25:12 CST 1999)
+FreeBSD/i386 bootstrap loader, Revision 0.8
+(grog@freebie.example.com, Thu Jun 13 13:06:03 CST 2002)
+Loading /boot/defaults/loader.conf
 
 Hit [Enter] to boot immediately, or any other key for command prompt.
-Booting [kernel] in 6 seconds...	\fIthis counts down from 10 seconds\fP\|
+Booting [kernel] in 6 seconds...                \fIthis counts down from 10 seconds\fP\/
+.De
+At this point, you would normally continue with the boot, either by pressing the
+\fBEnter\fP key or just waiting the 10 seconds.  We'll see what happens then on
+page
+.Sref \*[run-kernel] .
+.P
+Sometimes you may want to change software or hardware characteristics.  In this
+case, you press the ``any other key'' (by tradition the space bar) and enter
+commands to the loader.
+.P
+.H3 "Loader commands"
+There are two ways to communicate with the loader:
+.Ls B
+.LI
+A number of files in the directory
+.Directory /boot
+on the root file system tell
+the loader what to do.  Most are not intended to be changed, but you can create
+a file called
+.File /boot/loader.conf ,
+into which you can enter commands to override the commands in
+.File /boot/defaults/loader.conf .
+We'll look at this
+below.
+.LI
+In addition, the file
+.File /boot/device.hints
+takes the place of many configuration file entries and allows you to set
+hardware characteristics such as information about IRQ, DMA, I/O address and
+other settings for the hardware.  You can change these values during booting.
+.P
+The CD-ROM installation installs
+.File /boot/device.hints ,
+but a kernel install does not.  You'll find it in the
+.Directory conf
+directory for your architecture.  For example,
+.Directory /usr/src/sys/i386/conf
+includes the configuration file
+.File GENERIC
+and the corresponding hints file
+.File GENERIC.hints .
+Install it like this:
+.Dx
+# \f(CBcp /usr/src/sys/i386/conf/GENERIC.hints /boot/device.hints\fP
+.De
+The hints file contains entries of the following nature:
+.Dx
+hint.sio.0.at="isa"
+hint.sio.0.port="0x3F8"
+hint.sio.0.flags="0x10"
+hint.sio.0.irq="4"
+hint.sio.1.at="isa"
+hint.sio.1.port="0x2F8"
+hint.sio.1.irq="3"
+hint.sio.2.at="isa"
+hint.sio.2.disabled="1"
+hint.sio.2.port="0x3E8"
+hint.sio.2.irq="5"
+hint.sio.3.at="isa"
+hint.sio.3.disabled="1"
+hint.sio.3.port="0x2E8"
+hint.sio.3.irq="9"
+.De
+These entries describe the serial port configuration.  They replace the older
+method of hard coding the information in the kernel.  For example, the hints
+above contain the configuration information contained in these lines of the
+Release 4 configuration file:
+.Dx
+device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
+device          sio1    at isa? port IO_COM2 irq 3
+device          sio2    at isa? disable port IO_COM3 irq 5
+device          sio3    at isa? disable port IO_COM4 irq 9
 .De
-If you do nothing, or if you press \fBEnter\fP, it will load the kernel.  Once
-the kernel has been loaded, it will take control of the machine.  Messages from
-the kernel are in high-intensity text (brighter than normal).  This is the only
-time you will normally see them, but sometimes you'll see them during normal
-machine operation.  The boot messages look like:
+The corresponding line in the Release 5 configuration file is:
 .Dx
-Copyright (c) 1982, 1986, 1989, 1991, 1993
-	The Regents of the University of California. All rights reserved.
-FreeBSD 4.6-RELEASE #0: Fri May  3 13:06:56 CST 2002
-  jkh@westhill.cdrom.com:/usr/src/sys/compile/GENERIC
+device          sio             # 8250, 16[45]50 based serial ports
 .De
-The first line tells you how large the kernel is.  Unless you run into problems,
-which are unlikely at this point, this information is of little interest.  If
-you \fIdo\fP\| have problems, the most important information is the date of
-compilation and the pathname of the kernel on the last two lines of this
-example.  Please include this information if you report a problem.
-.H3 "Loading klds at boot time"
-By default, \fIloader\fP\| loads only the kernel.  What if you want to load a
-kld as well?  There are two ways to do this.  If you only want to do this once,
-you can interrupt the boot sequence, by pressing the space bar, and tell
-\fIloader\fP\| what to do:
-.X "twirling baton"
-.X "baton, twirling"
+More importantly, though, this means that you don't need to recompile the kernel
+if you change the hardware addresses.
+.LI
+You can enter commands directly to the command prompt.
+.Le
+When you hit the space bar, you get the following prompt:
 .Dx
-BTX loader 1.00  BTX version is 1.00		\fIThe BTX loader\fP\|
-BIOS drive A: is disk0
-BIOS drive C: is disk1
-
-FreeBSD/i386 bootstrap loader, Revision 0.2  640/64512kB
-(grog@bumble.example.org, Sun Jan 31 16:25:12 CST 1999)
-/							\fIthis is a ``twirling baton''\fP\|
-Hit [Enter] to boot immediately, or any other key for command prompt.
-Booting [kernel] in 6 seconds...	\fIthis counts down from 10 seconds\fP\|
-
 Type '?' for a list of commands, 'help' for more detailed help.
-disk1s1a:> \f(CB?\fP
+ok \f(CB?\fP
 Available commands:
   reboot           reboot the system
   heap             show heap usage
@@ -207,6 +293,7 @@
   show             show variable(s)
   set              set a variable
   unset            unset a variable
+  more             show contents of a file
   lsdev            list all devices
   include          read commands from a file
   ls               list files
@@ -214,383 +301,370 @@
   unload           unload all modules
   lsmod            list loaded modules
   pnpscan          scan for PnP devices
-disk1s1a:> \f(CBload kernel\fP			\fIget the kernel into memory\fP\|
-/kernel text=0x14c395 data=0x180d8+0x22ec4 syms=[0x4+0x1e3c0+0x4+0x210f8]
-disk1s1a:> \f(CBload vinum\fP			\fIand the kld \f(BIvinum\f(CW
-/modules/vinum.ko text=0x1854d data=0x35c+0x9ada8 syms=[0x4+0x13b0+0x4+0xca7]
-disk1s1a:> \f(CBboot -c -s\fP			\fIthen start the kernel\fP\|
-Copyright (c) 1992-1999 FreeBSD Inc.
-Copyright (c) 1982, 1986, 1989, 1991, 1993
+.De
+The most important of these commands are \f(CWset\fP, \f(CWshow\fP,
+\f(CWload\fP, \f(CWunload\fP and \f(CWboot\fP.  We'll see some examples of their
+use in the following sections.  Note, however, that if you have accidentally hit
+the ``any'' key during boot and just want to continue with the boot, you just
+have to enter \f(CBboot\fP.
+.H3 "loader.conf"
+.Pn io-config
+Much of the behaviour of the loader is controlled by entries in
+.File /boot/defaults/loader.conf .
+You shouldn't change this file, though: put changes in a file
+.File /boot/loader.conf ,
+which may not exist.  There are a large number of possible entries; in
+.File /boot/defaults/loader.conf
+you'll
+see the default values, frequently commented out because the loader already
+knows the defaults.  Here are some of the more interesting ones:
+.Dx
+kernel="kernel"
+
+verbose_loading="NO"            # Set to YES for verbose loader output
+
+#autoboot_delay="10"            # Delay in seconds before autobooting
+#console="vidconsole"           # Set the current console
+#currdev="disk1s1a"             # Set the current device
+module_path="/boot/kernel;/boot/modules;/modules"       # Set the module search path
+#prompt="\\${interpret}"        # Set the command prompt
+#root_disk_unit="0"             # Force the root disk unit number
+#rootdev="disk1s1a"             # Set the root filesystem
+.De
+.Ls B
+.LI
+The \f(CWkernel\fP entry gives the name of the kernel, relative to the kernel
+directory
+.Directory /boot/kernel .
+Sometimes it might be of interest to change this value, for example when
+testing.
+.LI
+\f(CWconsole=vidconsole\fP tells the loader where to output its messages.
+\f(CWvidconsole\fP is short for \fIvideo console\fP\/; you can also select
+\f(CWcomconsole\fP if you have a serial terminal connected to a specified serial
+port.
+.LI
+\f(CWcurrdev\fP specifies where to look for the root file system.  If you have
+multiple BIOS partitions on a disk, you can select the correct one with this value.
+.Le
+There are many more options to the loader; read the man page for more details.
+.H3 "Loading other modules at boot time"
+By default,
+.Command loader
+loads only the kernel.  That may not be what you want.  You might want to load a
+different kernel, or you may want to load a kld as well.
+.P
+There are two ways to do this.  If you only want to do this once, you can
+interrupt the boot sequence by pressing the space bar, and tell
+.Command loader
+what to do:
+.X "twirling baton"
+.X "baton, twirling"
+.Dx
+Booting [kernel] in 6 seconds...                \fIthis counts down from 10 seconds\fP\/
+\fI(space bar hit)\fP\/
+Type '?' for a list of commands, 'help' for more detailed help.
+ok \f(CBunload\fP                                       \fInot the kernel we wanted\fP\/
+OK \f(CBload /boot/kernel.old/kernel\fP                 \fIload the old kernel\fP\/
+/boot/kernel.old/kernel text=0x3e474c data=0x52f00+0x81904 syms=[0x4+0x4cab0+0x4+0x5
+b458]
+OK \f(CBload /boot/kernel.old/vinum.ko\fP               \fIand the old vinum module\fP\/
+/boot/kernel.old/vinum.ko text=0x149a4 data=0xaf75c+0x164 syms=[0x4+0x11e0+0x4+0xcac]
+ok \f(CBboot\fP                                         \fIthen start the kernel\fP\/
+Copyright (c) 1992-2002 The FreeBSD Project.
+Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
-FreeBSD 4.6-RELEASE #0: Fri May  3 13:06:56 CST 2002
-\fI(etc)\fP\|
+FreeBSD 5.0-RELEASE #0: Sat 15 Feb 16:30:26 CST 2003
+    grog@monorchid.example.org:/usr/src/sys/i386/compile/BUMBLE
+Preloaded elf kernel "/boot/kernel.old/kernel" at 0xc072a000.
+Preloaded elf module "/boot/kernel.old/vinum.ko" at 0xc072a0bc.
+Timecounter "i8254"  frequency 1193182 Hz
+\fI(etc)\fP\/
 .De
+This example shows two separate activities: one is changing the kernel from
+.File /boot/kernel/kernel
+to
+.File /boot/kernel.old/kernel ,
+and the other is loading the \fIvinum\fP\/ kld.  You don't need to reload the
+kernel to load the \fIvinum\fP\/ module.
 .H3 "Automatic kld load"
 The method described above is cumbersome if you want to load the kld every time
-you boot.  In this case, it's easier to modify the loader's configuration files.
-In \fI/boot/defaults/loader.conf\fP\| you will find the lines:
+you boot.  In this case, it's easier to add the following line to
+.File /boot/loader.conf \/:
+.Dx
+vinum_load="YES"
+.De
+To see what commands you can use, look in
+.File /boot/defaults/loader.conf ,
+where you would find all normal configuration entries commented out.
 .Dx
+\fI\&...\fP\/
 ccd_load="NO"                   # Concatenated disk driver
 vinum_load="NO"                 # Concatenated/mirror/raid driver
-vn_load="NO"                    # Vnode driver
+md_load="NO"                    # Memory disk driver (vnode/swap/malloc)
+\fI\&...\fP\/
 .De
 Don't change this file; it's designed to be replaced on upgrade, and any changes
-would get lost when you upgrade.  Instead, change the contents of
-\fI/boot/loader.conf\fP.  This file contains only changes from the defaults, so
-it's possible that it won't exist.  In that case, just create it.  Either way,
-ensure that it contains the line
-.Dx
-\f(CBvinum_load="YES"                 # Concatenated/mirror/raid driver\fP
-.De
-This will tell the loader to load vinum in addition to the kernel.
-.H3 "UserConfig: Modifying the boot configuration"
-.Pn modify-boot-config
-.X "UserConfig"
-.Pn "UserConfig"
-The installation media include \fIUserConfig\fP, which gives you a chance to
-modify the kernel's idea of the hardware configuration of the machine.  You can
-also tell the loader to enter UserConfig when booting from hard disk, though
-this is seldom necessary.
-.P
-\fIUserConfig\fP\| is becoming less important as ISA hardware goes away.  If you
-want, skip this section and continue with the description of probing on page
-.Sref \*[device-probe] .
-.P
-From the install media, you enter \fIUserConfig\fP\| like this:
+would get lost when you upgrade.
+.H2 "Running the kernel"
+.Pn run-kernel
+The next step in the boot process is to run the kernel.  This is what happens by
+default if you do nothing at the \f(CWBooting [kernel]\fP prompt, or if you
+press \fBEnter\fP.  If you have interrupted the boot process, you continue with
+the command:
 .Dx
-\f(CB                         Kernel Configuration Menu
-
-
-           Skip kernel configuration and continue with installation \fP
-           Start kernel configuration in full-screen visual mode    
-           Start kernel configuration in CLI mode                   
-
-
-  Here you have the chance to go into kernel configuration mode, making
-  any changes which may be necessary to properly adjust the kernel to
-  match your hardware configuration.
-
-  If you are installing FreeBSD for the first time, select Visual Mode
-  (press Down-Arrow then ENTER).
-
-  If you need to do more specialized kernel configuration and are an
-  experienced FreeBSD user, select CLI mode.
-
-  If you are \f(CBcertain\fP that you do not need to configure your kernel
-  then simply press ENTER or Q now.
-.De
-If your hardware configuration matches what the generic kernel expects (see page
-\*[supported-hardware]), just press \fBENTER\fP.  The kernel will continue with
-the \fIdevice probes\fP, which we discuss on page \*[device-probe].
-.P
-.Pn UserConfig-details
-If you do need to change the configuration, press the \fBdown arrow\fP key to
-choose the kernel configuration in full-screen mode, then press \fBENTER\fP.
-This starts \fIUserConfig\fP, a part of the kernel which can be activated at
-boot time to change the system's idea of device configuration.  It presents you
-with a full-screen menu:
-.Dx
----Active Drivers----------------------------\f(CB25 Conflicts\fP------Dev---IRQ--Port--
- \f(CBStorage : (Collapsed)\fP
- Network : (Collapsed)
- Communications : (Collapsed)
- Input : (Collapsed)
- Multimedia :
- Miscellaneous :
-
- 
----Inactive Drivers--------------------------------------------Dev--------------
- Storage : (Collapsed)
- Network : (Collapsed)
- Communications : (Collapsed)
- Input : (Collapsed)
- Multimedia :
- Miscellaneous :
-.De
-Note the word \f(CWConflicts\fP at the top of the screen.  This is a warning,
-not an error.  We'll see on page \*[device-probe] that the drivers look for
-hardware in a number of configurations.  Not all of these configurations can
-coexist, but there will not be a problem unless you install hardware that can't
-coexist.
-.P
-The word \f(CW(Collapsed)\fP doesn't mean that your hardware has given up the
-ghost\(emit means that the information about the corresponding hardware, which
-is usually a large number of devices, has been omitted.  You can expand it by
-placing the cursor on the appropriate line and pressing \fBEnter\fP.  A bar
-cursor stretches across the line \f(CWStorage (Collapsed)\fP.  You can move it
-up and down with the arrow keys.  In our example, we have a NE2000 compatible
-Ethernet board, but its I/O registers start at address \f(CW0x320\fP, it is set
-up for IRQ 9, and we want to change the kernel configuration to recognize it.
-We move the bar down to the line \f(CWNetwork\fP and press \fBEnter\fR.  The
-display changes to:
-.Dx
----Active Drivers----------------------------\f(CB25 Conflicts\fP------Dev---IRQ--Port--
- Storage : (Collapsed)
- Network :
-\f(CBNE1000,NE2000,3C503,WD/SMC80xx Ethernet adapters        conf   ed0   5    0x280\fP
-NE1000,NE2000,3C503,WD/SMC80xx Ethernet adapters        \f(CBconf\fP   ed1   5    0x300
-3C509 Ethernet adapter                                  \f(CBconf\fP   ep0   10   0x300
-Fujitsu MD86960A/MB869685A Ethernet adapters            \f(CBconf\fP   fe0   5    0x240
-Intel EtherExpress Ethernet adapter                     \f(CBconf\fP   ix0   10   0x300
-DEC Etherworks 2 and 3 Ethernet adapters                \f(CBconf\fP   le0   5    0x300
----Inactive Drivers--------------------------------------------Dev--------------
- Storage : (Collapsed)
- Network : (Collapsed)
- Communications : (Collapsed)
- Input : (Collapsed)
- Multimedia :
- Miscellaneous :
-.De
-The highlighted \f(CWconf\fP means that the current configuration could conflict
-with another device: the I/O address, IRQ or memory address will also be probed
-by another driver.  This is only a problem if you really have two boards with
-the same configuration; otherwise you can ignore this warning.  In this case, by
-chance our Novell NE2000 board is already highlighted, so all we need to do is
-to press \fBEnter\fP again to edit the configuration.  The configuration is
-copied to individual fields at the bottom of the screen, so we now see:
-.Dx
----Active Drivers----------------------------\f(CB25 Conflicts\fP------Dev---IRQ--Port--
- Storage : (Collapsed)
- Network :
-\f(CBNE1000,NE2000,3C503,WD/SMC80xx Ethernet adapters        conf   ed0   5    0x280\fP
-NE1000,NE2000,3C503,WD/SMC80xx Ethernet adapters        \f(CBconf\fP   ed1   5    0x300
-3C509 Ethernet adapter                                  \f(CBconf\fP   ep0   10   0x300
-Fujitsu MD86960A/MB869685A Ethernet adapters            \f(CBconf\fP   fe0   5    0x240
-Intel EtherExpress Ethernet adapter                     \f(CBconf\fP   ix0   10   0x300
-DEC Etherworks 2 and 3 Ethernet adapters                \f(CBconf\fP   le0   5    0x300
----Inactive Drivers--------------------------------------------Dev--------------
- Storage : (Collapsed)
- Network : (Collapsed)
- Communications : (Collapsed)
- Input : (Collapsed)
- Multimedia :
- Miscellaneous :
---------------------------------------------------------------------------------
- Port address : \f(CB0x280\fP     Memory address : 0xd8000   Conflict allowed
- IRQ number   : 5
- Flags        : 0
---------------------------------------------------------------------------------
-.De
-The port address is in reverse video, which means that we can edit it.  We type
-in \f(CW0x320\fP and press \fBTab\fP to get to the \f(CWIRQ field\fP, where we
-enter \f(CW9\fP.  Then we press \fBEnter\fP to leave the edit mode, and
-\f(CWq\fP to leave the configuration editor.  Booting continues as normal, but
-this time the system finds our Ethernet board.
-.P
-This is only an example, of course.  It's easier to play around with the editor
-than to describe it.  Don't worry about damaging anything on disk, since at this
-point it's just you and the computer, and the computer doesn't yet know about
-any peripherals.
-.Highlight
-Due to the nature of PC hardware, IRQ 2 and IRQ 9 are the same thing.  Never
-specify IRQ 2 to UserConfig: use IRQ 9 instead.  If you use IRQ 2, the driver
-will not work correctly.
-.End-highlight
-.H3 "Starting UserConfig from hard disk"
-When you boot from hard disk, the selection menu does not appear, since this
-would be a nuisance: normally you will not want to change your configuration
-once it is installed.  If you need to do so, however, make sure that UserConfig
-is included in your loader configuration file \fI/boot/loader.conf\fP.  This
-file contains only changes from the defaults, so it's possible that it won't
-exist.  In that case, just create it.  Either way, ensure that it contains the
-line
-.Dx
-userconfig_script_load="YES"
-.De
-To activate UserConfig on boot, wait until you see:
-.Dx
-BTX loader 1.00	 BTX version is 1.01
-BIOS drive A: is disk0
-BIOS drive C: is disk1
-BIOS 639kB/130048kB available memory
-
-FreeBSD/i386 bootstrap loader, Revision 0.0
-(grog@presto.lemis.com, Mon Aug 21 11:02:35 CST 2000)
-Loading /boot/defaults/loader.conf
-/							\fIthis is a ``twirling baton''\fP\|
-Hit [Enter] to boot immediately, or any other key for command prompt.
-Booting [kernel] in 6 seconds...	\fIthis counts down from 10 seconds\fP\|
-.De
-Normally, you just wait until the countdown reaches 0, or press \fBEnter\fP, and
-the bootstrap will continue and load the kernel.  You have a number of options,
-however\(emsee the man page \fIboot(8)\fP\| for a complete discussion.  To
-interrupt the boot process, press the space bar (most keys will do, but the
-space bar is easiest to remember).  You will get:
-.Dx
-Type '?' for a list of commands, 'help' for more detailed help.
-disk1s1a:>
+ok \f(CBboot\fP
 .De
-To start UserConfig, enter:
-.Dx
-disk1s1a:> \f(BIboot -c\fP\|
-Copyright (c) 1992-2000 The FreeBSD Project.
-Copyright (c) 1982, 1986, 1989, 1991, 1993
-	The Regents of the University of California. All rights reserved.
-FreeBSD 4.1-RELEASE #1: Tue Aug 22 10:38:19 CST 2000
-    grog@daemon.lemis.com:/src/FreeBSD/4-STABLE/src/sys/compile/DAEMON
-Timecounter "i8254"  frequency 1193182 Hz
-CPU: Pentium II/Pentium II Xeon/Celeron (467.74-MHz 686-class CPU)
-  Origin = "GenuineIntel"  Id = 0x665  Stepping = 5
-  Features=0x183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
-real memory  = 134217728 (131072K bytes)
-sio0: gdb debugging port
-avail memory = 126803968 (123832K bytes)
-FreeBSD Kernel Configuration Utility - Version 1.2
- Type "help" for help or "visual" to go to the visual
- configuration interface (requires MGA/VGA display or
- serial terminal capable of displaying ANSI graphics).
-config> \fBv\fP					\fIgo into visual mode\fP\|
-.De
-You can type \f(CWhelp\fP for help, as the prompt suggests, but just about the
-only thing you need is the visual configuration interface.
-.H3 "Probing the hardware"
+The following example shows the output of booting an Abit BP6 dual processor
+motherboard.  This board also has four IDE controllers on board, and the system
+had two SCSI host adapters connected to it.
+.P
+The loader transfers control to the kernel it has preloaded.  Messages from the
+kernel are in high-intensity text (brighter than normal).  This is the most
+common time to see them, though they sometimes appear during normal machine
+operation.
+These messages also get copied to the kernel message buffer, and you can
+retrieve the most recent messages with the
+.Command dmesg
+program.  In the course of time, other messages may fill the buffer, and you
+will no longer be able to find the boot messages with
+.Command dmesg ,
+so one of the final steps in the startup saves the content of the boot messages
+in the file
+.File /var/run/dmesg.boot ,
+which should always contain the complete startup messages.  In the case of
+laptops, the message buffer normally does not get cleared on shutdown, not even
+if the power goes down, so you may find logs for multiple boots.
+.P
 .X "probing"
 .Pn device-probe
-Next, an incredible amount of information will scroll off the screen.  Once the
-boot is complete, you can go back and examine text that has scrolled off the top
-of the screen: press \fBScrollLock\fR.  The cursor will disappear, and you can
-use the \fBPageUp\fP and \fBPageDown\fP keys to scroll up to 3 previous
-screenfuls.  To exit this mode, press \fBScrollLock\fP again.  We'll go through
-this output in some detail over the next few pages.
-.P
-Once it has finished loading, the kernel calls all configured drivers to examine
-the hardware configuration of the machine on which it is running.  This is
-called \fIprobing\fP\| for the devices.  If you have time to follow it, it's a
-good idea to confirm that it's correct.  It's not that important unless
-something goes wrong, and then it \fIwon't\fP\| scroll off the screen.  We see
-something like:
+Once it has finished loading, the kernel prints some summary information and
+then calls all configured drivers to examine the hardware configuration of the
+machine on which it is running.  This is called \fIprobing\fP\/ for the devices.
+If you have time, it's a good idea to confirm that it's correct.  Much of it
+appears so quickly that you can't read it, but once the boot is complete, you
+can examine it with the
+.Command dmesg
+command.  If something goes wrong, it \fIwon't\fP\/ scroll off the screen.  The
+place where it stops is then of interest.
+.P
+Under normal circumstances, we see something like:
 .Dx
-Copyright (c) 1992-2000 The FreeBSD Project.
-Copyright (c) 1982, 1986, 1989, 1991, 1993
+Copyright (c) 1992-2002 The FreeBSD Project.
+Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
 	The Regents of the University of California. All rights reserved.
-FreeBSD 4.1-RELEASE #1: Tue Aug 22 10:38:19 CST 2000
-    grog@daemon.lemis.com:/src/FreeBSD/4-STABLE/src/sys/compile/DAEMON
+FreeBSD 5.0-RELEASE #0: Sat 15 Feb 16:30:26 CST 2003
+    grog@monorchid.example.org:/usr/src/sys/i386/compile/BUMBLE
+Preloaded elf kernel "/boot/kernel/kernel" at 0xc0663000.
+.De
+Here the kernel identifies itself with information about the release number,
+when and where it was built, and where it was loaded from.
+.Dx
 Timecounter "i8254"  frequency 1193182 Hz
-CPU: Pentium II/Pentium II Xeon/Celeron (467.74-MHz 686-class CPU)
+CPU: Pentium II/Pentium II Xeon/Celeron (467.73-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0x665  Stepping = 5
-  Features=0x183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
-real memory  = 134217728 (131072K bytes)
-sio0: gdb debugging port
-avail memory = 126803968 (123832K bytes)
-.De
-The lines above identify the CPU: it's a Pentium II, Pentium II Xeon, or
-Celeron, and it runs at 466 MHz.
-.Dx
-real memory  = 134217728 (131072K bytes)
-avail memory = 126803968 (123832K bytes)
-.De
-The real memory is the size of RAM.  Some systems reserve 1 kB of RAM in real
-mode, but this should not have any effect on the value of real memory.
-Available memory is the memory available to users after the kernel has been
-loaded and initialized.
-.P
-Sometimes the kernel will report only 16 MB even on larger systems.  This is due
-to BIOS incompatibilities, and occurs surprisingly often on big-name machines.
-To fix it, build a custom kernel which specifies the memory size
-explicitly\(emsee the description of the \f(CWMAXMEM\fP parameter on page
-\*[config-MAXMEM].
+  Features=0x183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,P
+AT,PSE36,MMX,FXSR>
+real memory  = 134217728 (128 MB)
+avail memory = 123465728 (117 MB)
+.De
+The lines above identify the basic hardware.  There is one time counter (some
+motherboards have two), the CPU is a Celeron, Pentium II or Xeon, and it runs at
+466 MHz.  This information is relatively reliable.  The real memory value is the
+size of RAM.  Some older systems reserve 1 kB of RAM in real mode, but this
+should not have any effect on the value of real memory.  Available memory is the
+memory available to users after the kernel has been loaded and initialized.
+.P
+On some older machines, the kernel reports only 16 MB although the system has
+more memory.  This is due to BIOS incompatibilities, and occurs surprisingly
+often on big-name machines.  To fix it, build a custom kernel that specifies
+the memory size explicitly\(emsee the description of the \f(CWMAXMEM\fP
+parameter, which is described in the verbose configuration file
+.File /usr/src/sys/i386/conf/NOTES .
 .P
-Next, with multiprocessor kernels, you get:
+This machine is in fact a multiprocessor with two CPUs, so we see:
 .Dx
 Programming 24 pins in IOAPIC #0
 IOAPIC #0 intpin 2 -> irq 0
+IOAPIC #0 intpin 16 -> irq 10
+IOAPIC #0 intpin 17 -> irq 9
 IOAPIC #0 intpin 18 -> irq 11
-IOAPIC #0 intpin 19 -> irq 3
-FreeBSD/SMP: Multiprocessor motherboard
+FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
  cpu0 (BSP): apic id:  0, version: 0x00040011, at 0xfee00000
  cpu1 (AP):  apic id:  1, version: 0x00040011, at 0xfee00000
  io0 (APIC): apic id:  2, version: 0x00170011, at 0xfec00000
-Preloaded elf kernel "kernel" at 0xc035c000.
-Pentium Pro MTRR support enabled
 .De
-The IOAPIC is the \fII/O Advanced Programmable Interrupt Controller\fP\| used by
+.ne 3v
+.X "IOAPIC"
+The IOAPIC is the \fII/O Advanced Programmable Interrupt Controller\fP\/ used by
 SMP machines only.  It reassigns some interrupt requests.  This information is
-provided in case you need to debug the kernel.  Since these processors are P6
-class processors, they have \fIMemory Type Range Registers\fP\| or
-\fIMTRR\fP\|s, which are used to optimize memory usage.
+provided in case you need to debug the kernel.  None of this appears for a
+normal machine.
 .Dx
-npx0: <math processor> on motherboard
+Initializing GEOMetry subsystem
+Pentium Pro MTRR support enabled
+npx0: <math processor> on motherboard                    \fInumeric coprocessor, on chip\fP\/
 npx0: INT 16 interface
-pcib0: <Intel 82443BX (440 BX) host to PCI bridge> on motherboard
+.De
+.X "GEOM"
+.X "MTRR"
+The \fIGEOM\fP\/etry subsystem is a disk I/O system that was introduced in
+FreeBSD Release 5.  This processor is a P6 class processor, so it has \fIMemory
+Type Range Registers\fP\/ or \fIMTRR\fP\/s, which are used to optimize memory
+usage.
+.P
+Next we look at the other chips on the motherboard, starting with the so-called
+``chipset,'' the processor support chips.
+.Dx
+pcib0: <Intel 82443BX (440 BX) host to PCI bridge> at pcibus 0 on motherboard
 pci0: <PCI bus> on pcib0
-pcib1: <Intel 82443BX (440 BX) PCI-PCI (AGP) bridge> at device 1.0 on pci0
+agp0: <Intel 82443BX (440 BX) host to PCI bridge> mem 0xe0000000-0xe3ffffff at devic
+e 0.0 on pci0
+pcib1: <PCIBIOS PCI-PCI bridge> at device 1.0 on pci0
 pci1: <PCI bus> on pcib1
+.De
+This motherboard has an Intel 82443 BX chipset with two PCI buses.  Next we see
+some of the devices on the motherboard:
+.Dx
 pci1: <Matrox MGA G200 AGP graphics accelerator> at 0.0
 isab0: <Intel 82371AB PCI to ISA bridge> at device 7.0 on pci0
-isa0: <ISA bus> on isab0
+isa0: <ISA bus> on isab0                                 \fIISA bus\fP\/
 atapci0: <Intel PIIX4 ATA33 controller> port 0xf000-0xf00f at device 7.1 on pci0
-ata0: at 0x1f0 irq 14 on atapci0
-ata1: at 0x170 irq 15 on atapci0
-uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xd000-0xd01f at device 7.2 on pci0
-uhci0: Invalid irq 255
-uhci0: Please switch on USB support and switch PNP-OS to 'No' in BIOS
-device_probe_and_attach: uhci0 attach returned 6
+ata0: at 0x1f0 irq 14 on atapci0                         \fIprimary IDE controller\fP\/
+ata1: at 0x170 irq 15 on atapci0                         \fIsecondary IDE controller\fP\/
+uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xc000-0xc01f irq 10 at device
+ 7.2 on pci0                                             \fIUSB controller\fP\/
+usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0 \fIUSB bus\fP\/
+usb0: USB revision 1.0
+uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
+uhub0: 2 ports with 2 removable, self powered
 Timecounter "PIIX"  frequency 3579545 Hz
-chip1: <Intel 82371AB Power management controller> port 0x5000-0x500f at device 7.3 on pci0
-pci0: <unknown card> (vendor=0x10d9, dev=0x0531) at 9.0 irq 3
-atapci1: <HighPoint HPT366 ATA66 controller> port 0xe000-0xe0ff,0xdc00-0xdc03,0xd800-0xd807 irq 11 at device 19.0 on pci0
-ata2: at 0xd800 on atapci1
-atapci2: <HighPoint HPT366 ATA66 controller> port 0xec00-0xecff,0xe800-0xe803,0xe400-0xe407 irq 11 at device 19.1 on pci0
-fdc0: direction bit not set
+pci0: <bridge, PCI-unknown> at device 7.3 (no driver attached)
+.De
+The system doesn't know which devices are implemented internally in the chipset,
+which are separate chips on the mother board, and which are on plug-in boards.
+So far it has found the IDE controllers, but not the disks; it'll look for them
+later.
+.P
+Next we find two Symbios SCSI host adapters:
+.Dx
+sym0: <875> port 0xc400-0xc4ff mem 0xec002000-0xec002fff,0xec003000-0xec0030ff irq 1
+0 at device 9.0 on pci0
+sym0: Symbios NVRAM, ID 7, Fast-20, SE, NO parity
+sym0: open drain IRQ line driver, using on-chip SRAM
+sym0: using LOAD/STORE-based firmware.
+sym0: SCAN FOR LUNS disabled for targets 0.
+sym1: <875> port 0xc800-0xc8ff mem 0xec001000-0xec001fff,0xec000000-0xec0000ff irq 9
+ at device 13.0 on pci0
+sym1: No NVRAM, ID 7, Fast-20, SE, parity checking
+.De
+.ne 3v
+The first Symbios adapter is on IRQ 10.  It is on ID 7, like most SCSI host
+adapters, and it doesn't support parity.  The second board is on IRQ 9 and does
+support parity, but it doesn't have a BIOS.  This is not a problem for FreeBSD,
+which doesn't use the BIOS, but if it were in the system by itself, the POST
+would not find it.  In this case, the BIOS on the other Symbios board does in
+fact find the second host adapter.
+.Dx
+dc0: <Macronix 98715AEC-C 10/100BaseTX> port 0xe000-0xe0ff mem
+0xe7800000-0xe78000ff irq 11 at device 11.0 on pci0
+dc0: Ethernet address: 00:80:c6:f9:a6:c8
+miibus0: <MII bus> on dc0
+dcphy0: <Intel 21143 NWAY media interface> on miibus0
+dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
+.De
+This is a Macronix Ethernet card with associated PHY interface at IRQ 11.
+.P
+After that, we return to on-board peripherals, in this case two additional IDE
+controllers and legacy ISA peripherals:
+.Dx
+atapci1: <HighPoint HPT366 ATA66 controller> port 0xd800-0xd8ff,0xd400-0xd403,0xd000
+-0xd007 irq 11 at device 19.0 on pci0
+ata2: at 0xd000 on atapci1                               \fIThird IDE controller\fP\/
+atapci2: <HighPoint HPT366 ATA66 controller> port 0xe400-0xe4ff,0xe000-0xe003,0xdc00
+-0xdc07 irq 11 at device 19.1 on pci0                    \fIFourth IDE controller\fP\/
+ata3: at 0xdc00 on atapci2
+orm0: <Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc87ff on isa0
+fdc0: ready for input in output                          \fIFloppy controller\fP\/
 fdc0: cmd 3 failed at out byte 1 of 3
+.De
+The floppy driver command failure here is caused by the lack of any floppy drive
+on this machine.
+.Dx
 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
-atkbd0: <AT Keyboard> irq 1 on atkbdc0
+atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0         \fIkeyboard\fP\/
+kbd0 at atkbd0
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
-sc0: <System console> on isa0
-sc0: VGA <16 virtual consoles, flags=0x0>
-sio0 at port 0x3f8-0x3ff irq 4 flags 0x90 on isa0
-sio0: type 16550A, console
-sio1: configured irq 3 not in bitmap of probed irqs 0
-ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
+sc0: <System console> at flags 0x100 on isa0             \fIsystem console\fP\/
+sc0: VGA <16 virtual consoles, flags=0x300>
+sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0        \fIfirst serial port\fP\/
+sio0: type 16550A                                        \fIit's a buffered UART\fP\/
+sio1 at port 0x2f8-0x2ff irq 3 on isa0                   \fIsecond serial port\fP\/
+sio1: type 16550A
+sio2 not found at 0x3e8                                  \fIno more serial I/O ports\fP\/
+sio3 not found at 0x2e8
+.De
+.X "COM1:"
+UNIX starts counting device numbers from 0, whereas Microsoft starts counting
+from 1.  Devices
+.Device sio0
+through
+.Device -n sio3
+are known as \fICOM1:\fP\/ through \fICOM4:\fP\/ in the Microsoft world.
+.Dx
+ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0  \fIparallel port controller\fP\/
 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
-ppi0: <Parallel I/O> on ppbus0
-lpt0: <Printer> on ppbus0
-lpt0: Interrupt-driven port
 plip0: <PLIP network interface> on ppbus0
+lpt0: <Printer> on ppbus0                                \fIline printer on parallel port\fP\/
+lpt0: Interrupt-driven port
+ppi0: <Parallel I/O> on ppbus0                           \fIalternate I/O on the same port\fP\/
+.De
+.ne 3v
+Next, on this multiprocessor board, we get some SMP-specific messages.  The
+system tests the IO-APIC, which can sometimes cause problems, and then starts
+the second processor:
+.Dx
 APIC_IO: Testing 8254 interrupt delivery
 APIC_IO: routing 8254 via IOAPIC #0 intpin 2
 SMP: AP CPU #1 Launched!
-ata2-slave: identify retries exceeded
-ad0: 19574MB <WDC WD205BA> [39770/16/63] at ata0-master using UDMA33
-ad4: 13042MB <WDC WD136BA> [26500/16/63] at ata2-master using UDMA33
-acd0: CDROM <CD-ROM 40X/AKU> at ata1-master using PIO4
+.De
+.ne 5v
+Finally, the system detects the disks connected to this machine:
+.Dx
+ad0: 19574MB <WDC WD205BA> [39770/16/63] at ata0-master UDMA33
+ad4: 19574MB <WDC WD205BA> [39770/16/63] at ata0-master UDMA66
+Waiting 15 seconds for SCSI devices to settle
+(noperiph:sym0:0:-1:-1): SCSI BUS reset delivered.
+da0 at sym1 bus 0 target 3 lun 0
+da0: <SEAGATE ST15230W SUN4.2G 0738> Fixed Direct Access SCSI-2 device
+da0: 20.000MB/s transfers (10.000MHz, offset 15, 16bit), Tagged Queueing Enabled
+da0: 4095MB (8386733 512 byte sectors: 255H 63S/T 522C)
+da1 at sym1 bus 0 target 0 lun 0
+da1: <SEAGATE ST15230W SUN4.2G 0738> Fixed Direct Access SCSI-2 device
+da1: 20.000MB/s transfers (10.000MHz, offset 15, 16bit), Tagged Queueing Enabled
+da1: 4095MB (8386733 512 byte sectors: 255H 63S/T 522C)
+.De
+Here, we have four disks, one each on the first and third IDE controllers, both
+as master, and two on the second SCSI host adapter.  There is nothing on the
+first host adapter.
+.P
+.ne 2v
+Finally, the system starts Vinum and mounts the root file system and the swap
+partition:
+.Dx
 Mounting root from ufs:/dev/ad0s1a
 vinum: loaded
 vinum: reading configuration from /dev/ad0s1h
-vinum_scandisk: /dev/ad0s1h is down
-vinum: Can't read device /dev/ad0s1h, error 5
 vinum: updating configuration from /dev/ad4s2h
-vinum_scandisk: /dev/ad4s2h is down
-vinum: Can't read device /dev/ad4s2h, error 5
-vinum: couldn't read configuration** : Input/output error
 swapon: adding /dev/ad0s1b as swap device
 swapon: /dev/vinum/swap: No such file or directory
 Automatic reboot in progress...
-/dev/ad0s1a: FILESYSTEM CLEAN; SKIPPING CHECKS
-/dev/ad0s1a: clean, 69628 free (548 frags, 8635 blocks, 0.6% fragmentation)
-/dev/ad0s1e: FILESYSTEM CLEAN; SKIPPING CHECKS
-/dev/ad0s1e: clean, 616633 free (3681 frags, 76619 blocks, 0.3% fragmentation)
-Doing initial network setup: hostname.
-ifconfig: interface ed0 does not exist
-uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xd000-0xd01f at device 7.2 on pci0
-uhci0: Invalid irq 255
-uhci0: Please switch on USB support and switch PNP-OS to 'No' in BIOS
-device_probe_and_attach: uhci0 attach returned 6
-dc0: <Macronix 98715/98715A 10/100BaseTX> port 0xd400-0xd4ff mem 0xeb000000-0xeb0000ff irq 3 at device 9.0 on pci0
-dc0: Ethernet address: 00:80:c6:f9:d3:fa
-miibus0: <MII bus> on dc0
-dcphy0: <Intel 21143 NWAY media interface> on miibus0
-dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
-ifconfig: interface ed0 does not exist
-dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
-	inet 192.109.197.76 netmask 0xffffff80 broadcast 192.109.197.127
-	ether 00:80:c6:f9:d3:fa 
-	media: autoselect (none) status: active
-	supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback> none
-lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
-	inet 127.0.0.1 netmask 0xff000000 
-
-add net default: gateway 192.109.197.82
+.De
+At this point, the system is up and running, but it still needs to start some
+services.  The remaining messages come from processes, not from the kernel, so
+they are in normal intensity.
+.Dx
+add net default: gateway 223.147.37.5
 Additional routing options: tcp extensions=NO TCP keepalive=YES.
 routing daemons:.
 Mounting NFS file systems.
@@ -599,253 +673,27 @@
 Starting final network daemons: rwhod.
 setting ELF ldconfig path: /usr/lib /usr/lib/compat /usr/X11R6/lib /usr/local/lib
 setting a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout
-starting standard daemons: inetd cronAug 22 13:59:04 daemon inetd[110]: comsat/udp: no such user 'tty', service ignored
-Aug 22 13:59:04 daemon inetd[110]: ntalk/udp: no such user 'tty', service ignored
- sendmail.
+starting standard daemons: inetd cron
 Initial rc.i386 initialization:.
 rc.i386 configuring syscons: blank_time.
 Local package initialization:.
 Additional TCP options:.
-Tue Aug 22 13:59:05 CST 2000
-.De
-
-The load address of the kernel is not of much interest unless you have specific
-problems.
-.P
-Next we look for the other chips on the motherboard:
-.Dx
-Probing for devices on PCI bus 0:
-chip0: <Intel 82437FX PCI cache memory controller> rev 0x01 on pci0.0.0
-chip1: <Intel 82371FB PCI to ISA bridge> rev 0x02 on pci0.7.0
-ide_pci0: <Intel PIIX Bus-master IDE controller> rev 0x02 on pci0.7.1
-.De
-This is an Intel 82437 FX chipset.  We continue to look at the hardware
-connected to the motherboard, some of which is in fact implemented in the FX
-chipset:
-.Dx
-ahc0: <Adaptec 2940 Ultra SCSI adapter> rev 0x00 int a irq 14 on pci0.17.0
-ahc0: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs
-.De
-As the first line states, this is a SCSI host adapter using PCI interrupt A, IRQ
-14, and its PCI slot number is 17.
-.Dx
-Probing for devices on the ISA bus:
-sc0 on isa								\fIthis is the system console\fP\|
-sc0: VGA color <16 virtual consoles, flags=0x0>
-ed0 not found at 0x280					\fIed0 is a possible Ethernet board\fP\|
-ed1 not found at 0x300					\fIand ed1 is another one at a different address\fP\|
-atkbdc0 at 0x60-0x6f on motherboard
-atkbd0 irq 1 on isa
-sio0 at 0x3f8-0x3ff irq 4 flags 0x0 on isa	\fIthe first serial port\fP\|
-sio0: type 16550A						\fIit's a buffered UART\fP\|
-sio1 at 0x2f8-0x2ff irq 3 on isa			\fIthe second serial port\fP\|
-sio1: type 16550A
-sio2 not found at 0x3e8					\fIno more serial I/O ports\fP\|
-sio3 not found at 0x2e8
-.De
-.X "COM1:"
-Recall from page \*[supported-hardware] that UNIX devices start counting from 0,
-whereas Microsoft starts counting from 1.  Devices \fIsio0\fP\| through
-\fIsio3\fP\| are known as \fICOM1:\fP\| through \fICOM4:\fP\| in the Microsoft
-world.
-.Dx
-psm0 not found							\fIno PS/2 mouse\fP\|
-mse0 not found at 0x23c					\fIand no Microsoft mouse\fP\|
-fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa		\fIFloppy controller\fP\|
-fdc0: FIFO enabled, 8 bytes threshold
-fd0: 1.44MB 3.5in						\fIone 3\(12" drive\fP
-wdc0 at 0x1f0-0x1f7 irq 14 flags 0xa0ffa0ff on isa	\fIfirst IDE controller\fP\|
-wdc0: unit 0 (wd0): <ST51270A>, DMA, 32-bit, multi-block-32	\fISeagate ST51270A\fP\|
-wd0: 1223MB (2504880 sectors), 2485 cyls, 16 heads, 63 S/T, 512 B/S
-wdc1 at 0x170-0x177 irq 15 flags 0xa0ffa0ff on isa	\fIsecond IDE controller\fP\|
-wdc1: unit 0 (wd2): <IBM-DHEA-36480>, DMA, 32-bit, multi-block-16
-wd2: 6197MB (12692736 sectors), 12592 cyls, 16 heads, 63 S/T, 512 B/S
-wdc1: unit 1 (wd3): <IBM-DHEA-38451>, DMA, 32-bit, multi-block-16
-wd3: 8063MB (16514064 sectors), 16383 cyls, 16 heads, 63 S/T, 512 B/S
-.De
-This system has only one floppy drive, but three IDE drives on two controllers.
-The controllers both run in DMA mode.  The \f(CWflags\fP value
-(\f(CW0xa0ffa0ff\fP) gives more detail about how the controller runs.  See page
-\*[config-wdc0] for more details of the flags.
-.P
-In this case, both IDE controllers have disks connected, and the boot proceeds
-relatively quickly.  If one of the controllers has no disks connected, things
-are different: before the disk driver gives up, it waits for quite a long time,
-about 30 seconds.  Don't despair, the system probably hasn't crashed and burned,
-the driver just wants to be \fIreally\fP\| sure that there is no disk there.  If
-this wait gets on your nerves, you can rebuild the kernel with a shorter wait.
-See page \*[config-IDE_DELAY] for further information.
-.P
-The disk driver reads the information about the disk drives directly from the
-drive.  This is a relatively new feature of IDE drives.  ST506 drives did not
-supply this information, and many BIOSes do not read the drive.  Instead, they
-store information about the drive configuration in their CMOS memory.  If the
-stored values don't match the real parameters, you may have difficulty booting.
-Since FreeBSD doesn't use the BIOS after booting, it might work fine with a
-system, but if you also have Microsoft or another operating system on the disk,
-it may not work.  In this case, compare the values above with those stored in
-CMOS memory.
-.P
-Next, more SCSI drivers check for their boards:
-.Dx
-bt_isa_probe: Probe failed for card at 0x330
-bt0 not found at 0x330
-aha0 at 0x330-0x333 irq 12 drq 6 on isa
-aha0: AHA-1542 64 head BIOS FW Rev. 0.5 (ID=41) SCSI Host Adapter, SCSI ID 7, 16 CCBs
-aha1 not found at 0x334
-.De
-Here we have found another SCSI host adapter, this time an Adaptec 1542.  The
-SCSI driver can read the DMA channel number and the IRQ value, but it hasn't
-checked the bus speed, since this can cause some controllers to crash.  There is
-no particular sequence in booting, and in this example the two host adapters
-were found at significantly different times.
-.P
-Next, a number of other drivers probe:
-.Dx
-wt0 not found at 0x300
-mcd0 not found at 0x300
-matcdc0 not found at 0x230
-scd0 not found at 0x230
-ppc0 at 0x378 irq 7 flags 0x40 on isa
-ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
-lpt0: <generic printer> on ppbus 0
-lpt0: Interrupt-driven port
-ppi0: <generic parallel i/o> on ppbus 0
-plip0: <PLIP network interface> on ppbus 0
-lpt0: <generic printer> on ppbus 0
-lpt0: Interrupt-driven port
-.De
-The only thing found here is the parallel port.  Since FreeBSD 3.1, this port is
-under control of the \fIppbus\fP\| driver, and the printer is a subdevice.
-.P
-Continuing,
-.Dx
-1 3C5x9 board(s) on ISA found at 0x250
-ep0 at 0x250-0x25f irq 10 on isa
-ep0: aui/utp/bnc[*BNC*] address 00:a0:24:37:0c:bd
-.De
-Here the \fIep\fP\| driver has found a 3Com 3C509 Ethernet board.  In addition
-to I/O address and IRQ, it displays the Ethernet address
-(\f(CW00:a0:24:37:0c:bd\fP) and the information that this board, which has
-multiple interfaces, is using the BNC interface.
-.Dx
-vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa
-npx0 flags 0x1 on motherboard
-npx0: INT 16 interface
-sb_reset_dsp failed
-sb0 not found at 0x220
-Intel Pentium detected, installing workaround for F00F bug
-.De
-Here the VGA display driver reports the board that it found.  The value
-\f(CWmsize\fP is for text mode only.  Modern display boards have several
-megabytes of memory, but that will not show.
-.P
-The SoundBlaster driver reports a failure (\f(CWsb_reset_dsp failed\fP) before
-deciding that there is no SoundBlaster board present.  This occurs relatively
-frequently and is no cause for concern unless you really do have a SoundBlaster
-board installed.
-.P
-The \fIF00F bug\fP\| refers to a bug in the original Pentium chipset whereby
-programs can hang the CPU by executing an invalid instruction with the code
-\f(CW0xf00f\fP.  The workaround prevents this bug from having any effect, but it
-slows down the machine a little.  This bug only affects the original Pentium,
-not the Pentium Pro, Pentium II or Pentium III.  If you don't have an original
-Pentium, you can improve performance fractionally by using the configuration
-option \f(CWNO_F00F_HACK\fP.  See page \*[config-NO_F00F_HACK] for more details.
-.Dx
-Waiting 15 seconds for SCSI devices to settle
-.De
-At this point, most of the probes are finished.  The SCSI drivers reset the SCSI
-busses and wait 3 seconds for the devices to complete their reset.  This kernel
-has been modified to wait only 3 seconds: by default the value is 15 seconds.
-See the description of the parameter \f(CWSCSI_DELAY\fP on page
-\*[config-SCSI_DELAY] details of how to change this value.
-.P
-So far, the kernel has been running entirely in memory.  Now it mounts the root
-file system:
-.Dx
-changing root device to da0s1e
-.De
-In previous versions of FreeBSD, this was the last message you would see from
-the kernel.  The disks would already have been located, and there would be no
-more highlighted messages.  This is also the case if you have an IDE-only
-system.  The CAM driver, however, delays device probes until they are needed, so
-next you see:
-.Dx
-da1 at ahc0 bus 0 target 2 lun 0
-da1: <CDC 94181-15 0293> Fixed Direct Access SCSI-CCS device 
-da1: 3.300MB/s transfers
-da1: 573MB (1173930 512 byte sectors: 64H 32S/T 573C)
-da2 at ahc0 bus 0 target 3 lun 0
-da2: <CDC 94181-15 0293> Fixed Direct Access SCSI-CCS device 
-da2: 3.300MB/s transfers
-da2: 573MB (1173930 512 byte sectors: 64H 32S/T 573C)
-da3 at ahc0 bus 0 target 4 lun 0
-da3: <CDC 94181-15 0293> Fixed Direct Access SCSI-CCS device 
-da3: 3.300MB/s transfers
-da3: 573MB (1173930 512 byte sectors: 64H 32S/T 573C)
-da4 at ahc0 bus 0 target 5 lun 0
-da4: <CDC 94181-15 0293> Fixed Direct Access SCSI-CCS device 
-da4: 3.300MB/s transfers
-da4: 573MB (1173930 512 byte sectors: 64H 32S/T 573C)
-sa0 at aha0 bus 0 target 3 lun 0
-sa0: <EXABYTE EXB-8505SMBANSH2 0793> Removable Sequential Access SCSI-2 device 
-sa0: 5.000MB/s transfers (5.000MHz, offset 11)
-sa1 at aha0 bus 0 target 4 lun 0
-sa1: <ARCHIVE Python 28849-XXX 4.CM> Removable Sequential Access SCSI-2 device 
-sa1: 5.000MB/s transfers (5.000MHz, offset 15)
-sa2 at aha0 bus 0 target 5 lun 0
-sa2: <TANDBERG TDC 3800 -03:> Removable Sequential Access SCSI-CCS device 
-sa2: 3.300MB/s transfers
-pass4 at aha0 bus 0 target 4 lun 1
-pass4: <ARCHIVE Python 28849-XXX 4.CM> Removable Changer SCSI-2 device 
-pass4: 5.000MB/s transfers (5.000MHz, offset 15)
-da5 at aha0 bus 0 target 2 lun 0
-da5: <CONNER CFP4207S  4.28GB 2847> Fixed Direct Access SCSI-2 device 
-da5: 3.300MB/s transfers, Tagged Queueing Enabled
-da5: 4096MB (8388608 512 byte sectors: 64H 32S/T 4096C)
-cd0 at aha0 bus 0 target 6 lun 0
-cd0: <NRC MBR-7 110> Removable CD-ROM SCSI-2 device 
-cd0: 3.300MB/s transfers
-cd0: cd present [322265 x 2048 byte records]
-da0 at aha0 bus 0 target 0 lun 0
-da0: <IBM DORS-32160 WA0A> Fixed Direct Access SCSI-2 device 
-da0: 10.000MB/s transfers (10.000MHz, offset 15), Tagged Queueing Enabled
-da0: 2063MB (4226725 512 byte sectors: 64H 32S/T 2063C)
+Tue Apr 23 13:59:05 CST 2000
 .De
-There are a number of things to note here:
-.Ls B
-.LI
-The SCSI subsystem includes a total of six disk drives, three tape drives and a
-CD-ROM.
-.LI
-The first SCSI disk drive gets the ID \fIda1\fP, not \fIda0\fP.  \fIda0\fP\| is
-there, but it comes at the very end.  This indicates that the drive has been
-``wired down'' (see page \*[wiring]), because it is the system disk.  This is
-the only way to put a system disk on the second SCSI controller in this
-configuration.
-.LI
-The probes also find a device \fIpass4\fP\| at aha target 4, \fILUN\fP\|
-(\fIlogical unit\fP\|) 1.  This is the same target as \fIsa1\fP, which is on
-LUN 0, and it represents the changer device.
-.Le
-.Pn boot-msg-end
-.X "command, sysinstall"
-.X "sysinstall, command"
 At this point, the kernel has finished probing, and it transfers control to the
-shell script \fI/etc/rc\fP.  From this point on the display is in normal
-intensity.  \fI/etc/rc\fP\| first reads the configuration information in
-\fI/etc/defaults/rc.conf\fP\| and \fI/etc/rc.conf\fP (see page \*[rc.conf]).
-After that, it starts \fIccd\fP\| and \fIvinum\fP\| if requested:
-.Dx
-vinum: loaded
-vinum: reading configuration from /dev/da2h
-vinum: updating configuration from /dev/da3h
-vinum: updating configuration from /dev/da4h
-vinum: updating configuration from /dev/da1h
-.De
+shell script
+.Command -n /etc/rc .
+From this point on the display is in normal intensity.
+.Command -n /etc/rc
+first reads the configuration information in
+.File /etc/defaults/rc.conf
+and
+.File /etc/rc.conf
+(see page
+.Sref \*[rc.conf] ).
 Next, it checks the consistency of the file systems.  Normally you'll see
-messages like this for each file system in \fI/etc/fstab\fP\|:
+messages like this for each file system in
+.File /etc/fstab \/:
 .Dx
 /dev/da0s1a: FILESYSTEM CLEAN; SKIPPING CHECKS
 /dev/da0s1a: clean, 6311 free (367 frags, 743 blocks, 0.9% fragmentation)
@@ -854,19 +702,40 @@
 agmentation)
 .De
 If your system has crashed, however, either due to a software or hardware
-problem, or because it was not shut down correctly, you'll see something like:
+problem, or because it was not shut down correctly, it will perform a file
+system check
+.Command ( fsck ),
+which can take quite a while, up to an hour on very big file systems.  You'll
+see something like:
 .Dx
 WARNING: / was not properly dismounted
 /dev/da0s1a: 6311 free (367 frags, 743 blocks, 0.9% fragmentation)
 .De
-Next, \fI/etc/rc\fP\| invokes the first of three network start invocations.
-This one initializes the interfaces, sets the routes and starts the firewall if
-necessary:
+On a large file system,
+.Command fsck
+can take a long time to complete, up to several hours in extreme cases.  By
+default, the system does not need to wait for it to terminate; the
+.Command fsck
+continues in the background.  This is a relatively new feature in FreeBSD, so
+you can turn it off in case you have problems with it.  See page
+.Sref "\*[fsck-options]" \&
+for more details.
+.P
+.ne 10v
+Next,
+.Command -n /etc/rc
+invokes the first of three network start invocations.  This one initializes the
+interfaces, sets the routes and starts the firewall if necessary:
 .Dx
 Doing initial network setup: hostname.
-ep0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
-	inet 223.147.37.2 netmask 0xffffff00 broadcast 223.147.37.255
-	ether 00:a0:24:37:0c:bd 
+dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
+        inet 223.147.37.81 netmask 0xffffff00 broadcast 223.147.37.255
+.\" Yes, this is an Easter Egg.
+        inet6 fe80::280:c6ff:fef9:a6c8%dc0 prefixlen 64 scopeid 0x1
+        ether 00:80:c6:f9:a6:c8
+        media: autoselect (100baseTX <full-duplex>) status: active
+        supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <f
+ull-duplex> 10baseT/UTP 100baseTX <hw-loopback> none
 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
 	inet 127.0.0.1 netmask 0xff000000 
 
@@ -874,72 +743,116 @@
 Additional routing options:.
 routing daemons:.
 .De
-In this example, there were no additional routing options, and no routing
-dmons.  The messages accordingly have nothing between the characters \f(CW:\fP
-and \f(CW.\fP.  You'll see this relatively frequently.
-.P
-Next, \fI/etc/rc\fP\| mounts the network file systems, cleans up \fI/var/run/\fP
-and then starts \fIsyslogd\fP\| unless you have disabled it:
+In this example, there were no additional routing options and no routing
+daemons.  The messages accordingly have nothing between the character \f(CW:\fP
+and the final period.  You'll see this relatively frequently.
+.P
+Next,
+.Command -n /etc/rc
+mounts the network file systems, cleans up
+.Directory /var/run
+and then starts
+.Daemon syslogd \/:
 .Dx
 Mounting NFS file systems.
 Additional daemons: syslogd.
 .De
-Then it checks if we have a core dump.  If so, it will try to save it to
-\fI/var/crash\fP.
+Then it checks if we have a core dump.  If so, it tries to save it to
+.Directory /var/crash .
 .Dx
 checking for core dump...savecore: no core dump
 .De
-Saving the core dump may fail if there isn't enough space in \fI/var/crash\fP.
+Saving the core dump may fail if there isn't enough space in
+.Directory /var/crash .
 If this happens, you can clean up and save the dump later, as long as you
 haven't used enough swap space to overwrite the dump.
 .P
 Next comes the second pass of the network startup, which starts our choice of
-\fInamed\fP, \fIntpdate\fP, \fIxntpd\fP, \fItimed\fP, \fIportmap\fP,
-\fIypserv\fP, \fIrpc.ypxfrd\fP, \fIrpc.yppasswdd\fP, \fIypbind\fP, \fIypset\fP,
-\fIkeyserv\fP\| and \fIrpc.ypupdated\fP:
+.Daemon named ,
+.Command ntpdate ,
+.Daemon ntpd ,
+.Daemon timed ,
+.Daemon portmap ,
+.Daemon ypserv ,
+.Daemon rpc.ypxfrd ,
+.Daemon rpc.yppasswdd ,
+.Daemon ypbind ,
+.Daemon ypset ,
+.Daemon keyserv
+and
+.Daemon rpc.ypupdated \/:
 .Dx
 Doing additional network setup: named xntpd portmap.
-starting.  named 8.1.2 Sun May	9 13:04:13 CST 1999  grog@freebie.example.org:/usr/ob
-j/usr.sbin/named
+starting.  named 8.1.2 Sun May  9 13:04:13 CST 1999  grog@freebie.example.org:/usr
+/obj/usr.sbin/named
 master zone "example.org" (IN) loaded (serial 1997010902)
 master zone "37.147.223.in-addr.arpa" (IN) loaded (serial 1996110801)
-listening on [192.109.197.149].53 (ep0)
+listening on [223.147.37.149].53 (ep0)
 listening on [127.0.0.1].53 (lo0)
 Forwarding source address is [0.0.0.0].1063
 Ready to answer queries.
 .De
-With the exception of the first line, all the messages come from \fInamed\fP.
+With the exception of the first line, all the messages come from
+.Daemon named .
 They may come in the middle of the first line, rather than waiting for the end
 of the line.
 .P
-Next, \fI/etc/rc\fP\| enables quotas if asked, and then runs the third network
-pass, which starts our choice of \fImountd\fP, \fInfsd\fP, \fIrpc.lockd\fP,
-\fIrpc.statd\fP, \fInfsiod\fP, \fIamd\fP, \fIrwhod\fP\| and \fIkerberos\fP:
+Next,
+.Command -n /etc/rc
+enables quotas if asked, and then runs the third network pass, which starts our
+choice of
+.Daemon mountd ,
+.Daemon nfsd ,
+.Daemon rpc.lockd ,
+.Daemon rpc.statd ,
+.Daemon nfsiod ,
+.Daemon amd ,
+.Daemon rwhod
+and
+.Daemon kerberos \/:
 .Dx
 Starting final network daemons: mountd nfsd rpc.statd nfsiod rwhod.
 .De
-Now we're almost done.  \fI/etc/rc\fP\| rebuilds a couple of internal databases
-(for use by the \fIps\fP\| command and some others), then it sets the default
-paths for \fIldconfig\fP\|:
+Now we're almost done.
+.Command -n /etc/rc
+rebuilds a couple of internal databases (for use by the
+.Command ps
+command and some others), then it sets the default paths for
+.Command ldconfig \/:
 .Dx
 setting ELF ldconfig path: /usr/lib /usr/lib/compat /usr/X11R6/lib /usr/local/lib
-setting a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout /
-usr/local/lib/aout 
-.De
-Next, it starts your choice of \fIinetd\fP, \fIcron\fP, \fIprinter\fP,
-\fIsendmail\fP\| and \fIusbd\fP:
+setting a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout
+/usr/X11R6/lib/aout
+/usr/local/lib/aout
+.De
+Next, it starts your choice of
+.Daemon inetd ,
+.Daemon cron ,
+.Daemon printer ,
+.Daemon sendmail
+and
+.Daemon usbd \/:
 .Dx 
 starting standard daemons: inetd cron sendmail.
 .De
-The last thing that \fI/etc/rc\fP\| does is to check for other startup files.
-These could be in the files specified in the variable \f(CWlocal_startup\fP, or
-in the file \fI/etc/rc.local\fP.  In our case, there are none, so all we see is:
+The last thing that
+.Command -n /etc/rc
+does is to check for other startup files.  These could be in the files specified
+in the variable \f(CWlocal_startup\fP, or in the file
+.File /etc/rc.local .
+In our case, there are none, so all we see is:
 .Dx
 Local package initialization:.
 .De
-Finally, we're done.  \fI/etc/rc\fP\| stops, and \fIinit\fP\| proecesses
-\fI/etc/ttys\fP, which starts \fIgetty\fP\| processes on specified terminals.
-On the console, we see:
+Finally, we're done.
+.Command -n /etc/rc
+stops, and
+.Daemon init
+processes
+.File /etc/ttys ,
+which starts
+.Command getty
+processes on specified terminals.  On the console, we see:
 .Dx
 Mon May 13 13:52:00 CST 2002
 
@@ -947,34 +860,38 @@
 
 login:
 .De
-At this point, we're at the beginning of \*[chunixref] (page \*[login-prompt]).
-.H3 "Single user mode"
+At this point, we're at the beginning of Chapter
+.Sref \*[nchunixref] \&
+(page
+.Sref \*[login-prompt] ).
+.H2 "Single-user mode"
 .Pn single-user
-.X "single user mode"
+.X "single-user mode"
 Sometimes it's inconvenient that multiple users can access the system.  For
 example, if you're repartitioning a disk, you don't want other people walking
 all over the disk while you're doing so.  Even if you're the only user on the
-system, dmons may be doing things in the background.  In order to avoid this
-problem, you can stop the boot process before most of the dmons have been
-started and enter \fIsingle user mode\fP.  To do this, specify the \f(CW-s\fP
-flag at boot time:
-.Dx
-ok \f(CBset boot_single\fP
-ok \f(CBboot\fP
-.De
-As soon as the device probes have been completed, the system startup will be
-interrupted, and you will be prompted for a shell.  Only the root file system
-will be accessible, and it will be mounted read-only.  The reason for this is
-that the file system may be damaged and require repair before you can write to
-it.  If you do need to write to the root file system, you should first check the
-consistency of the file system with \fIfsck\fP.  For example,
+system, daemons may be doing things in the background.  To avoid this problem,
+you can stop the boot process before most of the daemons have been started and
+enter \fIsingle-user mode\fP.  To do this, set the \f(CWboot_single\fP variable,
+or specify the \f(CW-s\fP flag at boot time:
+.Dx
+ok \f(CBboot -s\fP
+.De
+As soon as the device probes have been completed, the system startup is
+interrupted, and you are prompted for a shell.  Only the root file system is
+accessible, and it is mounted read-only.  The reason for this is that the file
+system may be damaged and require repair before you can write to it.  If you do
+need to write to the root file system, you should first check the consistency of
+the file system with
+.Command fsck ,
+after which you can mount it with the \f(CW-u\fP (update) option.  For example,
 .Dx
 \f(CBnpx0 on motherboard
 npx0: INT 16 interface				\fIend of the probes (high intensity display)\f(CW
-Enter pathname of shell or RETURN for sh:	\fIhit RETURN\fP\|
+Enter pathname of shell or RETURN for sh:       \fIhit Enter\fP\/
 erase ^H, kill ^U, intr ^C
-# \f(CBfsck -y /dev/ad0a\fP\|					\fIcheck the integrity of the root file system\fP\|
-** /dev/ad0a
+# \f(CBfsck -y /dev/ad0s1a\fP                           \fIcheck the integrity of the root file system\fP\/
+** /dev/ad0s1a
 ** Last Mounted on /
 ** Root file system
 ** Phase 1 - Check Blocks and Sizes
@@ -983,1138 +900,107 @@
 ** Phase 4 - Check Reference Counts
 ** Phase 5 - Check Cyl groups
 1064 files, 8190 used, 6913 free (61 frags, 1713 blocks, 0.4% fragmentation)
-# \f(CBmount -u /\fP\|						\fIremount root file system read/write\fP\|
-# \f(CBmount /usr\fP\|						\fImount any other file systems you need\fP\|
+# \f(CBmount -u /\fP                                    \fIremount root file system read/write\fP
+# \f(CBmount /usr\fP                                    \fImount any other file systems you need\fP
 .De
-To leave single user mode and enter multi user mode, just enter \fBCTRL-D\fP:
+To leave single-user mode and enter multi-user mode, just enter \fBCtrl-D\fP:
 .Dx
 # \f(CB^D\fP
 Skipping file system checks...
-\fI(the rest of the boot sequence)\fP\|
+\fI(the rest of the boot sequence)\fP\/
 .De
 .X "run levels"
-.X "init S"
-System V has the concept of \fIrun levels\fP, which are controlled by
-\fIinit\fP.  Single user mode corresponds to run level \f(CWS\fP, and multi user
-mode corresponds to run level 3.  There is nothing to correspond to the other
-System V run levels, in particular run level 2, which starts a System V system
-without networking.  Networking is such an integral part of FreeBSD that this is
-just not practicable.  You also can't enter single user mode with the System V
-command \fIinit S\fP. If you try, you get:
-.Dx
-# \f(CBinit S\fP
-init: already running
-.De
-You can enter single user mode from a running FreeBSD system with the
-\fIshutdown\fP\| command, which we'll look at in the next section.
-Unfortunately, \fIshutdown\fP\| leaves some dmons running and file systems
-mounted, so it's preferable to enter by rebooting, as shown above.
-.H4 "Password protecting single-user mode"
-.X "/etc/ttys"
-If you run a secure environment, you could be concerned about the fact that you
-can start up in single-user mode without entering a password.  That's the
-default\(emnormally, if somebody can access your system console, a password is
-no longer much use, and it can be a nuisance\(embut you can change it.  Find
-this entry in \fI/etc/ttys\fP, and change the word \f(CWsecure\fP to
-\f(CWinsecure\fP:
-.Ds
-# If you want to be asked for password, change "secure" to "insecure" here
-console	none				unknown	off \f(CBin\fPsecure
-.De
-.sp -1v
-..if XXX
-> A bit earlier you are talking about network configuration files. I think
-> the file login.access should be listed there. Also /etc/fbtab should be
-> mentioned in this appendix.
-..endif
-.H2 "FreeBSD configuration files"
-.Pn configfiles
-One of the outstanding things about UNIX is that all system configuration
-information is stored in text files, usually in the directory
-.File /etc .
-Some people think that this method seems primitive by comparison with a flashy
-GUI configuration editor, but it has significant advantages.  In particular, you
-see \fIexactly\fP\| what the program reads.  WIth a GUI editor, the real
-configuration is usually stored in a format which you can't read, and even when
-you can, it's undocumented.  Also, you can see more of the configuration at a
-time: a GUI editor usually presents you with only small parts of the
-configuration, and it's difficult to see the relationships.
-.P
-In the Microsoft world, one of the most common methods of problem resolution is
-to reinstall the system.  This is a declaration of bankruptcy: it takes forever,
-you're liable to cause other problems on the way, and you never find out what
-the problem was.  If your FreeBSD system doesn't do what you expect, \f(BIdon't
-reinstall the system\fP.  Take a look at the configuration files, and there's a
-good chance that you'll find the problem there.
-.P
-The vast majority of configuration files are the same across all versions of
-UNIX.  This appendix touches on them briefly, but you can get in-depth
-information in books such as the \fIUNIX System Administration Handbook\fP, by
-Evi Nemeth, Garth Snyder, Scott Seebass, and Trent R. Hein.  In all cases, you
-can get more information from section 5 of the man pages.
-.P
-In this section, we'll first look at \fI/etc/defaults/rc.conf\fP\| and
-\fI/etc/rc.conf\fP.  On page \*[std-config-files] we'll look at the other
-non-network configuration files, and on page \*[net-config-files] we'll look at
-the files related to network configuration.
-.H2 "/etc/rc.conf"
-.Pn rc.conf
-.X "/etc/rc.conf"
-.File /etc/rc.conf 
-is the main system configuration file, and in this format it is unique to
-FreeBSD.  In older versions of FreeBSD, this file was called
-.File /etc/sysconfig \(emonly
-the name has changed.
-.P
-.File /etc/rc.conf 
-is intended to be the one file which defines the configuration of your
-system\(emthat is to say, what the system needs to do when it starts up.  It's
-not quite that simple, but nearly all site-dependent information is stored here.
-We'll walk through the version that was current at the time of writing.  The
-files will change as time goes on, but most of the information will remain
-relevant.
-.P
-\fI/etc/rc.conf\fP\| is completely your work.  When you install the system,
-there is no such file: you have to create it, usually by specifying defaults to
-\fIsysinstall\fP.  What you will find is a file \fI/etc/defaults/rc.conf\fP,
-which contains default values for everything in \fI/etc/rc.conf\fP.  It makes it
-easier to upgrade: just change the file with the defaults, and leave the
-site-specific configuration alone.  You may still need to change something, but
-it'll be a lot easier.
-.P
-Let's walk through \fI/etc/defaults/rc.conf\fP.  As we do, we'll build up our
-\fI/etc/rc.conf\fP.  To avoid too much confusion, I show the text which goes
-into \fI/etc/rc.conf\fP\| in \s8\f(CBconstant width bold\fP\s0, whereas the text
-in \fI/etc/defaults/rc.conf\fP\| is in \s8\f(CWconstant width\fP\s0.
-.Dx
-#!/bin/sh
-#
-
-# This is rc.conf - a file full of useful variables that you can set 
-# to change the default startup behavior of your system.  You should
-# not edit this file!  Put any overrides into one of the ${rc_conf_files}
-# instead and you will be able to update these defaults later without
-# spamming your local configuration information.
-#
-# All arguments must be in double or single quotes.
-#
-#	$I\&d: rc.conf,v 1.1.2.4 1999/05/03 08:13:55 grog Exp $
-
-##############################################################
-### Important initial Boot-time options  #####################
-##############################################################
-
-swapfile="NO"				# Set to name of swapfile if aux swapfile desired.
-.De
-You only need to set \f(CWswapfile\fP if you want an additional swap file.  We
-will see an example of this on page \*[swapon].
-.Dx
-apm_enable="NO"		# Set to YES to enable APM BIOS functions (or NO).
-apmd_enable="NO"	# Run apmd to handle APM event from userland.
-apmd_flags=""		# Flags to apmd (if enabled).
-.De
-These parameters cover \fIAPM\fP, \fIAdvanced Power Management\fP.  We look at
-this topic in \*[chextras].
-.Dx
-pccard_enable="NO"	# Set to YES if you want to configure PCCARD devices.
-pccard_mem="DEFAULT"	# If pccard_enable=YES, this is card memory address.
-pccard_beep="2"		# pccard beep type.
-pccard_ifconfig="NO"	# Specialized pccard ethernet configuration (or NO).
-pccardd_flags=""	# Additional flags for pccardd.
-pccard_conf="/etc/defaults/pccard.conf"	# pccardd(8) config file
-pccard_ether_delay="5"	# Delay before trying to start dhclient in pccard_ether
-.De
-These parameters control \fIpccardd\fP, the daemon for the PCMCIA cards used in
-laptops.  See \*[chextras] for more details.  Normally, you'll only change the
-\f(CWpccard_enable\fP to \f(CWYES\fP.
-.Dx
-local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"	# startup script dirs.
-.De
-.X "/etc/rc2.d"
-This is a list of directories which are searched for startup scripts.  If you
-come from a System V background, you would expect to find these scripts in the
-directories such as \fI/etc/rc2.d\fP.
-.Dx
-local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic" # periodic script dirs
-.De
-\f(CWlocal_periodic\fP is a list of directories to search for scripts to be run
-by \fIcron\fP.  Currently it is not used.
-.Dx
-rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
-.De
-\f(CWrc_conf_files\fP is a list of files to read after this file.  You'll
-recognize \fI/etc/rc.conf\fP, which we discussed above.
-\fI/etc/rc.conf.local\fP\| is an idea that hasn't completely died, but there's a
-good chance that it will.  You'd be best off not to use it until you're sure
-it's going to stay.
-.P
-For obvious reasons, this is one entry in \fI/etc/defaults/rc.conf\fP\| which
-you can't override in \fI/etc/rc.conf\fP.
-.Dx
-##############################################################
-###  Network configuration sub-section  ######################
-##############################################################
-
-### Basic network options: ###
-hostname="myname.my.domain"	# Set this!
-.De
-\f(CWhostname\fP is the fully qualified name of the host.  You should always
-override it in \fI/etc/rc.conf\fP.  See page \*[set-hostname] for more details.
-In \fI/etc/rc.conf\fP, we'll put:
-.Dx
-\f(CBhostname="presto.example.org"	# Set this!\fP
-.De
-Continuing in \fI/etc/defaults/rc.conf\fP,
-.Dx
-nisdomainname="NO"			# Set to NIS domain if using NIS (or NO).
-.De
-If you're using Sun's NIS, set this.  We don't discuss NIS in this book.
-.Dx
-firewall_enable="NO"			# Set to YES to enable firewall functionality
-firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall
-firewall_type="UNKNOWN"		# Firewall type (see /etc/rc.firewall)
-firewall_quiet="NO"			# Set to YES to suppress rule display
-.De
-Parameters for the \fIipfw\fP\| firewall.  See page \*[firewall-configuration],
-where we set the following flags in \fI/etc/rc.conf\fP\|:
-.Dx
-\f(CBfirewall_enable="YES"		# Set to YES to enable firewall functionality
-firewall_type="client"		# Firewall type (see /etc/rc.firewall)\fP
-.De
-.Dx
-natd_program="/sbin/natd"	  	# path to natd, if you want a different one.
-natd_enable="NO"			# Enable natd (if firewall_enable == YES).
-natd_interface="fxp0"		# Public interface or IPaddress to use.
-natd_flags=""				# Additional flags for natd.
-.De
-Parameters for \fInatd\fP.  See page \*[natd-rc.conf] for more details.  In the
-example there, we'll add these lines to \fI/etc/rc.conf\fP\|:
-.Dx
-\f(CBnatd_enable="YES"		 	# Enable natd (if firewall_enable == YES).
-natd_interface="tun0"		# Public interface or IPaddress to use.\fP
-.De
-Continuing with \fI/etc/defaults/rc.conf\fP,
-.Dx
-tcp_extensions="NO"			# Disallow RFC1323 extensions (or YES).
-.De
-We don't discuss these extensions in this book.  Leave this variable set to
-\f(CWNO\fP unless you have problems.
-.Dx
-network_interfaces="lo0"		# List of network interfaces (lo0 is loopback).
-ifconfig_lo0="inet 127.0.0.1"	# default loopback device configuration.
-#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
-.De
-This is one area that you must change if you have any network interfaces at
-all.  On page \*[describing-network], we come up with the following entries in
-\fI/etc/rc.conf\fP\|:
-.Dx
-\f(CBnetwork_interfaces="ed0 lo0"	# List of network interfaces (lo0 is loopback).
-ifconfig_ed0="inet 223.147.37.2	 netmask 255.255.255.0"
-ifconfig_lo0="inet 127.0.0.1"	# default loopback device configuration.\fP
-.De
-Continuing with \fI/etc/defaults/rc.conf\fP,
-.Dx
-# If you have any sppp(4) interfaces above, you might also want to set
-# the following parameters.  Refer to spppcontrol(8) for their meaning.
-sppp_interfaces=""			# List of sppp interfaces.
-#sppp_interfaces="isp0"		# example: sppp over ISDN
-#spppconfig_isp0="authproto=chap myauthname=foo myauthsecret='top secret' hisauthname
-=some-gw hisauthsecret='another secret'"
-.De
-These are parameters for the \fIsppp\fP\| implementation for \fIISDN4BSD\fP,
-which we won't discuss here.
-.Dx
-### Network daemon (miscellaneous) & NFS options: ###
-syslogd_enable="YES"			# Run syslog daemon (or NO).
-syslogd_flags=""			# Flags to syslogd (if enabled).
-.De
-You should always run syslogd unless you have a very good reason not to.
-\f(CWsyslogd_flags\fP is normally empty, as in this example.
-.Dx
-inetd_enable="YES"			# Run the network daemon dispatcher (or NO).
-inetd_flags=""				# Optional flags to inetd (always enabled).
-.De
-We will look at \fIinetd\fP\| on page \*[inetd].  Normally you will want to keep
-it enabled, and you won't need any flags for it.
-.Dx
-named_enable="NO"			# Run named, the DNS server (or NO).
-named_program="named"		# path to named, if you want a different one.
-named_flags=""				# Flags for named
-#named_flags="-u bind -g bind"	# Flags for named
-.De
-These parameters specify whether we should run the name server, and what flags
-we should use if we do.  See page \*[running-named] for more details.  Previous
-versions of \fInamed\fP\| required a flag to specify the location of the
-configuration file, but the location FreeBSD uses has now become the standard,
-so we no longer need to specify any flags.  All we put in \fI/etc/rc.conf\fP\|
-is:
-.Dx
-\f(CBnamed_enable="YES"			# Run named, the DNS server (or NO).\fP
-.De
-Continuing with \fI/etc/defaults/rc.conf\fP,
-.Dx
-kerberos_server_enable="NO"	# Run a kerberos master server (or NO).
-kadmind_server_enable="NO"		# Run kadmind (or NO) -- do not run non
-						# a slave kerberos server
-kerberos_stash=""			# Is the kerberos master key stashed?
-.De
-Set these if you want to run Kerberos.  We don't discuss Kerberos in this book.
-.Dx
-rwhod_enable="NO"			# Run the rwho daemon (or NO).
-rwhod_flags=""				# Flags for rwhod
-.De
-Set this if you want to run the \fIrwhod\fP\| dmon, which broadcasts
-information about the system load.
-.Dx
-amd_enable="NO"				# Run amd service with $amd_flags (or NO).
-amd_flags="-a /net -c 1800 -k i386 -d my.domain -l syslog /host /etc/amd.map"
-amd_map_program="NO"			# Can be set to "ypcat -k amd.master"
-.De
-Enable the automounter.   We don't discuss the automounter in this book.
-.Dx
-nfs_client_enable="NO"		# This host is an NFS client (or NO).
-nfs_client_flags="-n 4"		# Flags to nfsiod (if enabled).
-nfs_access_cache="2"			# Client cache timeout in seconds
-nfs_server_enable="NO"		# This host is an NFS server (or NO).
-nfs_server_flags="-u -t -n 4"	# Flags to nfsd (if enabled).
-mountd_flags="-r"			# Flags to mountd (if NFS server enabled).
-nfs_reserved_port_only="NO"	# Provide NFS only on secure port (or NO).
-rpc_lockd_enable="NO"		# Run NFS rpc.lockd (*broken!*) if nfs_server.
-rpc_statd_enable="YES"		# Run NFS rpc.statd if nfs_server (or NO).
-portmap_enable="YES"			# Run the portmapper service (or NO).
-portmap_program="/usr/sbin/portmap"	# path to portmap, if you want a different one.
-portmap_flags=""			# Flags to portmap (if enabled).
-rpc_ypupdated_enable="NO"		# Run if NIS master and SecureRPC (or NO).
-.De
-Flags for NFS.  See page \*[NFS-setup].   There we set the following values in
-\fI/etc/rc.conf\fP\|:
-.Dx
-nfs_client_enable="YES"		# This host is an NFS client (or NO).
-nfs_server_enable="YES"		# This host is an NFS server (or NO).
-.De
-.Dx
-keyserv_enable="NO"			# Run the SecureRPC keyserver (or NO).
-keyserv_flags=""			# Flags to keyserv (if enabled).
-rarpd_enable="NO"			# Run rarpd (or NO).
-rarpd_flags=""				# Flags to rarpd.
-xtend_enable="NO"			# Run the X-10 power controller daemon.
-xtend_flags=""				# Flags to xtend (if enabled).
-.De
-These entries refer to the Secure RPC key server, \fIrarpd\fP\| and the X-10
-dmon.  We don't discuss any of them in this book.  See the man pages
-\fIkeyserv(8)\fP, \fIrarpd(8)\fP\| and \fIxtend(8)\fP\| respectively.
-.Dx
-### Network Time Services options: ###
-timed_enable="NO"			# Run the time daemon (or NO).
-timed_flags=""				# Flags to timed (if enabled).
-ntpdate_enable="NO"			# Run the ntpdate to sync time (or NO).
-ntpdate_program="ntpdate"		# path to ntpdate, if you want a different one.
-ntpdate_flags=""			# Flags to ntpdate (if enabled).
-xntpd_enable="NO"			# Run xntpd Network Time Protocol (or NO).
-xntpd_program="xntpd"		# path to xntpd, if you want a different one.
-xntpd_flags="-p /var/run/xntpd.pid"	# Flags to xntpd (if enabled).
-.De
-.\" XXX
-\fItimed\fP, \fIntpdate\fP and \fIxntpd\fP\| are three different ways of
-synchronizing your machine with the current date and time.  See page
-\*[timekeeping] for more information.  There we put the following values into
-\fI/etc/rc.conf\fP\|:
-.Dx
-\f(CBxntpd_enable="YES"			# Run xntpd Network Time Protocol (or NO).
-xntpd_flags=""				# Flags to xntpd (if enabled).\fP
-.De
-Continuing with \fI/etc/defaults/rc.conf\fP,
-.Dx
-# Network Information Services (NIS) options: ###
-nis_client_enable="NO"		# We're an NIS client (or NO)
-nis_client_flags=""			# Flags to ypbind (if enabled).
-nis_ypset_enable="NO"		# Run ypset at boot time (or NO).
-nis_ypset_flags=""			# Flags to ypset (if enabled).
-nis_server_enable="NO"		# We're an NIS server (or NO)
-nis_server_flags=""			# Flags to ypserv (if enabled).
-nis_ypxfrd_enable="NO"		# Run rpc.ypxfrd at boot time (or NO).
-nis_ypxfrd_flags=""			# Flags to rpc.ypxfrd (if enabled).
-nis_yppasswdd_enable="NO"		# Run rpc.yppasswdd at boot time (or NO).
-nis_yppasswdd_flags=""		# Flags to rpc.yppasswdd (if enabled).
-.De
-More parameters for configuring NIS.  As mentioned above, this book does not
-deal with NIS.
-.Dx
-### Network routing options: ###
-defaultrouter="NO"			# Set to default gateway (or NO).
-static_routes=""			# Set to static route list (or leave empty).
-gateway_enable="NO"			# Set to YES if this host will be a gateway.
-.De
-Here's another area that we need to change if we're using any kind of a network.
-On page \*[route] we set the following values in \fI/etc/rc.conf\fP\|:
-.Dx
-\f(CBdefaultrouter="223.147.37.5"	# Set to default gateway (or NO).
-static_routes=""			# Set to static route list (or leave empty).\fP
-.De
-Continuing with \fI/etc/defaults/rc.conf\fP,
-.Dx
-router_enable="NO"			# Set to YES to enable a routing daemon.
-router="routed"				# Name of routing daemon to use if enabled.
-router_flags="-q"			# Flags for routing daemon.
-mrouted_enable="NO"			# Do multicast routing (see /etc/mrouted.conf).
-mrouted_flags=""			# Flags for multicast routing daemon.
-.De
-These parameters relate to the routing dmons \fIrouted\fP\| and \fImrouted\fP.
-In the configurations we considered, you don't need them.
-.Dx
-ipxgateway_enable="NO"		# Set to YES to enable IPX routing.
-ipxrouted_enable="NO"		# Set to YES to run the IPX routing daemon.
-ipxrouted_flags=""			# Flags for IPX routing daemon.
-.De
-IPX is a Novell proprietary networking protocol which is designed to be similar
-to IP.  FreeBSD supplies the dmon \fIIPXrouted\fP\| (note the capitalization)
-which handles IPX routing tables.  See the man page \fIIPXrouted(8)\fP for
-further details.
-.Dx
-arpproxy_all=""				# replaces obsolete kernel option ARP_PROXYALL.
-forward_sourceroute="NO"		# do source routing (only if gateway_enable is set to "YES")
-accept_sourceroute="NO"		# accept source routed packets to us
-.De
-Various IP options.
-.Dx
-### ATM interface options: ###
-atm_enable="NO"				# Configure ATM interfaces (or NO).
-#atm_netif_hea0="atm 1"		# Network interfaces for physical interface.
-#atm_sigmgr_hea0="uni31"		# Signalling manager for physical interface.
-#atm_prefix_hea0="ILMI"		# NSAP prefix (UNI interfaces only) (or ILMI).
-#atm_macaddr_hea0="NO"		# Override physical MAC address (or NO).
-# ATMARP server address (or local).
-#atm_arpserver_atm0="0x47.0005.80.999999.9999.9999.9999.999999999999.00" 
-#atm_scsparp_atm0="NO"		# Run SCSP/ATMARP on network interface (or NO).
-atm_pvcs=""				# Set to PVC list (or leave empty).
-atm_arps=""				# Set to permanent ARP list (or leave empty).
-
-### ISDN interface options: ###
-isdn_enable="NO"			# Enable the ISDN subsystem (or NO).
-isdn_fsdev="/dev/ttyv4"		# Output device for fullscreen mode (or NO for daemon mode).
-isdn_flags="-dn -d0x1f9"		# Flags for isdnd
-isdn_trace="NO"				# Enable the ISDN trace subsystem (or NO).
-isdn_traceflags="-f /var/tmp/isdntrace0"	# Flags for isdntrace
-.De
-Parameters for ATM and ISDN, which this book doesn't discuss.
-.Dx
-### Miscellaneous network options: ###
-icmp_bmcastecho="NO"			# respond to broadcast ping packets
-.De
-.X "smurf"
-This parameter relates to the so-called \fIsmurf\fP\| ``denial of service''
-attack: according to the RFCs, a machine should respond to a ping to its
-broadcast address.  But what happens if somebody pings a remote network's
-broadcast address across the Internet, as fast as he can?  Each system on the
-remote network will reply, completely overloading the Internet interface.  Yes,
-this is silly, but there are silly people out there.  If you leave this
-parameter as it is, your system will not be vulnerable.  See
-\fIhttp://www.cert.org/advisories/CA-98.01.smurf.html\fP\| for more details.
-.Dx
-##############################################################
-###  System console options  #################################
-##############################################################
-
-keymap="NO"				# keymap in /usr/share/syscons/keymaps/* (or NO).
-keyrate="NO"				# keyboard rate to: slow, normal, fast (or NO).
-keybell="NO"				# bell to duration.pitch or normal or visual (or NO).
-keychange="NO"				# function keys default values (or NO).
-cursor="NO"				# cursor type {normal|blink|destructive} (or NO).
-scrnmap="NO"				# screen map in /usr/share/syscons/scrnmaps/* (or NO).
-font8x16="NO"				# font 8x16 from /usr/share/syscons/fonts/* (or NO).
-font8x14="NO"				# font 8x14 from /usr/share/syscons/fonts/* (or NO).
-font8x8="NO"				# font 8x8 from /usr/share/syscons/fonts/* (or NO).
-blanktime="300"				# blank time (in seconds) or "NO" to turn it off.
-saver="NO"					# screen saver: Uses /modules/${saver}_saver.ko
-.De
-These parameters describe the use of alternate keyboard mappings when using the
-standard character-based terminals only.  See the files in
-.File /usr/share/syscons/keymaps 
-for key map files, and
-.File /usr/share/syscons/fonts 
-for alternate fonts.  These parameters have no effect on the X-based displays
-that this book assumes.
-.Dx
-moused_enable="NO"			# Run the mouse daemon.
-moused_type="auto"			# See man page for rc.conf(5) for available settings.
-moused_port="/dev/cuaa0"		# Set to your mouse port.
-moused_flags=""				# Any additional flags to moused.
-allscreens_flags=""			# Set this vidcontrol mode for all virtual screens
-.De
-Parameters for \fImoused\fP, a mouse driver for the character-based terminals,
-and global flags for virtual screens.
-.Dx
-##############################################################
-###  Miscellaneous administrative options  ###################
-##############################################################
-
-cron_enable="YES"			# Run the periodic job daemon.
-.De
-Run \fIcron\fP, the dmon responsible for running things at specific times.  See
-page \*[cron] for a description of \fIcron\fP.  You should leave this enabled
-unless you have a good reason not to.
-.Dx
-lpd_enable="YES"			# Run the line printer daemon
-lpd_program="/usr/sbin/lpd"	# path to lpd, if you want a different one.
-lpd_flags=""				# Flags to lpd (if enabled).
-.De
-See page \*[printers] for a discussion of printing.  There's no particular
-reason to change these defaults.
-.Dx
-usbd_enable="NO"			# Run the usbd daemon.
-usbd_flags=""				# Flags to usbd (if enabled).
-.De
-Support for the \fIUniversal Serial Bus\fP\| or \fIUSB\fP\| is relatively new,
-and it is liable to change.  Consider this an experimental option at the moment.
-See the man pages \fIusbd(8)\fP\| and \fIusb(4)\fP\| for more information.
-.Dx
-sendmail_enable="YES"		# Run the sendmail daemon (or NO).
-sendmail_flags="-bd -q30m"		# -bd is pretty mandatory
-.De
-See page \*[sendmail] for a discussion of \fIsendmail\fP.  There's normally no
-need to change these values.
-.Dx
-dumpdev="NO"				# Device name to crashdump to (if enabled).
-.De
-This parameter specifies how to take dumps when the system panics.  See page
-\*[panic] for details, where we set the following value in \fI/etc/rc.conf\fP\|:
-.Dx
-\f(CBdumpdev=/dev/ad0s1b\fP
-.De
-Continuing with \fI/etc/defaults/rc.conf\fP,
-.Dx
-enable_quotas="NO"			# turn on quotas on startup (or NO).
-check_quotas="NO"			# Check quotas on startup (or NO).
-accounting_enable="NO"		# Turn on process accounting (or NO).
-ibcs2_enable="NO"			# Ibcs2 (SCO) emulation loaded at startup (or NO).
-linux_enable="NO"			# Linux emulation loaded at startup (or NO).
-.\"XXXsvr4_enable="NO"	# SysVR4 emulation loaded at startup (or NO).
-.De
-We don't discuss quotas or accounting in this book.  We will look at the
-parameters \f(CWibcs2_enable\fP on page \*[SCO-emulation] and
-\f(CWlinux_enable\fP on page \*[Linux-emulation].
-.\"XXX, and \f(CWsvr4_enable\fP on page \f(CWsvr4-emulation\fP.
-.Dx
-rand_irqs="NO"				# Stir the entropy pool (or NO).
-.De
-\f(CWrand_irqs\fP is used by the \fIrandom number devices\fP,
-\fI/dev/random\fP\| and \fI/dev/urandom\fP.  These devices gather environmental
-noise from device drivers and return good random numbers, suitable for
-cryptographic use.  These numbers are also good for seeding TCP sequence
-numbers, and other places where it is desirable to have numbers which are not
-only random, but hard to predict by an attacker.
-.Dx
-clear_tmp_enable="NO"		# Clear /tmp at startup.
-.De
-In the old days, the startup sequence automatically deleted everything in the
-file system \fI/tmp\fP.  Sometimes this wasn't desirable, so now it's your
-choice.  Change this value to \f(CWYES\fP if you want the old behaviour.
-.Dx
-ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib"
-			# shared library search paths
-ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout"
-			# a.out shared library search paths
-.De
-These two variables are lists of the directories which are searched to find
-\fIELF\fP\| and \fIa.out\fP\| dynamic libraries, respectively.  See page
-\*[dynamic-libraries] for more details.  You would normally not remove anything
-from these lists, but you might want to add something.
-.Dx
-kern_securelevel_enable="NO"	# kernel security level (see init(8)), 
-kern_securelevel="-1"		# range: -1..3 ; `-1' is the most insecure
-update_motd="YES"			# update version info in /etc/motd (or NO)
-.De
-The kernel runs with four different levels of security.  Any superuser process
-can raise the security level, but only init can lower it.  The security levels
-are:
-.LB 16p 0 0 1 1
-.nr li*cnt!\n[li*lvl] -2\" Start at -1
-.LI
-Permanently insecure mode: always run the system in level 0 mode.  This is the
-default initial value.
-.LI
-Insecure mode: the immutable and append-only flags may be turned off.  All
-devices may be read or written subject to their permissions.
-.LI
-Secure mode: the system immutable and system append-only flags may not be turned
-off.  Disks for mounted filesystems, \fI/dev/mem\fP\| and \fI/dev/kmem\fP\| may
-not be opened for writing.
-.LI
-Highly secure mode.  This is the same as secure mode with the addition that
-disks may not be opened for writing (except by \fImount(2)\fP\|), whether or not
-they are mounted.  This level precludes tampering with filesystems by unmounting
-them, but it also prevents running \fInewfs(8)\fP\| while the system is
-multi-user.
-.LI
-Network secure mode.  This is the same as highly secure mode with the addition
-that IP packet filter rules (see page \*[firewall-configuration]) can not be
-changed and dummynet configuration can not be adjusted.  We don't discuss
-dummynet in this book.
-.Le
-To set the secure level to anything except -1, set the variable
-\f(CWkern_securelevel\fP to the value you want, and set
-\f(CWkern_securelevel_enable\fP to \f(CWYES\fP.
-.Dx
-start_vinum=""				# set to YES to start vinum
-vinum_drives=""				# put in names of disks containing vinum drives
-						# to start vinum on only specific disks.
-.De
-We will look at \fIVinum\fP\| on page \*[vinum].  There we put the following
-text into \fI/etc/rc.conf\fP\| in order to start it on booting:
-.Dx
-\f(CBstart_vinum="YES"			# set to YES to start vinum\fP
-.De
-.H3 "Our /etc/rc.conf"
-To summarize the changes from the defaults, our \fI/etc/rc.conf\fP\| should now
-contain the following entries:
-.Dx
-hostname="presto.example.org"
-firewall_enable="YES"		# Set to YES to enable firewall functionality
-firewall_type="client"		# Firewall type (see /etc/rc.firewall)
-natd_enable="YES"			# Enable natd (if firewall_enable == YES).
-natd_interface="tun0"		# Public interface or IPaddress to use.
-named_enable="YES"			# Run named, the DNS server (or NO).
-nfs_client_enable="YES"		# This host is an NFS client (or NO).
-nfs_server_enable="YES"		# This host is an NFS server (or NO).
-xntpd_enable="YES"			# Run xntpd Network Time Protocol (or NO).
-xntpd_flags=""				# Flags to xntpd (if enabled).
-dumpdev=/dev/ad0s1b			# Device name to crashdump to (if enabled).
-start_vinum="YES"			# set to YES to start vinum
-.De
-.sp -1v
-.H2 "Other configuration files"
-.Pn std-config-files
-This section handles the non-network configuration files in alphabetical order.
-See page \*[net-config-files] for a description of network configuration files.
-.H3 "/etc/aliases"
-.X "/etc/aliases"
-.File /etc/aliases 
-is used by \fIsendmail\fP\| to describe mail aliases.  See page \*[/etc/aliases]
-for more details.
-.H3 "/etc/csh.cshrc, /etc/csh.login, /etc/csh.logout"
-.X "/etc/csh.cshrc"
-.X "/etc/csh.login"
-.X "/etc/csh.logout"
-.X "csh, command"
-.X "command, csh"
-These are default initialization files for \fIcsh\fP.  See the man page
-\fIcsh(1)\fP\| for more details.
-.H3 "/etc/crontab"
-.X "/etc/crontab"
-.X "cron, dmon"
-.X "dmon, cron"
-.File /etc/crontab 
-describes the jobs to be performed by \fIcron\fP\| on behalf of the system.  See
-page \*[cron] for more details.
-.H3 "/etc/disktab"
-.X "/etc/disktab"
-.X "disklabel, command"
-.X "command, disklabel"
-.File /etc/disktab 
-contains descriptions of disk geometries for \fIdisklabel\fP.  See page
-\*[disktab] for further details.
-.H3 "/etc/fstab"
-.Pn /etc/fstab
-.X "/etc/fstab"
-.X "/etc/rc"
-.X "mount, command"
-.X "command, mount"
-.File /etc/fstab 
-contains a list of file systems known to the system.  The script
-.File /etc/rc 
-starts \fImount\fP\| twice during system startup first to mount the local file
-systems, and later to mount the NFS file system.  \fImount\fP\| will mount all
-file systems unless they are explicitly excluded.
-.P
-.X "/etc/fstab"
-.X "freebie.example.org"
-Here's a typical 
-.File /etc/fstab ,
-from host \fIfreebie.example.org\fP\|:
-.Dx
-/dev/ad0a				/			ufs		rw		1 1
-/dev/ad0s1b			none			swap		sw		0 0
-/dev/ad0s1e			/usr			ufs		rw		2 2
-/dev/da0b				none			swap		sw		0 0
-/dev/da0h				/src			ufs		rw		2 2
-/dev/da1h				/home			ufs		rw		2 2
-/dev/da2b				none			swap		sw		0 0
-/dev/da2e				/S			ufs		rw,noauto	2 2
-/dev/da3a				/mod			ufs		rw,noauto	0 0
-# /dev/da1e			/src			ufs		rw,noauto	0 0
-proc					/proc			procfs	rw		0 0
-# /dev/mcd0a			/cdrom		cd9660	ro,noauto	0 0
-/dev/cd0a				/cdrom/1		cd9660	ro,noauto	0 0
-/dev/cd1a				/cdrom/2		cd9660	ro,noauto	0 0
-/dev/cd2a				/cdrom/3		cd9660	ro,noauto	0 0
-/dev/cd3a				/cdrom/4		cd9660	ro,noauto	0 0
-/dev/cd4a				/cdrom/5		cd9660	ro,noauto	0 0
-/dev/cd5a				/cdrom/6		cd9660	ro,noauto	0 0
-/dev/cd6a				/cdrom/7		cd9660	ro,noauto	0 0
-/dev/cd7a				/cdrom/8		cd9660	ro,noauto	0 0
-presto:/				/presto		nfs		soft,rw,noauto 0 0
-presto:/usr			/presto/usr	nfs		soft,rw,noauto 0 0
-# presto:/var			/presto/var	nfs		soft,rw,noauto 0 0
-presto:/home			/presto/home	nfs		soft,rw,noauto 0 0
-bumble:/				/bumble		nfs		soft,rw,noauto 0 0
-bumble:/usr			/bumble/usr	nfs		soft,rw,noauto 0 0
-wait:/C				/C			nfs		soft,rw,noauto 0 0
-wait:/				/wait			nfs		soft,rw,noauto,tcp 0 0
+.X "init, S command"
+System V and Linux have the concept of \fIrun levels\fP, which are controlled by
+.Daemon init .
+Single-user mode corresponds to run level 1 or S, and multi-user mode
+corresponds roughly to System V run level 3 or Linux run level 4.  Nothing
+corresponds with the other System V run levels, in particular run level 2, which
+starts a System V system without networking.  Networking is such an integral
+part of FreeBSD that this is just not practicable.  FreeBSD
+.Daemon init
+now understands a syntax similar to the System V
+.Daemon init .
+Table
+.Sref \*[initlevel] \&
+shows the supported levels.  For example, to read in the
+.File /etc/ttys
+file, you could enter:
+.Dx 1
+# \f(CBinit q\fP
 .De
-This information has the following meaning:
-.Ls B
-.LI
-.X "ufs"
-.X "cd9660"
-.X "proc"
-The first column contains either the name of a device (for swap, \fIufs\fP\| and
-\fIcd9660\fP\| file systems), the name of a file system (for NFS file systems),
-or \f(CWproc\fP for the \fIproc\fP\| file system.  
-.LI
-The lines beginning with \f(CW#\fP are \fIcommented out\fP\|: \fImount\fP\|
-ignores them completely.
-.LI
-The second column is either a mount point or the keyword \f(CWnone\fP in the
-case of a partition which is not mounted, such as swap.
-.LI
-The third column is the kind of file system (or \f(CWswap\fP).
-.LI
-The fourth column are flags relating to the particular file system being
-mounted.  Some of the more common are:
 .br
+.sp -1v
 .ne 1i
-.TB "Mount flags"
+.Table-heading "init levels"
 .TS
-box,center,tab(#) ;
-| lfCWp9 | lw70 | .
-Flag#Purpose
-=
-ro#Mount read-only
-rw#Mount read/write
-sw#Mount as swap
-noauto#Don't mount automatically
-soft#T{
-For an NFS mount, fail if the request times out.  If you don't specify this
-option, NFS will keep retrying for ever.
-T}
-tcp#T{
-For NFS only, mount with TCP transport rather than the standard UDP transport.
-This feature is supported almost only by BSD systems\(emcheck whether the other
-end offers TCP transport.
-T}
+tab(#) ;
+r | l | l .
+Level#Signal#Action
+_
+0#SIGUSR2#Halt and turn the power off
+1#SIGTERM#Go to single-user mode
+6#SIGINT#Reboot the machine
+c#SIGTSTP#Block further logins
+q#SIGHUP#Rescan the ttys(5) file
 .TE
+.Tn initlevel
 .sp 1.5v
-For NFS mount flags, see \*[chnfs], page \*[NFS-mount-flags].
-.Le
-Why are there so many entries with the \f(CWnoauto\fP keyword?	If you don't
-bother to mount them, why bother to mention them?
-.P
-If file system has an entry in 
-.File /etc/fstab ,
-\fImount\fP\| is clever enough to get all the information it needs from this
-file.  You just need to specify the name of the mount point or the name of the
-special device (for \fIufs\fP\| and \fIcd9660\fP\|) or the remote file system
-(for NFS).  This is particularly useful for \fIcd9660\fP.  Without an entry in
-.File /etc/fstab ,
-you would have to write:
-.Dx
-# \f(CBmount -t cd9660 -o ro /dev/cd0a /cdrom\fP
-.De
-With the entry, you can simplify this to:
-.Dx
-# \f(CBmount /cdrom\fP
-.De
-.SPUP
-.H3 "/etc/gettytab"
-.X "/etc/gettytab"
-.X "getty, dmon"
-.X "dmon, getty"
-.File /etc/gettytab 
-describes profiles for \fIgetty\fP.  You probably don't need it; check the man
-page (on your system, but not in this book) if you're interested.
-.H3 "/etc/group"
-.X "/etc/group"
-.File /etc/group 
-defines the groups known to the system.  See page \*[group] for more details.
-.H3 "/etc/login.conf"
-.X "/etc/login.conf"
-.File /etc/login.conf 
-describes user parameters set at login time.  See page \*[login-class] for more
-details.
-.H3 "/etc/manpath.config"
-.X "/etc/manpath.config"
-.X "man, command"
-.X "command, man"
-.File /etc/manpath.config 
-is a configuration file for \fIman\fP.  You don't usually need to change this
-file.
-.H3 "/etc/master.passwd"
-.X "/etc/master.passwd"
-.File /etc/master.passwd 
-is the real password file.  We looked at it on page \*[master-passwd].
-.H3 "/etc/motd"
-.X "/etc/motd"
-.X "message of the day"
-.File /etc/motd 
-(\fImessage of the day\fP\|) is a file which is printed out at login.  See page
-\*[motd] for an example.
-.H3 "/etc/passwd"
-.X "/etc/passwd"
-.File /etc/passwd 
-is the old-style password file.  It is now present only for programs which
-expect to read it.  See page \*[master-passwd] for more details.
-.H3 "/etc/printcap"
-.X "/etc/printcap"
-.File /etc/printcap 
-describes the printers connected to a system.  See page \*[printcap] for more
-details.
-.H3 "/etc/profile"
-.X "/etc/profile"
-.File /etc/profile 
-is a default startup file for Bourne-style shells.  See page \*[profile] for
-more details.
-.H3 "/etc/pwd.db"
-.X "/etc/pwd.db"
-.File /etc/pwd.db 
-is a machine-readable form of the user database with the passwords removed.  We
-looked at it on page \*[master-passwd].
-.H3 "/etc/rc"
-.X "/etc/rc"
-.File /etc/rc 
-is the main script which starts up the system.  It uses the other files whose
-names start with
-.File /etc/rc 
-to perform specific initialization.  See page \*[init] for more details.
-.H3 "/etc/rc.i386"
-.X "/etc/rc.i386"
-.File /etc/rc.i386 
-is used to initialize features specific to the Intel 386 architecture, such as
-SCO and Linux emulation.  You don't normally need to look at or change this
-file.
-.H3 "/etc/rc.local"
-.X "/etc/rc.local"
-.X "/etc/rc.conf"
-.File /etc/rc.local 
-is the configuration file which you use to include specific commands which are
-not catered for in
-.File /etc/rc.conf .
-We've seen a few examples in the book; check the index for more information.
-.H3 "/etc/rc.pccard"
-.X "/etc/rc.pccard"
-.File /etc/rc.pccard 
-sets up laptops using the PCCARD bus.  We don't discuss this in this book.
-.H3 "/etc/rc.serial"
-.X "/etc/rc.serial"
-.File /etc/rc.serial 
-sets default values for serial devices.  We don't discuss this in this book.
-.H3 "/etc/sendmail.cf"
-.X "/etc/sendmail.cf"
-.X "sendmail, dmon"
-.X "dmon, sendmail"
-.File /etc/sendmail.cf 
-is the main configuration file for \fIsendmail\fP.  We will look at it on page
-\*[sendmail].
-.H3 "/etc/shells"
-.X "/etc/shells"
-.X "ftp, command"
-.X "command, ftp"
-.File /etc/shells 
-is a list of valid shells, used by \fIftp\fP\| and some other programs.  See
-page \*[/etc/shells] for more details.
-.H3 "/etc/spwd.db"
-.X "/etc/spwd.db"
-.File /etc/spwd.db 
-is a machine-readable form of the user database with the passwords intact.  We
-looked at it on page \*[master-passwd].
-.H3 "/etc/syslog.conf"
-.X "/etc/syslog.conf"
-.X "syslogd, dmon"
-.X "dmon, syslogd"
-.File /etc/syslog.conf 
-is the configuration file for \fIsyslogd\fP.  We will look at it on page
-\*[syslog.conf].
-.H3 "/etc/termcap"
-.X "/etc/termcap"
-.X "terminal capability"
-.X "capability, terminal"
-.File /etc/termcap 
-(\fIterminal capabilities\fP\|) describes terminal control sequences.  By
-default, programs use the value of the \f(CWTERM\fP environment variable to look
-up the terminal capabilities in this database.  See page
-\*[environment-variables] for more details.
-.H3 "/etc/ttys"
-.X "/etc/ttys"
-.X "init, dmon"
-.X "dmon, init"
-.File /etc/ttys 
-is a file which describes terminals and pseudo-terminals to \fIinit\fP.  We've
-looked at it in a number of places: check the index.
-.P
-.X "/etc/ttys"
-Here's an excerpt from the default 
-.File /etc/ttys :
+You can also enter single-user mode from a running FreeBSD system with the
+.Command shutdown
+command, which we'll look at in the next section.
+.H3 "Password protecting single-user mode"
+If you run a secure environment, you could be concerned about the fact that you
+can start up in single-user mode without entering a password.  That's the
+default\(emnormally, if somebody can access your system console, a password is
+no longer much use, and it can be a nuisance\(embut you can change it.  Find
+this entry in
+.File /etc/ttys ,
+and change the word \f(CWsecure\fP to
+\f(CWinsecure\fP:
 .Dx
-# This entry needed for asking password when init goes to single-user mode
 # If you want to be asked for password, change "secure" to "insecure" here
-console	none					unknown	off secure
-.De
-.X "/dev/ttyv0"
-The system console.  This is not a real terminal: it can be moved from one
-device to another.  By default, it corresponds to \fI/dev/ttyv0\fP\| (the next
-entry).
-.Dx
-ttyv0	"/usr/libexec/getty Pc"		cons25	on  secure
-.De
-This is the first virtual terminal, the one which you get automatically at boot
-time.  To change to the others, press \fBAlt\fP-\fBF\f(BIx\fR, where \f(BIx\fP\|
-is between 1 and 16.  This will give you one of the others:
-.Dx
-# Virtual terminals
-ttyv1	"/usr/libexec/getty Pc"		cons25	on secure
-ttyv2	"/usr/libexec/getty Pc"		cons25	on secure
-ttyv3	"/usr/libexec/getty Pc"		cons25	off secure
-.De
-The default kernel supports four virtual terminals.  See page \*[config-MAXCONS]
-for details of how to configure more.  As we saw on page \*[getty-setup], you
-need to keep one \f(CWoff\fP if you want to run X.
-.Dx
-# Serial terminals
-ttyd0	"/usr/libexec/getty std.9600"	unknown	off secure
-ttyd1	"/usr/libexec/getty std.9600"	unknown	off secure
-ttyd2	"/usr/libexec/getty std.9600"	unknown	off secure
-ttyd3	"/usr/libexec/getty std.9600"	unknown	off secure
-.De
-These are the serial ports on your machine.  It doesn't matter if it contains
-names which correspond to non-existent hardware, such as \fI/dev/ttyd3\fP, as
-long as you don't try to enable them.
-.Dx
-# Pseudo terminals
-ttyp0		none			network
-ttyp1		none			network
-.De
-There's a whole list of these.  The purpose here is to tell network programs
-the properties of the terminal: in particular, they're not \f(CWsecure\fP, which
-means that you're not allowed to log in on them as \f(CWroot\fP.
-.H3 "/etc/periodic/"
-The directory \fI/etc/periodic\fP\| contains three directories used by
-\fIcron\fP\| at regular intervals: \fIdaily\fP\|, \fIweekly\fP\| and
-\fImonthly\fP.  The directories contain a number of files for performing
-specific tasks.  For example, \fI/etc/periodic/daily\fP\| contains the following
-files:
-.Dx
-  -rwxr-xr-x  1 grog  example   321 Apr  6 18:25 100.clean-disks
-  -rwxr-xr-x  1 grog  example   651 Apr  6 18:25 110.clean-tmps
-  -rwxr-xr-x  1 grog  example   231 Apr  6 18:25 120.clean-preserve
-  -rwxr-xr-x  1 grog  example   223 Aug 18  1997 130.clean-msgs
-  -rwxr-xr-x  1 grog  example   217 Apr  6 18:25 140.clean-rwho
-  -rwxr-xr-x  1 grog  example  1059 May 25  1998 200.backup-passwd
-  -rwxr-xr-x  1 grog  example   499 Aug 17  1997 210.backup-aliases
-  -rwxr-xr-x  1 grog  example   322 Aug 18  1997 220.backup-distfile
-  -rwxr-xr-x  1 grog  example   458 Aug 18  1997 300.calendar
-  -rwxr-xr-x  1 grog  example   410 Aug 18  1997 310.accounting
-  -rwxr-xr-x  1 grog  example   186 Aug 18  1997 320.rdist
-  -rwxr-xr-x  1 grog  example   253 Aug 17  1997 330.news
-  -rwxr-xr-x  1 grog  example   321 Jan  2 07:37 340.uucp
-  -rwxr-xr-x  1 grog  example   184 Aug 17  1997 400.status-disks
-  -rwxr-xr-x  1 grog  example   182 Aug 18  1997 410.status-uucp
-  -rwxr-xr-x  1 grog  example   179 Aug 18  1997 420.status-network
-  -rwxr-xr-x  1 grog  example   284 Oct  6  1998 430.status-rwho
-  -rwxr-xr-x  1 grog  example   425 Apr 18  1998 440.status-mailq
-  -rwxr-xr-x  1 grog  example   261 Aug 18  1997 450.status-security
-  -rwxr-xr-x  1 grog  example   432 Feb  9  1998 460.status-mail-rejects
-  -rwxr-xr-x  1 grog  example   288 Aug 17  1997 999.local
-.De
-The files are executed in the order of their names, so the names consist of two
-parts: a number indicating the sequence, and a name indicating the function.
-This method is new with FreeBSD version 3.  In older versions of FreeBSD, these
-functions were performed by files with the names \fI/etc/daily\fP,
-\fI/etc/weekly\fP\| and \fI/etc/monthly\fP.  See page \*[cron] for more details
-of \fIcron\fP.
-.H2 "Network configuration files"
-.Pn net-config-files
-.X "/etc/rc.network"
-.X "/etc/network"
-.X "/etc/rc.conf"
-This section describes the network configuration files in alphabetical order.
-The main script for starting the network is
-.File /etc/rc.network ,
-which in earlier BSD versions, including FreeBSD, was called
-.File /etc/network .
-You normally don't change this file: it reads all the necessary definitions from
-.File /etc/rc.conf ,
-and that's the file you should change.
-.H3 "/etc/exports"
-.X "/etc/exports"
-.File /etc/exports 
-is a list of file systems which should be NFS exported.  We will look at it on
-page \*[/etc/exports].  See also the man page \fIexports(5)\fP.
-.H3 "/etc/rc.firewall"
-.X "/etc/rc.firewall"
-.X "ipfw, dmon"
-.X "dmon, ipfw"
-.File /etc/rc.firewall 
-is used to initialize the packet filtering firewall \fIipfw\fP.  See page
-\*[firewall-configuration] for further details.
-.H3 "/etc/ftpusers"
-.X "/etc/ftpusers"
-.X "ftp, command"
-.X "command, ftp"
-.File /etc/ftpusers 
-is a list of users who are \fInot\fP\| allowed to connect to this system using
-\fIftp\fP.
-.H3 "/etc/host.conf"
-.X "/etc/host.conf"
-.X "/etc/hosts"
-.File /etc/host.conf 
-describes the order in which to perform name resolution.  We have three choices:
-BIND,
-.File /etc/hosts ,
-and NIS.  The file simply specifies which of these options should be used, and
-in which order:
-.Dx
-# $I\&d: host.conf,v 1.2 1993/11/07 01:02:57 wollman Exp $
-# Default is to use the nameserver first
-bind
-# If that doesn't work, then try the /etc/hosts file
-hosts
-# If you have YP/NIS configured, uncomment the next line
-# nis
+console none                            unknown off \f(CBin\fPsecure
 .De
-.SPUP
-.H3 "/etc/hosts"
-.Pn etc-hosts
-.X "/etc/hosts"
-For a small network, especially if you're not permanently connected to the
-Internet, you have the option of placing the addresses of the systems you want
-to talk to in a file called
-.File /etc/hosts .
-This file is simply a list of IP addresses and host names, for example:
-.Dx
-# Local network host addresses
-#
-# loopback address for all systems
-127.1 loopback local localhost
-
-###### domain example.com. 
-#
-223.147.37.1   freebie freebie.example.org	  # FreeBSD 3.0
-223.147.37.2   presto.example.org presto		  # 66 MHz 486 (BSD UNIX)
-223.147.37.3   bumble bumble.example.org		  # 33 MHz 486 (UNIX SVR3.2)
-223.147.37.4   wait wait.example.org			  # 33 MHz 486 (DOS)
-223.147.37.129 solo solo.example.org   lxn	  # LXN
-223.147.37.132 dinosaur dinosaur.example.org	  # 25 MHz 386 running DOS
-223.147.37.133 andante andante.example.org	  # Toshiba laptop - 16 MHz 386SX
-223.147.37.135 onlyyou onlyyou.example.org	  # Consensys Destiny machine
-223.147.37.136 zaphod zaphod.example.org		  # 2-headed X machine
-.De
-Obviously, you need to set up this file yourself, and you need it on every
-machine on the network.  As you can see, a system can have more than one name:
-just put as many names as you want behind the IP address.  This method is hard
-to maintain: a better alternative is the Domain Name Service, which we discuss
-in Chapter \*[nchdns].
-.H3 "/etc/hosts.equiv"
-.X "/etc/hosts.equiv"
-.File /etc/hosts.equiv 
-is a list of hosts whose users may use \fIrsh\fP\| to access this system without
-supplying a password.  We'll look at it on page \*[hosts-equiv].
-.H3 "/etc/hosts.lpd"
-.X "/etc/hosts.lpd"
-.X "lpd, dmon"
-.X "dmon, lpd"
-.File /etc/hosts.lpd
-is a list of hosts which can use the \fIlpd\fP\| spooler on this system.
-.H3 "/etc/inetd.conf"
-.X "/etc/inetd.conf"
-.X "inetd, dmon"
-.X "dmon, inetd"
-.File /etc/inetd.conf 
-is the configuration file for \fIinetd\fP, the Internet d\(aemon.  It dates back
-to the original implementation of TCP/IP in 4.2BSD, and the format is the same
-for all versions of UNIX.  We have looked at various modifications to this file
-throughout the network part of the book.  See the index (\f(CWinetd.conf\fP) and
-the man page \fIinetd.conf(5)\fP\| for further details.
-.H3 "/etc/namedb/named.conf"
-.X "named, dmon"
-.X "dmon, named"
-.X "/etc/named/named.conf"
-\fI/etc/named/named.conf\fP is the main configuration file for \fInamed\fP, the
-Domain Name Service d\(aemon.  We will look at it in \*[chdns].  Previous
-versions of \fInamed\fP\| used a different form of configuration file which was
-stored in \fI/etc/named.boot\fP.
-.H3 "/etc/networks"
-.X "/etc/networks"
-.File /etc/networks 
-is a list of networks in the Internet.  Although this sounds
-like a good idea, it is almost useless: if you connect to the Internet, you
-should use a name server, which supplants this file.
-.H3 "/etc/protocols"
-.X "/etc/protocols"
-.File /etc/protocols 
-is a list of known protocols which run on the IP layer.  This file should be
-seen and not changed.
-.H3 "/etc/rc.network"
-.X "/etc/rc.network"
-.File /etc/rc.network 
-is the main script which starts up the network.  You shouldn't need to change
-this file.
-.H3 "/etc/services"
-.X "/etc/services"
-.File /etc/services ,
-a list of the IP services which this system supports.  Like
-.File /etc/protocols ,
-you should not change this file.
-.H2 "Obsolete configuration files"
-.H3 "/etc/sysconfig"
-.X "/etc/sysconfig"
-.File /etc/sysconfig 
-was a file which contained all the site-specific configuration definitions.  Its
-name has been changed to
-.File /etc/rc.conf .
-.H3 "/etc/netstart"
-.X "/etc/netstart"
-.X "/etc/rc"
-.X "/etc/rc.network"
-.File /etc/netstart 
-was a script called by 
-.File /etc/rc 
-to start up the network.  Its name has now been changed to
-.File /etc/rc.network .
-FreeBSD still includes a file
-.File /etc/netstart ,
-but its only purpose is to start the network in single-user mode.
-.H2 "Shutting down the system"
+If you do this, you will be in real trouble if you forget the root password.
+.H2 "Shutting down and rebooting the system"
 .Pn shutdown
-.X "shutdown, command"
-.X "command, shutdown"
 FreeBSD uses a number of sophisticated techniques to achieve its high
 performance.  In particular, when you write data to a disk, the system doesn't
-put it on the disk immediately: it waits for more data to arrive, which improves
-performance dramatically, since it reduces the number of disk accesses by up to
-several orders of magnitude.
+put it on the disk immediately: it waits for more data to arrive, which reduces
+the number of disk accesses by up to several orders of magnitude and thus
+improves performance dramatically.
 .P
-.X "fsck, command"
-.X "command, fsck"
 The result of turning power off before the data is written is equally dramatic.
 You may just lose the data, but if the data is information on a change in file
-system structure, your file system will be broken.  To check for this, the
-system runs a program called \fIfsck\fP\| (File System Check) at startup.
-\fIfsck\fP\| can repair minor damage, but it's obviously a better idea to avoid
-damage by ensuring that the system is shut down in an orderly way.
+system structure, your file system will be damaged.  To check for this, the
+system runs a program called
+.Command fsck
+(File System Check) at startup.
+.Command fsck
+can repair minor damage, but it's obviously a better idea to avoid damage by
+ensuring that the system is shut down in an orderly way.
 .Highlight
 Never stop your machine by just turning off the power.  The results could be
 devastating.
 .End-highlight
 .P
-The correct way to shut a system down is with the \fIshutdown\fP\| command.  To
-quote the man page \fIshutdown(8)\fP\|:
+The correct way to shut a system down is with the
+.Command shutdown
+command.  To quote the man page \fIshutdown(8)\fP\/:
 .P
 .in +1m
 .X hacker
 .X guru
-\fIShutdown provides an automated shutdown procedure for super-users to nicely
+.vs 10
+.ps 9
+Shutdown provides an automated shutdown procedure for super-users to nicely
 notify users when the system is shutting down, saving them from system
 administrators, hackers, and gurus, who would otherwise not bother with such
-niceties.\fP
+niceties.
+.br
+.ps
+.vs
 .in
 .P
 This command has a number of useful options:
@@ -2123,34 +1009,477 @@
 Use the \f(CW-r\fP option to reboot the computer.  You sometimes need to do
 this, for example after installing a new kernel.
 .LI
-Use the \f(CW-h\fP option to stop the machine.  This is the normal case, but it
-isn't the default.
+Use the \f(CW-h\fP option to stop the machine.  This isn't the default.
 .LI
-Without an option, \f(CWshutdown\fP attempts to put the machine in single user
-mode.  This doesn't always work as well as booting in single user mode.
+Without an option, \f(CWshutdown\fP attempts to put the machine in single-user
+mode.  This doesn't always work as well as booting in single-user mode.
 .LI
-Shutdown takes a time parameter which tells it when to actually perform the
-shutdown.  This is useful in a multi-user environment, but normally you'll want
-to shutdown now, so \fIshutdown\fP\| understands the keyword \f(CWnow\fP.
+.Command shutdown
+requires a time parameter to tell it when to actually perform the shutdown.
+This is useful in a multi-user environment, but normally you'll want to shut
+down immediately, so
+.Command shutdown
+understands the keyword \f(CWnow\fP.
 .Le
-In the normal case, where you want to stop the machine right now so you can turn
-the power off, you would type:
+In the normal case, where you want to stop the machine immediately so you can
+turn the power off, you type:
 .Dx
-# shutdown -h now
+# \f(CBshutdown -h now\fP
 Feb  4 12:38:36 freebie shutdown: halt by grog:
 Feb  4 12:38:39 freebie syslogd: exiting on signal 15
-
 syncing disks... done
-
 The operating system has halted.
 Please press any key to reboot.
 .De
 Be sure to wait for this message before you turn off the power.
-.H3 "Rebooting"
-To reboot the machine, enter
+.H2 "FreeBSD without disks"
+.\" XXX check the changes to rc.diskless.
+.Pn diskless
+Disks are getting much cheaper and their capacity is continually increasing, so
+it's easy to think that there would never be a reason to want to run FreeBSD
+without a disk at all.  Still, there are reasons:
+.Ls B
+.LI
+Disks are unreliable.  For a machine that you want to keep running for a long
+time, the most likely hardware failure is a disk failure.
+.LI
+Disks are noisy.  There are places where you might not want the noise.
+.LI
+Disks are sensitive.  You may not want to place them in some environments.
+.LI
+.\" XXX
+You may find systems administration easier if all the configuration files are in
+one place.
+.LI
+The ``sweet spot'' for hard disk prices, the place where you get the most
+storage for your dollar, is currently around 80 GB, about 10 times what it was
+five years before.  You may not want that much disk space for any one machine,
+but for a group, it might make more sense to have a disk for the whole group on
+one machine.
+.Le
+There are a number of ways to run a system without a disk.  You can replace the
+disk with something else, such as a flash card, floppy disk or CD-ROM drive, or
+you can access a remote disk via a network.  We'll consider network booting in
+the following section, and we'll look at the disk replacement strategy on page
+.Sref \*[diskersatz] .
+.H2 "Network booting"
+.Pn netboot
+Network booting is not a new idea.  It was the original reason for Sun's
+\fINetwork File System\fP, which we looked at in Chapters
+.Sref \*[nchclient] \&
+and
+.Sref \*[nchserver] .
+Nowadays people normally use NFS for additional shared file systems; in the case
+of net booting, you mount your own private NFS file system as your root file
+system.  Clearly, the first thing you need to do is to create this file system.
+.P
+Next, you need to find a way to boot the system.  There are a few possibilities
+here:
+.Ls B
+.LI
+You can boot a minimal system from floppy disk or CD-ROM and use this to mount
+the file systems remotely.  This is different from running the system from
+floppy or CD-ROM: in this case, the disk device serves effectively as a
+bootstrap, and the operating system is located elsewhere.
+.LI
+You can create a boot PROM for your network card and use that to boot.
+.LI
+You can use PXE if your card supports it.
+.Le
+Whichever method you use, you need to set up a network interface very early.  In
+Chapter
+.Sref \*[nchnetsetup] \&
+we saw that the network setup is part of the system initialization, and that the
+configuration is stored in
+.File /etc/rc.conf .
+.X "DHCP"
+For a network boot, the network must be running before the kernel can be loaded,
+so that method won't work here.  Instead, we use \fIDHCP\fP, which we looked at
+on page
+.Sref \*[DHCP] .
+We could also use the
+.Daemon bootpd
+daemon, but it's more limited, so it's better to use \fIDHCP\fP.
+.P
+If you use floppy or CD-ROM,  you could theoretically load the bootstrap from
+that device.  This isn't the same as the alternative we'll see on page
+.Sref \*[diskersatz] ,
+where we load the kernel from floppy or CD: here we only load the bootstrap and
+then load the kernel from the network.  This minor difference has significant
+implications on the ease of system administration.
+.P
+.X "TFTP"
+.X "Trivial File Transfer Protocol"
+The next step is to actually transfer the data.  We do this with \fITFTP\fP, the
+\fITrivial File Transfer Protocol\fP.  As the name suggests, \fITFTP\fP\/ is a
+relatively simple replacement for \fIFTP\fP.  In particular, it knows almost
+nothing about security.  If you use \fITFTP\fP, make sure that it can't be
+accessed from outside your network, for example by using a firewall.  The
+default firewall rules block \fITFTP\fP.
+.P
+.ne 2v
+In the following sections we'll look at the example of setting up
+\fIbumble.example.org\fP\/ as a diskless machine.
+.H3 "Setting up the file systems"
+There are a number of ways to put the files on the NFS server:
+.Ls B
+.LI
+You might copy the files in the root and
+.Directory /usr
+file systems of the server machine.
+.LI
+You could install FreeBSD on a separate disk and NFS mount it where the remote
+system can access it.  By itself, this doesn't have much of an advantage over
+having a local disk on the machine, but it's possible to install a number of
+systems on a single disk and have different machines access the different
+installations.
+.LI
+You could combine those two methods and copy a freshly installed system to a
+file system where you need it.
+.Le
+We'll look at refining this technique after the system is up and running.
+.H3 "Building a diskless kernel"
+You still need to build a special kernel for diskless workstations.  The
+following entries in the configuration file are relevant:
+.Dx
+# Kernel BOOTP support
+
+options         BOOTP           # Use BOOTP to obtain IP address/hostname
+options         BOOTP_NFSROOT   # NFS mount root filesystem using BOOTP info
+options         BOOTP_NFSV3     # Use NFS v3 to NFS mount root
+options         BOOTP_COMPAT    # Workaround for broken bootp daemons.
+options         BOOTP_WIRED_TO=fxp0 # Use interface fxp0 for BOOTP
+.De
+Only the first two are required.  If you use \f(CWBOOTP_WIRED_TO\fP, make sure
+that the interface name matches the network card you are using.
+.P
+Build the kernel, as described on page
+.Sref \*[buildkernel] .
+To install, you need to set the \f(CWDESTDIR\fP variable to specify the
+directory in which you want to install the kernel:
+.Dx 1
+# \f(CBmake install DESTDIR=/src/nodisk/bumble\fP
+.De
+.SPUP
+.H3 "Configuring TFTP"
+Next we need to set up \fITFTP\fP\/ to deliver the kernel to the system.  The
+first question is whether the firmware on the Ethernet card can load the kernel
+directly or not.  Some boot PROMs run in 16 bit 8086 mode, which limits their
+addressing capability to 640 kB.  That's too small for any FreeBSD kernel, and
+if you try to load the kernel directly you'll get a message like this:
+.Dx
+File transfer error: Image file too large for low memory.
+.De
+In this case, you'll need to load a loader, such as
+.Command pxeboot .
+.P
+.ne 3v
+As a minor concession to security, the
+.Daemon tftpd
+daemon refuses to access files outside its data directory hierarchy, which by
+convention is called
+.Directory /tftpboot .
+You can use symbolic links, however.  It makes more sense to have the kernel in
+the same place as on machines with disks, namely in
+.File /boot/kernel/kernel
+on the root file system, so we create symbolic links:
+.Dx
+# \f(CBmkdir /tftpboot\fP
+# \f(CBln -s /src/nodisk/bumble/boot/kernel/kernel /tftpboot/kernel.bumble\fP
+# \f(CBln -s /boot/pxeboot /tftpboot/pxeboot\fP
+.De
+We also need to ensure that we can start the \fITFTP\fP\/ daemon,
+.Daemon tftpd .
+Unless you're constantly booting, there's no need to have it running constantly:
+just enable it in
+.File /etc/inetd.conf ,
+which has the following entries in the distribution file:
+.Dx
+#tftp   dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -s /tftpboot
+#tftp   dgram   udp6    wait    root    /usr/libexec/tftpd      tftpd -s /tftpboot
+.De
+These are entries for IPv4 and IPv6 respectively.
+We enable
+.Daemon tftpd
+by uncommenting the first line (removing the \f(CW#\fP character) and sending a
+HUP signal to
+.Daemon inetd \/:
 .Dx
-# \f(CBshutdown -r now\fP		\fIor\fP\|
-# \f(CBreboot\fP				\fIor\fP\|
-\fBCTRL\fP-\fBALT\fP-\fBDEL\fP
+# \f(CBkillall -1 inetd\fP                              \fIsend a SIGHUP\fP\/
 .De
-.sp -1v
+.De
+.SPUP
+.H3 "Configuring DHCP"
+We already looked at
+.Daemon dhcpd \/'s
+configuration file
+.File /usr/local/etc/dhcpd.conf
+on page
+.Sref \*[DHCP] ,
+In addition to the information we looked at there, we need to know what file to
+load, which system to load it from, and where the root file system is located.
+For our diskless system \fIbumble\fP\/ we might add the text in bold to the
+configuration we saw on page
+.Sref \*[DHCP-server] \/:
+.Dx
+subnet 223.147.37.0 netmask 255.255.255.0 {
+  range 223.147.37.90 223.147.37.110;
+  option domain-name-servers freebie.example.com, presto.example.com;
+  option domain-name "example.com";
+  option routers gw.example.com;
+  option subnet-mask 255.255.255.0;
+  option broadcast-address 223.147.37.255;
+  default-lease-time 86400;
+  max-lease-time 259200;
+  host sydney {
+    hardware ethernet 0:50:da:cf:7:35;
+  }
+
+.ft CB
+  host bumble {
+    hardware ethernet 0:50:da:cf:17:d3;
+    next-server presto.example.com;             \fIonly if on a different machine\fP\/
+    filename "/tftpboot/bumble/kernel.bumble";  \fIfor direct booting\fP\/
+    filename "/tftpboot/pxeboot";               \fIfor PXE\fP\/
+    option root-path 223.147.37.1:/src/nodisk/bumble;
+  }
+.ft CW
+}
+.De
+.ne 3v
+There are a few things to note here:
+.Ls B
+.LI
+The \f(CWnext-server\fP line tells where the \fITFTP\fP\/ server is located.  If
+it's the same as the machine running the \fIDHCP\fP\/ server, you don't need
+this specification.
+.LI
+As we've seen, hardware restrictions may make it impossible to load the kernel
+directly.  In this case you need to load a loader.  The only one that FreeBSD
+currently supplies is
+.Command pxeboot .\*F
+.FS
+See
+.URI http://www.freebsd.org/doc/en_US.ISO8859-1/articles/pxe/index.html
+for documentation for setting up
+.Command pxeboot
+on FreeBSD.
+.FE
+Choose one of the two \f(CWfilename\fP lines.
+.LI
+You have to specify the root path as an IP address, because no name services are
+available when the root file system is mounted.
+.Le
+.SPUP
+.H3 "Other Ethernet bootstraps"
+If your Ethernet card doesn't have a boot ROM, you can make one with the
+.Directory net/etherboot
+port, or you can copy the necessary information to a floppy disk or CD-R and use
+that to start the bootstrap.  In either case, you first build the port and then
+copy the data to your selected medium.  For example, to create a boot disk for a
+Compex RL2000 card, a 10 Mb/s PCI NE-2000 clone, you first look up the card in
+.File -n /usr/ports/net/etherboot/work/etherboot-5.0.5/src/NIC ,
+where you read:
+.Dx
+# Compex RL2000
+compexrl2000    ns8390          0x11f6,0x1401
+.De
+This information is mainly for the build process; you just need to know the
+\f(CWcompexrl2000\fP, which is the name of the driver.
+.Dx
+# \f(CBcd /usr/ports/net/etherboot\fP
+# \f(CBmake all\fP
+# \f(CBcd work/ether*/src\fP
+# \f(CBcat bin/boot1a.bin bin32/compexrl2000.lzrom > /dev/fd0\fP
+.De
+.File -n bin/boot1a.bin
+is a disk bootstrap intended to load and start
+.File -n compexrl2000.lzrom .
+You can also put
+.File -n compexrl2000.lzrom
+in an EPROM.  This requires a little more care, and the information is subject
+to change.  You can find detailed information about how to proceed at the web
+site
+.URI http://etherboot.sourceforge.net/doc/html/documentation.html .
+.P
+.Command etherboot
+uses NFS, not TFTP.  As a result, things change: you can use absolute path
+names, and you can't use symbolic links.  An entry in
+.File -n dhcpd.conf
+for this method might look like this:
+.Dx
+  host bumble {
+    hardware ethernet 00:80:48:e6:a0:61;
+    filename "/src/nodisk/bumble/boot/kernel/kernel";
+    fixed-address bumble.example.org;
+    option root-path "192.109.197.82:/src/nodisk/bumble";
+  }
+.De
+When booting in this manner, you don't see any boot messages.  The boot loader
+outputs several screens full of periods, each indicating a downloaded block.  It
+finishes like this:
+.Dx
+\&................................done
+\&.
+.De
+After that, nothing appears on the screen for quite some time.  In fact, the
+boot is proceeding normally, and the next thing you see is a login prompt.
+.br
+.ne 10v
+.H3 "Configuring the machine"
+Setting up a diskless machine is not too difficult, but there are some gotchas:
+.Ls B
+.LI
+Currently, locking across NFS does not work properly.  As a result, you may see
+messages like this:
+.Dx
+Dec 11 14:18:50 bumble sm-mta[141]: NOQUEUE: SYSERR(root): cannot flock(/var/run/
+sendmail.pid, fd=6, type=2, omode=40001, euid=0): Operation not supported
+.De
+One solution to this problem is to mount
+.Directory /var
+as an MD (memory) file system.  This is what currently happens by default,
+though it's subject to change: at startup, when the system detects that it is
+running diskless (via the sysctl \f(CWvfs.nfs.diskless_valid\fP), it invokes the
+configuration file
+.File /etc/rc.diskless1 .
+This file in turn causes the file
+.File /etc/rc.diskless2
+to be invoked later in the startup procedure.  Each of these files adds an MD
+file system.  In the course of time, this will be phased out and replaced by the
+traditional configuration via
+.File /etc/fstab ,
+but at the moment this file has no provision for creating MD file systems.
+.P
+You should probably look at these files carefully: they may need some tailoring
+to your requirements.
+.LI
+It is currently not possible to add swap on an NFS file system.
+.Command swapon
+(usually invoked from the startup scripts) reports, incorrectly:
+.Dx
+Dec 11 14:18:46 bumble savecore: 192.109.197.82:/src/nodisk/swap/bumble: No such
+ file or directory
+.De
+This, too, will
+change; in the meantime, it \fIis\fP\/ possible to mount swap on files, even if
+they are NFS mounted.  This means that the first of the following entries in
+.File /etc/fstab
+will not work, but the second will:
+.Dx
+192.109.197.82:/src/nodisk/swap/bumble  none swap  sw           0       0
+/src/nodisk/swap/bumble                 none swap  sw           0       0
+echunga:/src            /src            nfs     rw              0       0
+.De
+.ne 5v
+The reason here is the third line:
+.Directory -n /src/nodisk/swap/bumble
+is NFS mounted, so this is a swap-to-file situation.  For this to work, you may
+have to add the following line at the end of your
+.File /etc/rc.diskless2 \/:
+.Dx
+swapon -a
+.De
+.ne 3v
+This is because the standard system startup mounts swap before mounting
+additional NFS file systems.  If you place the swap file on the root file
+system, it will still work, but frequently you will want the root file system to
+be read-only to be able to share it between several machines.
+.LI
+If the machine panics, it's not possible to take a dump, because you have no
+disk.  The only alternative would be a kernel debugger.
+.Le
+.H3 "Sharing system files between multiple machines"
+In many cases, you may have a number of machines that you want to run diskless.
+If you have enough disk (one image for each machine), you don't have anything to
+worry about, but often it may be attractive to share the system files between
+them.  There are a lot of things to consider here:
+.Ls B
+.LI
+Obviously, any changeable data specific to a system can't be shared.
+.LI
+To ensure that things don't change, you should mount shared resources read-only.
+.LI
+Refer to Table
+.Sref "\*[dirowners]" \&
+on page
+.Sref "\*[dirowners-page]" \&
+for an overview of FreeBSD installed directories.  Of these directories, only
+.Directory /etc
+and
+.Directory /usr/local/etc
+must be specific for a particular system, though there are some other issues:
+.Ls B
+.LI
+Installing ports, for example, will install ports for all systems.  That's not
+necessarily a bad thing, but if you have two systems both installing software in
+the same directory, you can expect conflicts.  It's better to designate one
+system, possibly the host with the disk, to perform these functions.
+.LI
+If you share
+.Directory /boot
+and make some configuration changes, the options will apply to all systems.
+.LI
+When building system software, you can use the same
+.Directory /usr/src
+and
+.Directory /usr/obj
+directories as long as all systems maintain the same release of FreeBSD.  You
+can even have different kernels: each kernel build directory carries the name of
+the configuration file, which by convention matches the name of the system.
+.Le
+.Le
+The big problem is
+.Directory /etc .
+In particular,
+.File /etc/rc.conf
+contains information like the system name.  One way to handle this is to have a
+separate
+.Directory /etc
+directory for each system.  This may seem reasonable, because
+.Directory /etc
+is only about 1.5 MB in size.  In fact, this implies mounting the entire root
+file system with the other top-level directories, and that means more like 60
+MB.
+.br
+.ne 10v
+.H2 "Disk substitutes"
+.Pn diskersatz
+The other alternative to network booting is to find a local substitute for the
+disk.  This is obviously the only alternative for a stand-alone machine.  There
+are a number of alternatives:
+.Ls B
+.LI
+.X "PicoBSD"
+For really small systems, you can use \fIPicoBSD\fP, a special small version of
+FreeBSD that fits on a single floppy disk.  It requires a fair amount of memory
+as RAM disk, and obviously it's very limited.
+.P
+PicoBSD is good for some special applications.  As the FreeBSD kernel grows,
+it's becoming more and more difficult to get even the kernel onto a single
+floppy, let alone any application software.  Still, you can find a number of
+different configurations in the source tree in
+.Directory /usr/src/release/picobsd .
+Be prepared for some serious configuration work.
+.LI
+Alternatively, you can boot from CD-R or CD-ROM.  In this case, you can have up
+to 700 MB of data, enough for a number of applications.  It's possible to run
+programs directly from the CD, but there's little advantage to having files on
+CD instead of on disk.  The most likely application for this alternative is for
+systems where the reliability of rotating media is insufficient, where the CD is
+used only for booting, and after that the system runs from RAM disk.
+.LI
+.X "flash memory"
+Yet another alternative is \fIFlash memory\fP, often abbreviated simply as
+\fIFlash\fP, which we looked at in Chapter
+.Sref \*[nchunixadmin] ,
+on page
+.Sref \*[flash] .
+Flash is available in sizes up to several hundred megabytes, and Compact Flash
+cards look like disks to their interface.  They don't fit IDE connectors, but
+adapters are available.
+.P
+Flash memory is intended mainly for reading.  It is much slower to write than to
+read, and it can only take a certain number of write cycles before it fails.
+Clearly it's a candidate for read-only file systems.
+.Le
