--- evolution.mm	2002/03/23 05:19:03	4.1
+++ evolution.mm	2003/06/24 05:24:32
@@ -1,24 +1,24 @@
 .\" This file is in -*- nroff-fill -*- mode
-.\" STATUS: Draft 4th edition
-.\" $Id: evolution.mm,v 4.1 2002/03/23 05:19:03 grog Exp $
+.\" STATUS: 4th edition
+.\" $Id: evolution.mm,v 4.13 2003/04/02 04:59:47 grog Exp grog $
 .\"
-.Chapter \*[nchthirded] "FreeBSD evolution"
-FreeBSD has been around since 1993.  During this time, it has evolved
-significantly, and it continues to evolve In this chapter we'll look at what has
-changed, with a strong emphasis on the more recent versions of FreeBSD.  If
-you're planning to install one of the older versions of FreeBSD, for example on
-old hardware which is too small for modern releases, refer to \*[biblio], for
-copies of older editions of this book.
-.H2 "FreeBSD versions 1 and 2"
-The first release of FreeBSD was in December 1993.  It was mainly an improved
-version of 386/BSD, and as such was based on the 4.3BSD Net/2 tape.
+.Appendix \*[nappthirded] "The evolution of FreeBSD"
+FreeBSD has been around for ten years.  During this time, it has evolved
+significantly, and it continues to evolve.  In this chapter we'll look at what
+has changed, particularly in more recent times.  If you're planning to install
+one of the older releases of FreeBSD, for example on old hardware that is too
+small for modern releases, refer to \*[biblio], for copies of older editions of
+this book.
+.H2 "FreeBSD Releases 1 and 2"
+Release 1.0 of FreeBSD appeared in December 1993.  It was substantially an
+improved and debugged version of 386/BSD, based on the 4.3BSD Net/2 tape.
 .Pn version2
-FreeBSD version 2 was released in January 1995.  The big difference from version
+FreeBSD Release 2 was released in January 1995.  The big difference from Release
 1 was that it was based on 4.4BSD Lite, one of the results of the lawsuit we
-discussed on page \*[unixwars].  There were no major differences from version 1.
-.H2 "FreeBSD version 3"
+discussed on page \*[unixwars].  There were no major differences from Release 1.
+.H2 "FreeBSD Release 3"
 .Pn version3
-FreeBSD version 3.0 was released in September 1998.  It represented the biggest
+FreeBSD Release 3.0 was released in September 1998.  It represented the biggest
 change in FreeBSD since the code base was moved to 4.4BSD.  A number of new
 features were introduced, which made upgrading a little more complicated than is
 normally the case.  In particular, the following new features were of note:
@@ -26,49 +26,52 @@
 .LI
 .X "AXP, processor"
 .X "Alpha, architecture"
-It introduced support for the Compaq/Digital Equipment \fIAXP\fP\| or
-\fIALPHA\fP\| processor.
+It introduced support for the Compaq/Digital Equipment \fIAXP\fP\/ (also known
+as \fIALPHA\fP\/) processor.
 .LI
 On the Intel architecture, FreeBSD supported multiple processors.
 .LI
+.X "CAM driver"
 A new SCSI driver, \fICAM\fP, was introduced.  This required some modifications
 to the kernel configuration, and the device names changed.  At present this
 means that FreeBSD device names are different from the NetBSD or OpenBSD names
-for the same devices.
-
-We'll look at
-that on page \*[cam-driver].XXX
+for the same devices.  We'll look at CAM in more detail below.
 .LI
-The IDE driver first supported DMA.  We discussed DMA on page \*[use-DMA].
-The entire IDE driver was later replaced.
+The IDE driver first supported DMA.  We discussed DMA on page \*[use-DMA].  The
+entire IDE driver was replaced in a later release.
 .LI
 A new console driver was introduced.
 .LI
-This version of FreeBSD started phasing out \fIloadable kernel modules\fP,
+.X "loadable kernel module"
+.X "kernel loadable module"
+.X "kld"
+This release of FreeBSD started phasing out \fIloadable kernel modules\fP,
 described on page \*[Linux-emulation].  Since then, they have been replaced by
-\fIkernel loadable modules\fP\| (\fIkld\fP\|s).  Does this sound like word play?
+\fIkernel loadable modules\fP\/ (\fIkld\fP\/s).  Does this sound like word play?
 Well, there's a solid technical background: you can tell the bootstrap to load
-\fIkld\fP\|s along with the kernel.  We'll look at them below.
+\fIkld\fP\/s along with the kernel.  We'll look at them below.
 .LI
 A new, more flexible bootstrap (the program that loads the kernel) was
 introduced.
 .LI
-The default object file format changed from \fIa.out\fP\| to \fIELF\fP.  FreeBSD
-supported the ELF format for some time previously, primarily in order to emulate
-Linux, but now it is the native format as well.  FreeBSD still supports
-\fIa.out\fP\| binaries.
+.X "a.out, object format"
+.X "ELF, object format"
+The default object file format changed from \fIa.out\fP\/ to \fIELF\fP.  FreeBSD
+supported the ELF format for some time previously, initially to emulate Linux,
+but now it is the native format as well.  FreeBSD still supports \fIa.out\fP\/
+binaries.
 .Le
 .H2 "The CAM SCSI driver"
 .Pn cam-driver
 .X "common Access Method"
 .X "CAM driver"
-.X "Driver, CAM"
-FreeBSD 3.0 included a new SCSI driver, based on the ANSI ratified \fICommon
-Access Method\fP\| or \fICAM\fP\| specification, which defines a software
-interface for talking to SCSI and ATAPI devices.  The FreeBSD driver is not
-completely CAM compliant, but it follows many of the precepts of CAM.  More
+.X "driver, CAM"
+FreeBSD Release 3.0 included a new SCSI driver, based on the ANSI ratified
+\fICommon Access Method\fP\/ or \fICAM\fP\/ specification, which defines a
+software interface for talking to SCSI and ATAPI devices.  The FreeBSD driver is
+not completely CAM compliant, but it follows many of the precepts of CAM.  More
 importantly, it addresses many of the shortcomings of the previous SCSI layer
-and should provide better performance, reliability, and ease the task of adding
+and provides better performance and reliability, and eases the task of adding
 support for new controllers.
 .P
 .X "SCSI, direct access device"
@@ -77,53 +80,55 @@
 .X "serial access"
 For most users, the most obvious difference between the old SCSI driver and CAM
 is the way they named SCSI devices.  In the old driver, disks were called
-\fIsd\f(BIn\fR, and tapes were called \fIst\f(BIn\fR, where \f(BIn\fP\| was a
-small positive number.  The CAM driver calls disks \fIda\f(BIn\fR\| (for
-\fIdirect access\fP\|), and tapes are called \fIsa\f(BIn\fR\| (for \fIserial
-access\fP\|).
-.P
-.X "camcontrol command"
-.X "command, camcontrol"
-In addition, a new program, \fIcamcontrol\fP, enables you to administrate the
-SCSI chain at a more detailed level then previously: for example, it is now
-possible to add devices to a chain after the system has started.  See the man
-page for more details.
+\fIsd\s+2\f(BIn\s0\fR, and tapes were called \fIst\s+2\f(BIn\s0\fR, where
+\s+2\f(BIn\s0\fP\/ was a small positive number.  The CAM driver calls disks
+\fIda\s+2\f(BIn\s0\fR\/ (for \fIdirect access\fP\/), and tapes are called
+\fIsa\s+2\f(BIn\s0\fR\/ (for \fIserial access\fP\/).
+.P
+In addition, a new program,
+.Command camcontrol ,
+enables you to administrate the SCSI chain at a more detailed level then
+previously: for example, it is now possible to add devices to a chain after the
+system has started.  See the man page for more details.
 .H2 "Kernel loadable modules"
 .Pn kld-changes
-.X "Loadable Kernel Modules"
+.X "loadable kernel module"
 .X "LKM"
-Older versions of FreeBSD supplied \fILoadable Kernel Modules\fP\| or
-\fILKM\fP\|s, object files which could be loaded and executed in the kernel
+Older releases of FreeBSD supplied \fILoadable Kernel Modules\fP\/ or
+\fILKM\fP\/s, object files that could be loaded and executed in the kernel
 while the kernel was running.
 .P
-.X "Kernel loadable module"
+.X "kernel loadable module"
 .X "kld"
-The ELF kernel and the new bootstrap introduced with FreeBSD version 3 allow you
+The ELF kernel and the new bootstrap introduced with FreeBSD Release 3 allow you
 to load additional modules at boot time.  To do so, however, the format of the
 modules needed to be changed.  To avoid (too much) confusion, the name changed
-from \fIloadable kernel module\fP\| to \fIkernel loadable module\fP\|
-(\fIkld\fP\|).
+from \fIloadable kernel module\fP\/ to \fIkernel loadable module\fP\/
+(\fIkld\fP\/).
 .br
 .ne 1i
-.TB "Differences between LKMs and klds"
+.Table-heading "Differences between LKMs and klds"
 .TS H
 tab(#) ;
  l | l | l .
 Parameter#LKM#kld
 _
 .TH
-Directory#\fI/lkm\fP\|#\fI/modules\fP\|
-Load program#\fImodload\fP\|#\fIkldload\fP\|
-Unload program#\fImodunload\fP\|#\fIkldunload\fP\|
-List program#\fImodstat\fP\|#\fIkldstat\fP\|
+Directory#\fI/lkm\fP\/#\fI/boot/kernel\fP\/
+Load program#\fImodload\fP\/#\fIkldload\fP\/
+Unload program#\fImodunload\fP\/#\fIkldunload\fP\/
+List program#\fImodstat\fP\/#\fIkldstat\fP\/
 _
 .TE
+.Tn kld-diffs
 .sp 1.5v
-Some other details have changed as well.  \fIkldload\fP\| knows an internal path
-for finding \fIkld\fP\|s, so you don't need to specify the path.  It also
-assumes that the name of the \fIkld\fP\| ends in \fI.ko\fP, and you don't need
-to specify that either.  For example, to load the Linux emulator as an LKM, you
-entered:
+Some other details have changed as well.
+.Command kldload
+.X "kld"
+knows an internal path for finding \fIkld\fP\/s, so you don't need to specify
+the path unless it's in a non-standard location.  It also assumes that the name
+of the \fIkld\fP\/ ends in \fI.ko\fP, and you don't need to specify that either.
+For example, to load the Linux emulator as an LKM, you entered:
 .Dx
 # \f(CBmodload /lkm/linux_mod.o\fP
 .De
@@ -131,15 +136,29 @@
 .Dx
 # \f(CBkldload linux\fP
 .De
-In fact, even this isn't necessary: many programs load klds for you if they're
-not present.  In this case, the \fIlinux\fP\| program loads the kld
-automatically if it is needed.
+.Command kldload
+searches for klds in a number of places.  Table
+.Sref \*[kld-diffs] \&
+shows the default path,
+.Directory /boot/kernel .
+If you boot from a different kernel, for example
+.File /boot/kernel.old/kernel ,
+the path will change to
+.Directory /boot/kernel.old .
+Up to Release 4 of FreeBSD, it searched
+.Directory /modules
+as well.  At the time of writing, this directory is still in the search path,
+but it may be phased out.  It's a bad idea to store kernel code where it might
+be loaded by different kernels.
 .H2 "The ELF object format"
 .Pn elf-binaries
-When UNIX was written, the world was simple.  The kernel of the Third edition of
-UNIX, in January 1973, had a little over 7000 lines of code in total.  The
-object format was correspondingly simple: it was named after the name of the
-output from the assembler, \fIa.out\fP.
+.X "a.out, object format"
+When UNIX was written, the world was simple.  The kernel of the Third Edition of
+UNIX, in January 1973, had a little over 7,000 lines of code in total.  The
+FreeBSD 5.0 kernel has approximately 300 times as much code.  The original UNIX
+object format was correspondingly simple: it had provision for only three data
+segments.  It was named after the name of the output from the assembler,
+\fIa.out\fP.
 .P
 .X "COFF, object format"
 .X "a.out, object format"
@@ -147,109 +166,294 @@
 .X "object format, COFF"
 .X "object format, a.out"
 .X "object format, ELF"
+.ne 3v
 In the course of time, binaries required additional features, in particular the
 ability to link to dynamic libraries.  UNIX System V introduced a new object
-file format, \fICOFF\fP, but BSD remained with \fIa.out\fP\| and used some
-rather dirty tricks to link to dynamic libraries.  The change to \fIELF\fP\|
-enabled a much cleaner interface.
-.P
-Since version 3, FreeBSD uses \fIELF\fP\| as the default executable format, but
-the Intel port will still execute \fIa.out\fP\| binaries.  The Alpha port does
-not support \fIa.out\fP\| at all, since it was created at a time where it would
-not have made sense.
-.P
-Having two different library formats  poses some problems.  We'll look at them
-on page \*[dynamic-libraries].
+file format, \fICOFF\fP, but BSD objected to some of the details of COFF and
+remained with \fIa.out\fP\/ and used some rather dirty tricks to link to dynamic
+libraries.  The change to \fIELF\fP\/ enabled a much cleaner interface.
+.P
+Since Release 3, FreeBSD uses \fIELF\fP\/ as the default executable format, but
+the Intel port supported execution of \fIa.out\fP\/ binaries until Release 5.
+The Alpha port was created after the change to \fIELF\fP\/ and does not support
+\fIa.out\fP\/ at all.
+.H3 "What happened to my libraries?"
+.Pn dynamic-libraries
+One detail of the change from \fIa.out\fP\/ to \fIELF\fP\/ can make life
+difficult: ELF and \fIa.out\fP\/ executables need different libraries, each with
+their own format, but frequently with the same name.  For example, the system
+now knows the following versions of the standard C library, which is required by
+every program:
+.X "library files"
+.Ls B
+.LI
+.File libc.a
+is a static library used for including the library routines into the program at
+link time.
+.LI
+.File -n libc_p.a
+is a static library containing profiled versions of the library routines for
+inclusion into the program at link time.
+.LI
+.File -n libc_pic.a
+is a static library containing position-independent versions of the library
+routines for inclusion into the program at link time.
+.LI
+.File -n libc_r.a
+is a static library containing reentrant versions of the library routines for
+inclusion into the program at link time.
+.LI
+.File -n libc.so
+is a symbolic link to the current version of a dynamic library for linking at
+run time.  This link is only used for ELF programs.
+.LI
+.File -n libc.so.3
+is a version of an ELF dynamic library for linking at run time.  The number
+\fI3\fP\/ changes with the release.
+.LI
+\fIlibc.so.3.1\fP\/ is a version of an \fIa.out\fP\/ dynamic library for linking
+at run time.  The number \fI3.1\fP\/ changes with the release.
+.Le
+Don't worry if these names don't make much sense to you; unless you're writing
+programs, all you need to know is that an ELF system uses
+.File -n /usr/lib/libc.so
+at run time.
+.P
+.Directory /usr/lib
+contains a large number of libraries.  It would be possible, but messy, to find
+an alternative arrangement for the name conflicts, and leave the rest of the
+names unchanged.  Instead, the conversion process moves all \fIa.out\fP\/
+libraries to a subdirectory \fIaout\fP, so an \fIa.out\fP\/ executable now looks
+for
+.File -n /usr/lib/aout/libc.so.3.0 .
+An ELF executable looks for
+.File -n /usr/lib/libc.so.3 .
+.P
+.X "hints file"
+But how does the system know to look in a different place?  It uses a \fIhints
+file\fP\/ generated by the
+.Command ldconfig
+program.  When the system starts, it takes a list of directory names from
+.File /etc/rc.conf
+and runs
+.Command ldconfig
+to search the directories for \fIa.out\fP\/ libraries and to generate the hints
+file.  In Release 2 of FreeBSD, the standard
+.File /etc/rc.conf
+contained the following definition:
+.Dx
+ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib" # search paths
+.De
+In Release 3.0, this changed to:
+.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
+.H4 "Upgrading from Release 2 of FreeBSD"
+If you're still using Release 2, you might run into some minor problems.  The
+following discussion applies when upgrading to Release 3 or any later release:
+part of the upgrade process from Release 2 to Release 3 changes this entry in
+.File /etc/rc.conf ,
+so there should be no problem with normal libraries.  A couple of problems may
+still occur, however:
+.Ls B
+.LI
+Some programs refer to library names that are symbolic links.  The upgrade
+process doesn't always handle symbolic links correctly, so you may find that the
+link points to the wrong place.  For example, you might have this in a 2.2.7
+system
+.Directory /usr/lib/compat \/:
+.Dx
+/usr/lib/compat:
+total 1
+-r--r--r--  1 root  wheel  8417 Jan 21 18:37 libgnumalloc.so.2.0
+-r--r--r--  1 root  wheel  8398 Jan 21 18:37 libresolv.so.2.0
+lrwxr-xr-x  1 root  wheel    31 Jan 21 18:36 libtermcap.so.3.0 -> /usr/lib/libte
+rmcap.so.2.1
+lrwxr-xr-x  1 root  wheel    31 Jan 21 18:36 libtermlib.so.3.0 -> /usr/lib/libte
+rmlib.so.2.1
+-r--r--r--  1 root  wheel  8437 Jan 21 18:37 liby.so.2.0
+.De
+After updating, you could end up with this:
+.Dx
+/usr/lib/compat/aout:
+total 1
+-r--r--r--  1 root  wheel  8417 Jan 21 18:37 libgnumalloc.so.2.0
+-r--r--r--  1 root  wheel  8398 Jan 21 18:37 libresolv.so.2.0
+lrwxr-xr-x  1 root  wheel    31 Jan 21 18:36 libtermcap.so.3.0 -> /usr/lib/libte
+rmcap.so.2.1
+lrwxr-xr-x  1 root  wheel    31 Jan 21 18:36 libtermlib.so.3.0 -> /usr/lib/libte
+rmlib.so.2.1
+-r--r--r--  1 root  wheel  8437 Jan 21 18:37 liby.so.2.0
+.De
+In other words, the libraries have been moved, but the symbolic links are
+absolute and still point to the old place.  The system doesn't install absolute
+symbolic links, so it doesn't make any attempt to correct them.  You need to fix
+the problem manually.  In this example, we replace the symbolic links with
+relative symbolic links:
+.Dx
+# \f(CBcd /usr/lib/compat/aout\fP
+# \f(CBrm libtermcap.so.3.0\fP
+# \f(CBln -s libtermcap.so.2.1 libtermcap.so.3.0\fP
+# \f(CBrm libtermlib.so.3.0\fP
+# \f(CBln -s libtermlib.so.2.1 libtermlib.so.3.0\fP
+.De
+.sp -1v
+.LI
+.ne 5v
+If you have modified your
+.File /etc/rc.conf
+.X "a.out, object format"
+significantly, the update may
+fail, and your \fIa.out\fP\/ hints file will still point to the old locations.
+In this case edit
+.File /etc/rc.conf
+as shown above.
+.Dx
+# \f(CBcd /usr/X11R6/lib\fP
+# \f(CBmkdir aout\fP
+# \f(CBcp -p lib* aout\fP
+.De
+.Le
+.sp -1v
 .H2 "FreeBSD Version 4"
-FreeBSD version 4 was released in March 2000.  It included a number of
-significant changes from version 3.  At the time of writing, FreeBSD version 4
-is the current release.  See below for a preview of FreeBSD version 5.
-.P
-First, the good news: the differences between version 3 and version 4 aren't as
-far-reaching or as complicated as the differences between version 2 and version
-3.  Still, there are a couple of things which you need to know.  There are also
-a few things which make installation easier.  You can get a blow-by-blow
-description of the changes from the file \fI/usr/src/UPDATING\fP.  This document
+FreeBSD Release 4.0 appeared in March 2000.  It included a number of significant
+changes from Release 3.  At the time of writing, FreeBSD Release 4 is still a
+current release, in parallel with Release 5.
+.P
+First, the good news: the differences between Release 3 and Release 4 aren't as
+far-reaching or as complicated as the differences between Release 2 and Release
+3.  Still, there are a couple of things that you need to know.  There are also
+a few things that make installation easier.  You can get a blow-by-blow
+description of the changes from the file
+.File /usr/src/UPDATING .
+This document
 discusses the following more important new features:
 .Ls B
 .LI
-FreeBSD release 4 no longer has block devices.  We'll look at this in more
-detail on page \*[no-block-devices].
+From Release 4, FreeBSD no longer has block devices.  See page
+.Sref \*[no-block-devices] \&
+for more details.
 .LI
+.X "OpenSSH"
 The base operating system now includes \fIOpenSSH\fP.  This may conflict with
-the \fIports/security/ssh\fP\| port, since it installs binaries into
-\fI/usr/bin\fP\| and the port goes into \fI/usr/local/bin\fP.  Most paths have
-\fI/usr/bin\fP\| in the path before \fI/usr/local/bin\fP, so problems may arise.
-If you don't want OpenSSH, add the following line to \fI/etc/make.conf\fP\|:
+the \fIports/security/ssh\fP\/ port: the base \fIOpenSSH\fP\/ is installed in
+.Directory /usr/bin
+and the port goes into
+.Directory /usr/local/bin .
+Most paths have
+.Directory /usr/bin
+in the path before
+.Directory /usr/local/bin ,
+so problems may arise.  If you don't want OpenSSH, add the following line to
+.File /etc/make.conf \/:
 .Dx
 NO_OPENSSH=yes
 .De
-You will also need to enable OpenSSH in \fI/etc/rc.conf\fP\| if you want to run
-the new servers.  You may need to move your host key and other config files from
-\fI/usr/local/etc\fP\| to \fI/etc/ssh\fP.
-.P
-\fIOpenSSH\fP\| has different command line parsing, available options and
-default settings from \fIssh\fP, so you should take some care in its operation.
-Perform a full audit of all configuration settings.
-.LI
-\fIsendmail.cf\fP\| has moved from \fI/etc/sendmail.cf\fP\| to
-\fI/etc/mail/sendmail.cf\fP.  In addition to moving this file, you may need to
-adjust \fI/etc/rc.conf\fP.
-.LI
-\fIxntpd\fP\| has been updated to revision 4.  The name of the dmon has changed
-from \fIxntpd\fP\| to \fIntpd\fP\|, so you may need to update your
-\fI/etc/rc.conf\fP\| file.  The \fIntp.conf\fP\| files are compatible with the
-old release, unless you are using a local reference clock.  You can find more
-details about \fIntp4\fP\| at \fIhttp://www.ntp.org/\fP.
-.LI
-There is a new driver for ATA (IDE) drives.  We'll look at it on page \*[ata-page].
+You will also need to enable OpenSSH in
+.File /etc/rc.conf
+if you want to run the new servers.  You may need to move your host key and
+other config files from
+.Directory /usr/local/etc
+to
+.Directory /etc/ssh .
+.P
+.X "OpenSSH"
+\fIOpenSSH\fP\/ has different command line parsing, available options and
+default settings from
+.Command ssh ,
+so you should take some care in its operation.  Perform a full audit of all
+configuration settings.
+.LI
+\fIsendmail.cf\fP\/ has moved from
+.File /etc/sendmail.cf
+to
+.File /etc/mail/sendmail.cf .
+In addition to moving this file, you may need to
+adjust
+.File /etc/rc.conf .
+.LI
+.Daemon xntpd
+has been updated to Revision 4.  The name of the daemon has changed from
+.Daemon xntpd
+to
+.Daemon ntpd ,
+so you may need to update your
+.File /etc/rc.conf
+file.  The
+.File ntp.conf
+files are compatible with the old release, unless you are using a local
+reference clock.  You can find more details about \fIntp4\fP\/ at
+\fIhttp://www.ntp.org/\fP.
+.LI
+There is a new driver for ATA (IDE) drives.  See page
+.Sref \*[ata-page] \&
+for more details.
 .LI
 Release 3 supported both the old and the new names for SCSI devices, for example
-\fI/dev/sd0\fP\| and \fI/dev/da0\fP.  The old names are no longer there in
-release 4, so if you're upgrading you should check your \fI/etc/fstab\fP and
-\fI/etc/rc.conf\fP\| and change the names where necessary.
+.Device sd0
+and
+.Device da0 .
+The old names are no longer there in Release 4, so if you're upgrading you
+should check your
+.File /etc/fstab
+and
+.File /etc/rc.conf
+and change the names where necessary.
 .LI
-\fIbad144\fP\| support for old WD and ESDI drives has been removed.
+.Command bad144
+support for old WD and ESDI drives has been removed.
 .LI
-The \fImfs\fP\| driver has been replaced with the \fImd\fP\| driver.
+The \fImfs\fP\/ driver has been replaced with the \fImd\fP\/ driver.
 Accordingly the \f(CWMFS_ROOT\fP and \f(CWMFS_ROOT_SIZE\fP kernel configuration
 options have been replaced by \f(CWMD_ROOT\fP and \f(CWMD_ROOT_SIZE\fP.  See the
-\fIGENERIC\fP\| or \fILINT\fP\| configuration files for more details.
-.LI
-The \fIep\fP\| Ethernet driver no longer supports hard wired addresses in the
-config file.
+\fIGENERIC\fP\/ or \fILINT\fP\/ configuration files for more details.
 .LI
-\fI/var/cron/log\fP\| has been moved to \fI/var/log/cron\fP\| to get all the log
-files in one place.
+Some Ethernet drivers no longer supports hard wired addresses in the config
+file.  This is part of an on-going process to remove static hardware information
+from the kernel and to enable learning it at boot time.
+.LI
+.File /var/cron/log
+has been moved to
+.File /var/log/cron
+to get all the log files in one place.
 .LI
 User-visible TCP timers are now expressed in units of 1ms, instead of 500ms, so
 if you've customized any timer values under \f(CWnet.inet.tcp\fP, multiply them
 by 500 to preserve TCP's behavior.
 .LI
-The \fIbpfilter\fP\| device has been renamed to \fIbpf\fP.
+The \fIbpfilter\fP\/ device has been renamed to \fIbpf\fP.
 .LI
-\fIVinum\fP\| now supports a simplified interface.  See the man page
-\fIvinum(8)\fP\| for details.
+.X "vinum"
+\fIVinum\fP\/ now supports a simplified interface.  See the man page
+\fIvinum(8)\fP\/ for details.
 .LI
 A new driver, \fIida\fP, was introduced for the Compaq Smart Raid array.
 .LI
-The \fIlpt\fP\| driver has been rewritten using \fIppbus\fP.  See
-\fIppbus(4)\fP\| for details.
+The \fIlpt\fP\/ driver has been rewritten using \fIppbus\fP.  See
+\fIppbus(4)\fP\/ for details.
 .LI
 Linux threads options has gone away (they are now standard in
 the FreeBSD kernel).
 .LI
-FreeBSD 4.0 supports \fIPAM\fP\| (\fIPluggable Authentication Modules\fP\|).
-This requires a new file \fI/etc/pam.conf\fP.  If you don't have this (for
-example, if you're upgrading from an older version of FreeBSD, and you don't
+.X "Pluggable Authentication Modules"
+.X "PAM"
+From Release 4, FreeBSD supports \fIPAM\fP\/ (\fIPluggable Authentication
+Modules\fP\/).  This requires a new file
+.File /etc/pam.conf .
+If you don't have this (for
+example, if you're upgrading from an older release of FreeBSD, and you don't
 install the file), you'll get relatively harmless error messages.
 .LI
-For improved security, FreeBSD version 4 runs \fInamed\fP\| as a new user and
-group, both called \f(CWbind\fP.
-.LI
-The floppy tape driver \fIft\fP\| has been removed from the kernel.  There is no
-replacement: this driver was always very non-standard, and the hardware which it
-supports is obsolete.
+For improved security, FreeBSD Release 4 runs
+.Daemon named
+as a new user and group, both called \f(CWbind\fP.
+.LI
+The floppy tape driver \fIft\fP\/ has been removed from the kernel.  There is no
+replacement: this driver was always very non-standard, and the hardware that it
+supports is unreliable and obsolete.
 .LI
 There are new keyboard and video card drivers.  We'll look at them in more
 detail on page \*[new-console].
@@ -257,10 +461,13 @@
 .sp -1v
 .H2 "No more block devices"
 .Pn no-block-devices
+.X "block device"
+.X "character device"
+.X "raw disk"
 From the beginnings of UNIX, users were confused by the fact that a disk drive
-could appear in two different ways, either a \fIblock device\fP\| or a
+could appear in two different ways, either a \fIblock device\fP\/ or a
 \fIcharacter device\fP, also called a \fIraw disk\fP.  For example, your root
-partition might be one of these:
+partition might have been one of these:
 .Dx
 $ \f(CBls -l /dev/wd0a /dev/rwd0a\fP
 crw-r-----  1 root  operator    3,   0 Oct 19  1997 /dev/rwd0a
@@ -269,19 +476,22 @@
 A raw device always accesses the drive directly.  As a result, you're limited to
 the way the drive is organized: the transfer must start on a sector\*F
 .FS
-Data on disk is stored in units called \fIsectors\fP\|.  On modern disks,
-sectors are 512 bytes long.
+Data on disk used to be stored in units called \fIsectors\fP\/.  Modern disks
+store data in a number of different ways, but this is not visible outside the
+drive.  The externally visible unit of data is still a sector of 512 bytes.
 .FE
+.X "buffer cache"
 boundary and must be an integral number of sectors long.  By contrast, block
-devices are \fIbuffered\fP\|: instead of accessing the disk directly, you access
-a copy of the data in buffer cache.  This has the advantages that you can access
+devices are \fIbuffered\fP\/: instead of accessing the disk directly, the system
+transfers data via an area of memory called \fIbuffer cache\fP.  You access the
+copy of the data in buffer cache.  This has the advantages that you can access
 it much more quickly if it is in cache, and you don't have to pay any attention
 to sector boundaries.  Still, having two different kinds of device is confusing,
 and it's obvious why we should want to simplify things.
 .P
-But why are block devices going away, and not the raw disks?  Linux, for
-example, doesn't have any raw disk access, only block device.  There are a
-number of reasons to prefer to keep the raw disks:
+But why are block devices going away, and not the raw disks?  Until recently,
+for example, Linux didn't have any raw disk access, only block devices.  There
+are a number of reasons to prefer to keep the raw disks:
 .Ls B
 .LI
 If you want to access disks in an aligned fashion, it's faster: you don't have
@@ -289,24 +499,34 @@
 .LI
 If you have an error on a write to a raw device, you get an error indication
 immediately.  On a block device, the error may not occur until after the process
-has terminated.
-.LI
-Nobody accesses disk devices directly.  The most common access is via a file
-system or as swap.  In the former case, the file system provides the buffering,
-and in the latter case it's counterproductive, since swap always writes entire
-pages.  The only other access to disk devices is from system programs like
-\fIdisklabel\fP, \fInewfs\fP\| and \fImount\fP, all of which have always
-accessed the raw device.
+has terminated, too late to try to recover.
 .LI
-Having two kinds of device confuses the issue.  When do you use one, when do you
-use the other?
+The buffer cache isn't going away, only the device interface.  It's very seldom
+that you'll find a need to access disk devices directly from user context.  The
+most common access is via a file system or as swap.  In the former case, the
+file system provides the buffering, and in the latter case it's
+counterproductive, since swap always writes entire pages.  The only other access
+to disk devices is from system programs like
+.Command disklabel ,
+.Command newfs
+and
+.Command mount ,
+all of which have always accessed the raw device.
 .Le
 For most users, the biggest difference is that you will never use a name like
-\fI/dev/rda0a\fP\| again; instead, it will become \fI/dev/da0a\fP.  If you are
-upgrading, you must run \fI/dev/MAKEDEV\fP\| to recreate the device nodes.
+.Device rda0a
+again; instead, it will become
+.Device da0a .
+If you are upgrading, you must run
+.File /dev/MAKEDEV
+to recreate the device nodes.
+.P
+Note that in Release 5 of FreeBSD,
+.File /dev/MAKEDEV
+is no longer needed.
 .H2 "New ATA (IDE) disk driver"
 .Pn ata-page
-There is a new driver, \fIata\fP, for \fIATA\fP\| (\fIAT attachment\fP\|)
+There is a new driver, \fIata\fP, for \fIATA\fP\/ (\fIAT attachment\fP\/)
 drives, which were formerly called IDE.  It supports not only disks but also
 ATAPI CD-ROM and DVD drives, ZIP drives and tape streamers.
 .P
@@ -314,295 +534,111 @@
 \fIad\fP, CD-ROM drives are called \fIacd\fP, LS-120 floppies are called
 \fIafd\fP, and tapes are called \fIast\fP.
 .P
-For a transition period, the \fIwd\fP\| driver remains available, but you
+For a transition period, the \fIwd\fP\/ driver remains available, but you
 shouldn't use it unless you have very good reasons, for example if you have old
-or unusual hardware which has trouble with the \fIad\fP\| driver.
+or unusual hardware that has trouble with the \fIad\fP\/ driver.
 .H2 "New console driver"
 .Pn new-console
-FreeBSD version 4 includes a new console driver.  The configuration file entries
-have changed.  For \fIsyscons\fP, they should now be:
-.Dx
-controller      atkbdc0 at isa? port IO_KBD tty
-device          atkbd0  at isa? tty irq 1
-#device         psm0    at isa? tty irq 12
-device          vga0    at isa? port ? conflicts
-device          sc0     at isa? tty
-
-pseudo-device	splash
-.De
-The \fIsplash\fP\| entry allows you to use screen savers or splash screen.
-For \fIpcvt\fP, the entries are:
-.Dx
-controller      atkbdc0 at isa? port IO_KBD tty
-device          atkbd0  at isa? tty irq 1
-#device         psm0    at isa? tty irq 12
-device          vt0     at isa? tty
-.De
-The following options for syscons are replaced by new ones:
-.br
-.ne 1i
-.TS H
-tab(#) ;
-lfCWp9 | lfCWp9 .
-Old#New
-_
-.TH
-SC_ALT_SEQACCESS#VGA_ALT_SEQACCESS
-SLOW_VGA#VGA_SLOW_IOACCESS
-_
-.TE
-.sp
-The following flags for syscons are no longer available.
-
-.br
-.ne 1i
-.TS H
-tab(#) ;
-lfCWp9 | lw65 .
-\fRFlag\fP#Purpose
-_
-.TH
-0x08#Force detection of keyboard.
-0x10#Old-style (XT) keyboard support.
-0x20#Don't reset keyboard.
-_
-.TE
-.sp
-The new flags have slightly different semantics:
-.br
-.ne 1i
-.TB ""
-.TS H
-tab(#) ;
-lfCWp9 | lw65 .
-\fRFlag\fP#Purpose
-_
-.TH
-0x01#T{
-Don't install the keyboard driver if no keyboard is found, otherwise assume
-a keyboard.
-T}
-0x02#Don't reset keyboard.
-0x04#XT keyboard support.
-_
-.TE
-.sp 1.5v
-In addition, the new console driver supports a splash screen.  See the man page
-\fIsplash(4)\fP\| for further details.
-.ig
-.H2 "New boot loader"
-FreeBSD release 4 includes a new bootstrap program capable of loading multiple
-files, including \fIkernel loadable modules\fP\| (\fIklds\fP\|).
-.P
-After the first two stages in the booting process (described in
-\fIboot(8)\fP\|), the last stage of the booting process, called the loader (see
-\fIloader(8)\fP\|) reads in the file \fI/boot/loader.rc\fP, which normally
-contains the following commands:
-.Dx
-\e Includes additional commands
-include /boot/loader.4th
-
-\e Reads and processes loader.rc
-start
-.De
-The lines starting with \f(CW\e\fP are comments.  \fI/boot/loader.4th\fP\|
-contains definitions of commands needed to read the other files.  The
-\f(CWstart\fP command reads and interprets \fI/boot/default/loader.conf\fP,
-which resembles \fI/etc/rc.conf\fP\| in form, but it functions quite
-differently.
-
-has spots for endless user customization but isn't yet completely finished.  For
-one thing, it used to assume a /kernel.config instead of a /boot/kernel.conf.
-Watch the first few lines of /boot/defaults/loader.conf to see if the file name
-changes.
-
-[See the section at the end on loader.conf syntax]
-
-You don't actually want to make any changes to
-/boot/defaults/loader.conf, the file that is a  hacking-
-target is:
-
-/boot/loader.conf
-
-and might very likely not exist yet on your system).  You
-should copy /boot/defaults/loader.conf to /boot/loader.conf,
-and then cut out anything you didn't want changed.
-
-The start command also loads your kernel for you, so don't
-put any lines in there like "load kernel", they'll fail (but
-really have already worked for you).  Start also reads in
-the file /boot/defaults/loader.conf and /boot/loader.conf.
-If you don't have /boot/loader.conf, you'll see a message on
-boot about it, but it's a warning only, no other effects.
-See the section on loader.conf syntax at the end of this
-document, for some more pointers on loader.conf syntax.
-
-The best way to manage splash screens is with entries in
-/boot/loader.conf, and this is very clearly illustrated in
-/boot/defaults/loader.conf (which you could just copy over
-to /boot/loader.conf).  I'm going to illustrate here how you
-*could* do it in /boot/loader.rc (for information only)
-but I don't recommend you do this; use the
-/boot/defaults/loader.conf syntax, it's easier to get it
-correct.
-
-You can load your splash screen by putting the following
-lines into /boot/loader.rc:
-
-load splash_bmp
-load -t splash_image_data /path/to/file.bmp
-
-The top line causes the splash_bmp module to get loaded.
-The second line has the parameter "-t" which tells the
-loader that the class of DATA being loaded is not a module,
-but instead a splash_image_data located in file
-/path/to/file.bmp.
-
-To get your plug and play data correctly set, run kget,
-redirecting the output to /boot/kernel.conf.  Note that kget
-right now adds an extra "q" to it's output (from the q for
-quit you press when you exit config), and if you want, you
-can remove that from the file.  Kget reports data only, so
-feel free to run it, just to see the output.  Make certain
-you have the kernel option USERCONFIG set in your kernel, so
-that you can do a boot -c, to initially set your cards up.
-Then, edit /boot/loader.conf so that the following line
-shows up (overwriting, in effect, a similar line in
-/boot/default/loader.conf):
-
-userconfig_script_load="YES"
-
-My own pnp line looks like:
-pnp 1 0 os irq0 15 irq1 0 drq0 1 drq1 0 port0 1332
-(kget changes numbers from hexadecimal to decimal).  Note
-that, at this moment, the change from using /kernel.config
-to using /boot/kernel.conf as the storage place for kernel
-config changes is going on.  Take a look at your
-/boot/defaults/loader.conf, see what's defined as
-userconfig_script_name, and if you override, make sure the
-file exists.  Note that the loader only has access to the
-root filesystem, so be careful where you tell it to read
-from.
-
-
-o If you interrupt autoboot, you'll engage interactive
-mode with loader. Everything you type will have the
-same effects as if it were lines in /boot/loader.rc.
-
-o While in interactive mode, you can get help by typing
-"?", "help [<topic> [<subtopic>]]" and "help index".
-These are mostly commands one would expect a normal
-user to use. I recommend you play with them a little,
-to gain further familiarity with what's going on.
-
-Note that it is not possible to damage or corrupt your
-system while experimenting with the loader, as it
-cannot write to any of your filesystems.
-
-o The command "unload" will unload everything. This is
-very useful.  Once loader.rc has finished and the
-system is in the autoboot count-down, you will usually
-have the kernel and other modules loaded. Now, suppose
-your new /kernel is broken, how do you load
-/kernel.old? By typing:
-
-unload
-load kernel.old
-[any other modules you wish to load]
-boot
-
-o If you use loader.conf, you can do:
-
-unload
-set kernel=kernel.old
-boot-conf
-
-this will then load all the modules you have
-configured, using kernel.old as kernel, and boot.
-
-o From loader, you can use the command "more" to read the
-contents of /boot/loader.rc, if you wish. This is not
-FreeBSD's more. It is one of loader's builtin commands.
-Useful if you can't quite recall what you have there.
-:-) Of course, you can use this command to read
-anything else you want.
-
-o "boot -flag" works, "boot kernelname" works, "boot
--flag kernelname" doesn't. "boot kernelname -flag"
-might work, but I'm not sure. The problem is that these
-flags are kernel's flags, not boot's flags.
-
-o There are a number of variables that can be set. You
-can see them in loader.conf, but you can get much more
-detailed information using the "help" command, eg. help
-set <variablename>.
-
-o The variable root_disk_unit is particularly important,
-as it solves a relatively common problem. This problem
-shows when the BIOS assign disk units in a different
-way than the kernel. For example, if you have two IDE
-disks, one on the primary, the other on the secondary
-controller, and both as master, the default in most
-kernels is having the first as wd0, and the second as
-wd2. If your root partition is in wd2, you'll get an
-error, because the BIOS sees these disks as 0 and 1
-(well, 1 and 2), and that's what loader tells the
-kernel. In this case, "set root_disk_unit=2" solves the
-problem.  You use this whenever the kernel fails to
-mount to root partition because it has a wrong unit
-number.
-
-FILE OVERVIEW
-
-
-o /boot/defaults/loader.conf -- Master configuration
-file, not to be edited.  Overridden by
-/boot/loader.conf.
-
-o /boot/loader.conf -- local system customization file,
-in form very much like /boot/defaults/loader.conf.
-This file is meant to be used by local users and the
-sysinstall process.
-
-o /boot/loader.conf.local -- local installation override
-file.  This is intended for use by installations with
-large numbers of systems, to allow global policy
-overrides.  No FreeBSD tools should ever write this
-file.
-
-o /kernel.config -- old location of kernel configuration
-changes (like pnp changes).
-
-o /boot/kernel.conf -- new location for kernel
-configuration changes.
-
-o /boot/loader.rc -- loader initial configuration file,
-chiefly used to source in a forth file, and start the
-configuration process.
-
-NOTES ON LOADER.CONF SYNTAX
-
-I'm copy here from the last 11 lines from
-/boot/defaults/loader.conf:
-
-##############################################################
-###  Module loading syntax example  ##########################
-##############################################################
-
-#module_load="YES"              # loads module "module"
-#module_name="realname"         # uses "realname" instead of "module"
-#module_type="type"             # passes "-t type" to load
-#module_flags="flags"           # passes "flags" to the module
-#module_before="cmd"            # executes "cmd" before loading module
-#module_after="cmd"             # executes "cmd" after loading module
-#module_error="cmd"             # executes "cmd" if load fails
-
-The way this works, the command processor used by the loader (which is a subset
-of forth) inspects these variables for their suffix, and the 7 lines above
-illustrate all the currently defined suffixes, and their use.  Take the part
-before the underscore, and customize it i(make it unique) for your particular
-use, keeping the suffix to allow the particular function you want to activate.
-Extra underscores are fine, because it's only the sufixes that are scanned for.
-..
-.H2 "FreeBSD version 5"
-At the time of writing, FreeBSD version 5 is still under development.  
+FreeBSD Release 4 includes a new console driver.  The configuration file entries
+have changed.  See the \f(CWGENERIC\fP configuration file for more details.
+.H2 "FreeBSD Release 5"
+FreeBSD Release 5 is the latest release of FreeBSD.  It has a number of new
+features, most of which are transparent to the user.  There's a complete list in
+the release notes, which you should certainly read if you're upgrading the
+system, but here are some highlights:
+.Ls B
+.LI
+SMP (symmetric multiprocessor) support has been rewritten from scratch.  This
+will ultimately give much better performance and scalability, though currently
+the performance potential has not been fully realized.  We looked at some of the
+visible differences on page
+.Sref \*[ps-command] .
+.LI
+.X "kqueue"
+The \fIkqueue\fP\/ event notification facility is a new interface that is able
+to replace \fIpoll\fP\/ and \fIselect\fP.  It offers improved performance as
+well as the ability to report many different types of events.  Support for
+monitoring changes in sockets, pipes, fifos, and files are present, as well as
+for signals and processes.
+.LI
+A large number of kernel configuration options have been turned into boot-time
+tunable variables, and the need to build specific kernels has become much more
+seldom.
+.LI
+.X "Kernel-Scheduled Entity"
+.X "KSE"
+The \fIKernel-Scheduled Entity\fP\/ (\fIKSE\fP\/) project offers multi-threading
+in the kernel.
+.LI
+Support for the 80386 processor has been removed from the \f(CWGENERIC\fP
+kernel, as this code seriously pessimizes performance on other IA32 processors.
+.P
+The \f(CWI386_CPU\fP kernel option to support the 80386 processor is now
+mutually exclusive with support for other IA32 processors; this should slightly
+improve performance on the 80386 due to the elimination of run time processor
+type checks.  Custom kernels that will run on the 80386 can still be built by
+changing the cpu options in the kernel configuration file to only include
+\f(CWI386_CPU\fP.
+.P
+.LI
+Support has been added for 64 bit SPARC and IA 64 (Itanium) processors.
+.LI
+.X "device file system"
+.X "devfs"
+The system includes the \fIdevice file system\fP, or \fIdevfs\fP.  In older
+releases of FreeBSD, as in other versions of UNIX, the directory
+.Directory /dev
+.X "device node"
+contained \fIdevice nodes\fP, entries that looked like files but which in fact
+described a possible device on the system.  The problem was that there was no
+good way to keep the device nodes in sync with the kernel, and problems occurred
+where the hardware corresponding to a device node didn't exist (a ``Device not
+configured'' error), or where the device node corresponding to the hardware did
+not exist (a ``no such file or directory'' error).  \fIdevfs\fP\/ solves this
+problem by creating at boot time the device nodes for the hardware the system
+finds.
+.LI
+.X "GEOM"
+The disk I/O access system has been rearranged and made more flexible with the
+\fIGEOM\fP\/ framework.
+.LI
+A number of file system enhancements have been made.  The standard UFS file
+system now supports snapshots and background file system checking after a crash,
+significantly reducing reboot time after a crash.
+.LI
+.X "UFS2"
+UFS has been significantly enhanced as \fIUFS2\fP.  It supports files larger
+than 1 TB and extended file attributes.
+.LI
+The PCMCIA code has been rewritten and now supports CardBus devices.
+.LI
+.X "a.out, object format"
+The default kernel no longer supports \fIa.out\fP\/ file format.  You can still
+execute these files by loading the \fIaout.ko\fP\/ KLD.
+.LI
+.X "Advanced Configuration and Power Interface"
+.X "ACPI"
+.X "APM"
+FreeBSD now supports the \fIAdvanced Configuration and Power Interface\fP
+(\fIACPI\fP\/), the replacement for \fIAPM\fP.
+.LI
+It is now possible to increase the size of ufs file systems with the
+.Command growfs
+command.
+.LI
+.X "vinum"
+\fIVinum\fP\/ now supports the root file system.  See Chapter
+.Sref \*[nchvinum] \&
+for details.
+.LI
+.Command disklabel ,
+the program which creates disk labels, has been split into multiple programs
+depending on the platform: on PCs it is now called
+.Command bsdlabel ,
+and on SPARC64 it is called
+.Command sunlabel .
+Some options have changed.  In particular, the \f(CW-r\fP option no longer
+exists.  See page
+.Sref \*[disklabel] \&
+for further details.
+.Le
