aboutsummaryrefslogtreecommitdiff
path: root/en_US.ISO8859-1/books
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2013-02-05 09:14:34 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2013-02-05 09:14:34 +0000
commita06603e1e8c43dac65e769d0577e15561dde3acb (patch)
tree56789ede4270141e038c244e602fe2503127b62f /en_US.ISO8859-1/books
parent5be98520031882d40220ca83d603138abb7ef89a (diff)
parentfbf79ce9835e43f0e5de684052af39c914b817ab (diff)
downloaddoc-a06603e1e8c43dac65e769d0577e15561dde3acb.tar.gz
doc-a06603e1e8c43dac65e769d0577e15561dde3acb.zip
- MFH
Notes
Notes: svn path=/projects/xml-tools/; revision=40889
Diffstat (limited to 'en_US.ISO8859-1/books')
-rw-r--r--en_US.ISO8859-1/books/Makefile1
-rw-r--r--en_US.ISO8859-1/books/arch-handbook/Makefile4
-rw-r--r--en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml299
-rw-r--r--en_US.ISO8859-1/books/arch-handbook/isa/chapter.xml2
-rw-r--r--en_US.ISO8859-1/books/arch-handbook/pci/chapter.xml4
-rw-r--r--en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml10
-rw-r--r--en_US.ISO8859-1/books/bibliography/Makefile4
-rw-r--r--en_US.ISO8859-1/books/corp-net-guide/Makefile25
-rw-r--r--en_US.ISO8859-1/books/corp-net-guide/book.xml3223
-rw-r--r--en_US.ISO8859-1/books/corp-net-guide/freebsd.dsl18
-rw-r--r--en_US.ISO8859-1/books/dev-model/book.xml80
-rw-r--r--en_US.ISO8859-1/books/developers-handbook/Makefile4
-rw-r--r--en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml248
-rw-r--r--en_US.ISO8859-1/books/developers-handbook/policies/chapter.xml155
-rw-r--r--en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml25
-rw-r--r--en_US.ISO8859-1/books/faq/Makefile4
-rw-r--r--en_US.ISO8859-1/books/faq/book.xml4147
-rw-r--r--en_US.ISO8859-1/books/fdp-primer/Makefile4
-rw-r--r--en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml4
-rw-r--r--en_US.ISO8859-1/books/handbook/Makefile8
-rw-r--r--en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml299
-rw-r--r--en_US.ISO8859-1/books/handbook/audit/chapter.xml637
-rw-r--r--en_US.ISO8859-1/books/handbook/basics/chapter.xml3095
-rw-r--r--en_US.ISO8859-1/books/handbook/book.xml3
-rw-r--r--en_US.ISO8859-1/books/handbook/boot/chapter.xml31
-rw-r--r--en_US.ISO8859-1/books/handbook/bsdinstall/chapter.xml96
-rw-r--r--en_US.ISO8859-1/books/handbook/colophon.xml21
-rw-r--r--en_US.ISO8859-1/books/handbook/config/chapter.xml113
-rw-r--r--en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml2815
-rw-r--r--en_US.ISO8859-1/books/handbook/desktop/chapter.xml540
-rw-r--r--en_US.ISO8859-1/books/handbook/disks/chapter.xml331
-rw-r--r--en_US.ISO8859-1/books/handbook/dtrace/chapter.xml115
-rw-r--r--en_US.ISO8859-1/books/handbook/eresources/chapter.xml1060
-rw-r--r--en_US.ISO8859-1/books/handbook/filesystems/chapter.xml501
-rw-r--r--en_US.ISO8859-1/books/handbook/firewalls/chapter.xml1903
-rw-r--r--en_US.ISO8859-1/books/handbook/geom/chapter.xml760
-rw-r--r--en_US.ISO8859-1/books/handbook/index.xml1
-rw-r--r--en_US.ISO8859-1/books/handbook/install/chapter.xml4
-rw-r--r--en_US.ISO8859-1/books/handbook/introduction/chapter.xml20
-rw-r--r--en_US.ISO8859-1/books/handbook/jails/Makefile15
-rw-r--r--en_US.ISO8859-1/books/handbook/jails/chapter.xml16
-rw-r--r--en_US.ISO8859-1/books/handbook/kernelconfig/chapter.xml928
-rw-r--r--en_US.ISO8859-1/books/handbook/l10n/chapter.xml631
-rw-r--r--en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml906
-rw-r--r--en_US.ISO8859-1/books/handbook/mac/chapter.xml868
-rw-r--r--en_US.ISO8859-1/books/handbook/mail/chapter.xml12
-rw-r--r--en_US.ISO8859-1/books/handbook/mirrors/chapter.xml3397
-rw-r--r--en_US.ISO8859-1/books/handbook/multimedia/chapter.xml1481
-rw-r--r--en_US.ISO8859-1/books/handbook/network-servers/chapter.xml379
-rw-r--r--en_US.ISO8859-1/books/handbook/ports/chapter.xml2221
-rw-r--r--en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml1966
-rw-r--r--en_US.ISO8859-1/books/handbook/preface/preface.xml641
-rw-r--r--en_US.ISO8859-1/books/handbook/printing/chapter.xml4018
-rw-r--r--en_US.ISO8859-1/books/handbook/security/chapter.xml35
-rw-r--r--en_US.ISO8859-1/books/handbook/serialcomms/chapter.xml2123
-rw-r--r--en_US.ISO8859-1/books/handbook/users/chapter.xml649
-rw-r--r--en_US.ISO8859-1/books/handbook/vinum/chapter.xml685
-rw-r--r--en_US.ISO8859-1/books/handbook/virtualization/chapter.xml46
-rw-r--r--en_US.ISO8859-1/books/handbook/x11/chapter.xml1079
-rw-r--r--en_US.ISO8859-1/books/pmake/Makefile6
-rw-r--r--en_US.ISO8859-1/books/porters-handbook/Makefile4
-rw-r--r--en_US.ISO8859-1/books/porters-handbook/book.xml270
62 files changed, 19845 insertions, 23145 deletions
diff --git a/en_US.ISO8859-1/books/Makefile b/en_US.ISO8859-1/books/Makefile
index ecf27143de..4cf91fdde1 100644
--- a/en_US.ISO8859-1/books/Makefile
+++ b/en_US.ISO8859-1/books/Makefile
@@ -1,7 +1,6 @@
# $FreeBSD$
SUBDIR = arch-handbook
-SUBDIR+= corp-net-guide
SUBDIR+= design-44bsd
SUBDIR+= dev-model
SUBDIR+= developers-handbook
diff --git a/en_US.ISO8859-1/books/arch-handbook/Makefile b/en_US.ISO8859-1/books/arch-handbook/Makefile
index 7c1f296a6c..9ad49d0e62 100644
--- a/en_US.ISO8859-1/books/arch-handbook/Makefile
+++ b/en_US.ISO8859-1/books/arch-handbook/Makefile
@@ -16,11 +16,11 @@ INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
#
-# SRCS lists the individual SGML files that make up the document. Changes
+# SRCS lists the individual XML files that make up the document. Changes
# to any of these files will force a rebuild
#
-# SGML content
+# XML content
SRCS= book.xml
SRCS+= boot/chapter.xml
SRCS+= driverbasics/chapter.xml
diff --git a/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml b/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml
index f70027a2e9..c4b87c9ba7 100644
--- a/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml
+++ b/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml
@@ -48,13 +48,7 @@
<para>Most devices in a &unix;-like operating system are accessed
through device-nodes, sometimes also called special files.
These files are usually located under the directory
- <filename>/dev</filename> in the filesystem hierarchy.
- In releases of FreeBSD older than 5.0-RELEASE, where
- &man.devfs.5; support is not integrated into FreeBSD,
- each device node must be
- created statically and independent of the existence of the
- associated device driver. Most device nodes on the system are
- created by running <command>MAKEDEV</command>.</para>
+ <filename>/dev</filename> in the filesystem hierarchy.</para>
<para>Device drivers can roughly be broken down into two
categories; character and network device drivers.</para>
@@ -208,25 +202,23 @@ KMOD=skeleton
<para>This simple example pseudo-device remembers whatever values
you write to it and can then supply them back to you when you
- read from it. Two versions are shown, one for &os;&nbsp;4.X and
- one for &os;&nbsp;5.X.</para>
+ read from it.</para>
<example>
<title>Example of a Sample Echo Pseudo-Device Driver for
- &os;&nbsp;4.X</title>
+ &os;&nbsp;10.X</title>
<programlisting>/*
- * Simple `echo' pseudo-device KLD
+ * Simple Echo pseudo-device KLD
*
* Murray Stokely
+ * Søren (Xride) Straarup
+ * Eitan Adler
*/
-#define MIN(a,b) (((a) &lt; (b)) ? (a) : (b))
-
#include &lt;sys/types.h&gt;
#include &lt;sys/module.h&gt;
#include &lt;sys/systm.h&gt; /* uprintf */
-#include &lt;sys/errno.h&gt;
#include &lt;sys/param.h&gt; /* defines used in kernel.h */
#include &lt;sys/kernel.h&gt; /* types used in module initialization */
#include &lt;sys/conf.h&gt; /* cdevsw struct */
@@ -236,170 +228,6 @@ KMOD=skeleton
#define BUFFERSIZE 256
/* Function prototypes */
-d_open_t echo_open;
-d_close_t echo_close;
-d_read_t echo_read;
-d_write_t echo_write;
-
-/* Character device entry points */
-static struct cdevsw echo_cdevsw = {
- echo_open,
- echo_close,
- echo_read,
- echo_write,
- noioctl,
- nopoll,
- nommap,
- nostrategy,
- "echo",
- 33, /* reserved for lkms - /usr/src/sys/conf/majors */
- nodump,
- nopsize,
- D_TTY,
- -1
-};
-
-typedef struct s_echo {
- char msg[BUFFERSIZE];
- int len;
-} t_echo;
-
-/* vars */
-static dev_t sdev;
-static int count;
-static t_echo *echomsg;
-
-MALLOC_DECLARE(M_ECHOBUF);
-MALLOC_DEFINE(M_ECHOBUF, "echobuffer", "buffer for echo module");
-
-/*
- * This function is called by the kld[un]load(2) system calls to
- * determine what actions to take when a module is loaded or unloaded.
- */
-
-static int
-echo_loader(struct module *m, int what, void *arg)
-{
- int err = 0;
-
- switch (what) {
- case MOD_LOAD: /* kldload */
- sdev = make_dev(<literal>&amp;</literal>echo_cdevsw,
- 0,
- UID_ROOT,
- GID_WHEEL,
- 0600,
- "echo");
- /* kmalloc memory for use by this driver */
- MALLOC(echomsg, t_echo *, sizeof(t_echo), M_ECHOBUF, M_WAITOK);
- printf("Echo device loaded.\n");
- break;
- case MOD_UNLOAD:
- destroy_dev(sdev);
- FREE(echomsg,M_ECHOBUF);
- printf("Echo device unloaded.\n");
- break;
- default:
- err = EOPNOTSUPP;
- break;
- }
- return(err);
-}
-
-int
-echo_open(dev_t dev, int oflags, int devtype, struct proc *p)
-{
- int err = 0;
-
- uprintf("Opened device \"echo\" successfully.\n");
- return(err);
-}
-
-int
-echo_close(dev_t dev, int fflag, int devtype, struct proc *p)
-{
- uprintf("Closing device \"echo.\"\n");
- return(0);
-}
-
-/*
- * The read function just takes the buf that was saved via
- * echo_write() and returns it to userland for accessing.
- * uio(9)
- */
-
-int
-echo_read(dev_t dev, struct uio *uio, int ioflag)
-{
- int err = 0;
- int amt;
-
- /*
- * How big is this read operation? Either as big as the user wants,
- * or as big as the remaining data
- */
- amt = MIN(uio-&gt;uio_resid, (echomsg-&gt;len - uio-&gt;uio_offset &gt; 0) ?
- echomsg-&gt;len - uio-&gt;uio_offset : 0);
- if ((err = uiomove(echomsg-&gt;msg + uio-&gt;uio_offset,amt,uio)) != 0) {
- uprintf("uiomove failed!\n");
- }
- return(err);
-}
-
-/*
- * echo_write takes in a character string and saves it
- * to buf for later accessing.
- */
-
-int
-echo_write(dev_t dev, struct uio *uio, int ioflag)
-{
- int err = 0;
-
- /* Copy the string in from user memory to kernel memory */
- err = copyin(uio-&gt;uio_iov-&gt;iov_base, echomsg-&gt;msg,
- MIN(uio-&gt;uio_iov-&gt;iov_len, BUFFERSIZE - 1));
-
- /* Now we need to null terminate, then record the length */
- *(echomsg-&gt;msg + MIN(uio-&gt;uio_iov-&gt;iov_len, BUFFERSIZE - 1)) = 0;
- echomsg-&gt;len = MIN(uio-&gt;uio_iov-&gt;iov_len, BUFFERSIZE);
-
- if (err != 0) {
- uprintf("Write failed: bad address!\n");
- }
- count++;
- return(err);
-}
-
-DEV_MODULE(echo,echo_loader,NULL);</programlisting>
- </example>
-
- <example>
- <title>Example of a Sample Echo Pseudo-Device Driver for
- &os;&nbsp;5.X</title>
-
- <programlisting>/*
- * Simple `echo' pseudo-device KLD
- *
- * Murray Stokely
- *
- * Converted to 5.X by S&oslash;ren (Xride) Straarup
- */
-
-#include &lt;sys/types.h&gt;
-#include &lt;sys/module.h&gt;
-#include &lt;sys/systm.h&gt; /* uprintf */
-#include &lt;sys/errno.h&gt;
-#include &lt;sys/param.h&gt; /* defines used in kernel.h */
-#include &lt;sys/kernel.h&gt; /* types used in module initialization */
-#include &lt;sys/conf.h&gt; /* cdevsw struct */
-#include &lt;sys/uio.h&gt; /* uio struct */
-#include &lt;sys/malloc.h&gt;
-
-#define BUFFERSIZE 256
-
-
-/* Function prototypes */
static d_open_t echo_open;
static d_close_t echo_close;
static d_read_t echo_read;
@@ -415,15 +243,14 @@ static struct cdevsw echo_cdevsw = {
.d_name = "echo",
};
-typedef struct s_echo {
+struct s_echo {
char msg[BUFFERSIZE];
int len;
-} t_echo;
+};
/* vars */
static struct cdev *echo_dev;
-static int count;
-static t_echo *echomsg;
+static struct s_echo *echomsg;
MALLOC_DECLARE(M_ECHOBUF);
MALLOC_DEFINE(M_ECHOBUF, "echobuffer", "buffer for echo module");
@@ -434,20 +261,25 @@ MALLOC_DEFINE(M_ECHOBUF, "echobuffer", "buffer for echo module");
*/
static int
-echo_loader(struct module *m, int what, void *arg)
+echo_loader(struct module *m __unused, int what, void *arg __unused)
{
- int err = 0;
+ int error = 0;
switch (what) {
case MOD_LOAD: /* kldload */
- echo_dev = make_dev(<literal>&amp;</literal>echo_cdevsw,
+ error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK,
+ &amp;echo_dev,
+ &amp;echo_cdevsw,
0,
UID_ROOT,
GID_WHEEL,
0600,
"echo");
+ if (error != 0)
+ break;
+
/* kmalloc memory for use by this driver */
- echomsg = malloc(sizeof(t_echo), M_ECHOBUF, M_WAITOK);
+ echomsg = malloc(sizeof(*echomsg), M_ECHOBUF, M_WAITOK);
printf("Echo device loaded.\n");
break;
case MOD_UNLOAD:
@@ -456,26 +288,27 @@ echo_loader(struct module *m, int what, void *arg)
printf("Echo device unloaded.\n");
break;
default:
- err = EOPNOTSUPP;
+ error = EOPNOTSUPP;
break;
}
- return(err);
+ return (error);
}
static int
-echo_open(struct cdev *dev, int oflags, int devtype, struct thread *p)
+echo_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused, struct thread *p __unused)
{
- int err = 0;
+ int error = 0;
uprintf("Opened device \"echo\" successfully.\n");
- return(err);
+ return (error);
}
static int
-echo_close(struct cdev *dev, int fflag, int devtype, struct thread *p)
+echo_close(struct cdev *dev __unused, int fflag __unused, int devtype __unused, struct thread *p __unused)
{
- uprintf("Closing device \"echo.\"\n");
- return(0);
+
+ uprintf("Closing device \"echo\".\n");
+ return (0);
}
/*
@@ -485,21 +318,21 @@ echo_close(struct cdev *dev, int fflag, int devtype, struct thread *p)
*/
static int
-echo_read(struct cdev *dev, struct uio *uio, int ioflag)
+echo_read(struct cdev *dev __unused, struct uio *uio, int ioflag __unused)
{
- int err = 0;
- int amt;
+ int error, amt;
/*
* How big is this read operation? Either as big as the user wants,
* or as big as the remaining data
*/
- amt = MIN(uio-&gt;uio_resid, (echomsg-&gt;len - uio-&gt;uio_offset &gt; 0) ?
- echomsg-&gt;len - uio-&gt;uio_offset : 0);
- if ((err = uiomove(echomsg-&gt;msg + uio-&gt;uio_offset, amt, uio)) != 0) {
+
+ amt = MIN(uio-&gt;uio_resid, echomsg-&gt;len - uio-&gt;uio_offset);
+ uio-&gt;uio_offset += amt;
+ if ((error = uiomove(echomsg-&gt;msg, amt, uio)) != 0)
uprintf("uiomove failed!\n");
- }
- return(err);
+
+ return (error);
}
/*
@@ -508,55 +341,57 @@ echo_read(struct cdev *dev, struct uio *uio, int ioflag)
*/
static int
-echo_write(struct cdev *dev, struct uio *uio, int ioflag)
+echo_write(struct cdev *dev __unused, struct uio *uio, int ioflag __unused)
{
- int err = 0;
+ int error, amt;
+
+ /* Copy the string in from user memory to kernel memory */
+
+ /*
+ * We either write from the beginning or are appending -- do
+ * not allow random access.
+ */
+ if (uio-&gt;uio_offset != 0 &amp;&amp; (uio-&gt;uio_offset != echomsg-&gt;len))
+ return (EINVAL);
+
+ /*
+ * This is new message, reset length
+ */
+ if (uio-&gt;uio_offset == 0)
+ echomsg-&gt;len = 0;
+
+ /* NULL character should be overridden */
+ if (echomsg-&gt;len != 0)
+ echomsg-&gt;len--;
/* Copy the string in from user memory to kernel memory */
- err = copyin(uio-&gt;uio_iov-&gt;iov_base, echomsg-&gt;msg,
- MIN(uio-&gt;uio_iov-&gt;iov_len, BUFFERSIZE - 1));
+ amt = MIN(uio-&gt;uio_resid, (BUFFERSIZE - echomsg-&gt;len));
+
+ error = uiomove(echomsg-&gt;msg + uio-&gt;uio_offset, amt, uio);
/* Now we need to null terminate, then record the length */
- *(echomsg-&gt;msg + MIN(uio-&gt;uio_iov-&gt;iov_len, BUFFERSIZE - 1)) = 0;
- echomsg-&gt;len = MIN(uio-&gt;uio_iov-&gt;iov_len, BUFFERSIZE);
+ echomsg-&gt;len += amt + 1;
+ uio-&gt;uio_offset += amt + 1;
+ echomsg-&gt;msg[echomsg-&gt;len - 1] = 0;
- if (err != 0) {
+ if (error != 0)
uprintf("Write failed: bad address!\n");
- }
- count++;
- return(err);
+ return (error);
}
DEV_MODULE(echo,echo_loader,NULL);</programlisting>
</example>
- <para>To install this driver on &os;&nbsp;4.X you will first need to
- make a node on your filesystem with a command such as:</para>
-
- <screen>&prompt.root; <userinput>mknod /dev/echo c 33 0</userinput></screen>
-
<para>With this driver loaded you should now be able to type
something like:</para>
<screen>&prompt.root; <userinput>echo -n "Test Data" &gt; /dev/echo</userinput>
&prompt.root; <userinput>cat /dev/echo</userinput>
-Test Data</screen>
+Opened device "echo" successfully.
+Test Data
+Closing device "echo".</screen>
<para>Real hardware devices are described in the next chapter.</para>
-
- <para>Additional Resources
- <itemizedlist>
- <listitem><simpara><ulink
- url="http://ezine.daemonnews.org/200010/blueprints.html">Dynamic
- Kernel Linker (KLD) Facility Programming Tutorial</ulink> -
- <ulink url="http://www.daemonnews.org/">Daemonnews</ulink> October 2000</simpara></listitem>
- <listitem><simpara><ulink
- url="http://ezine.daemonnews.org/200007/newbus-intro.html">How
- to Write Kernel Drivers with NEWBUS</ulink> - <ulink
- url="http://www.daemonnews.org/">Daemonnews</ulink> July
- 2000</simpara></listitem>
- </itemizedlist>
- </para>
</sect1>
<sect1 id="driverbasics-block">
diff --git a/en_US.ISO8859-1/books/arch-handbook/isa/chapter.xml b/en_US.ISO8859-1/books/arch-handbook/isa/chapter.xml
index 20a2996f02..578d7da34b 100644
--- a/en_US.ISO8859-1/books/arch-handbook/isa/chapter.xml
+++ b/en_US.ISO8859-1/books/arch-handbook/isa/chapter.xml
@@ -146,7 +146,7 @@
DEVMETHOD(device_suspend, xxx_isa_suspend),
DEVMETHOD(device_resume, xxx_isa_resume),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t xxx_isa_driver = {
diff --git a/en_US.ISO8859-1/books/arch-handbook/pci/chapter.xml b/en_US.ISO8859-1/books/arch-handbook/pci/chapter.xml
index b6f5aff26d..15a70da312 100644
--- a/en_US.ISO8859-1/books/arch-handbook/pci/chapter.xml
+++ b/en_US.ISO8859-1/books/arch-handbook/pci/chapter.xml
@@ -37,7 +37,7 @@
#include &lt;sys/conf.h&gt; /* cdevsw struct */
#include &lt;sys/uio.h&gt; /* uio struct */
#include &lt;sys/malloc.h&gt;
-#include &lt;sys/bus.h&gt; /* structs, prototypes for pci bus stuff */
+#include &lt;sys/bus.h&gt; /* structs, prototypes for pci bus stuff and DEVMETHOD macros! */
#include &lt;machine/bus.h&gt;
#include &lt;sys/rman.h&gt;
@@ -221,7 +221,7 @@ static device_method_t mypci_methods[] = {
DEVMETHOD(device_suspend, mypci_suspend),
DEVMETHOD(device_resume, mypci_resume),
- { 0, 0 }
+ DEVMETHOD_END
};
static devclass_t mypci_devclass;
diff --git a/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml b/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml
index 4ce5564a02..9686fae370 100644
--- a/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml
+++ b/en_US.ISO8859-1/books/arch-handbook/sound/chapter.xml
@@ -82,16 +82,16 @@
<sect1 id="oss-files">
<title>Files</title>
- <para>All the relevant code currently (FreeBSD 4.4) lives in
+ <para>All the relevant code lives in
<filename>/usr/src/sys/dev/sound/</filename>, except for the
public ioctl interface definitions, found in
<filename>/usr/src/sys/sys/soundcard.h</filename></para>
<para>Under <filename>/usr/src/sys/dev/sound/</filename>, the
<filename>pcm/</filename> directory holds the central code,
- while the <filename>isa/</filename> and
- <filename>pci/</filename> directories have the drivers for ISA
- and PCI boards.</para>
+ while the <filename>pci/</filename>, <filename>isa/</filename>
+ and <filename>usb/</filename> directories have the drivers
+ for PCI and ISA boards, and for USB audio devices.</para>
</sect1>
@@ -527,7 +527,7 @@
<function>channel_resetdone()</function>, and
<function>channel_notify()</function> are for special purposes
and should not be implemented in a driver without discussing
- it with the authorities (&a.cg;).</para>
+ it on the &a.multimedia;.</para>
<para><function>channel_setdir()</function> is deprecated.</para>
</sect3>
diff --git a/en_US.ISO8859-1/books/bibliography/Makefile b/en_US.ISO8859-1/books/bibliography/Makefile
index c638bf7fff..3a4bb68350 100644
--- a/en_US.ISO8859-1/books/bibliography/Makefile
+++ b/en_US.ISO8859-1/books/bibliography/Makefile
@@ -13,11 +13,11 @@ INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
#
-# SRCS lists the individual SGML files that make up the document. Changes
+# SRCS lists the individual XML files that make up the document. Changes
# to any of these files will force a rebuild
#
-# SGML content
+# XML content
SRCS= book.xml
DOC_PREFIX?= ${.CURDIR}/../../..
diff --git a/en_US.ISO8859-1/books/corp-net-guide/Makefile b/en_US.ISO8859-1/books/corp-net-guide/Makefile
deleted file mode 100644
index e4834d3e81..0000000000
--- a/en_US.ISO8859-1/books/corp-net-guide/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# $FreeBSD$
-
-DOC?= book
-
-FORMATS?= html
-
-INSTALL_COMPRESSED?=gz
-INSTALL_ONLY_COMPRESSED?=
-
-SRCS= book.xml
-
-IMAGES_EN= 08-01.eps
-IMAGES_EN+= 08-02.eps
-IMAGES_EN+= 08-03.eps
-IMAGES_EN+= 08-04.eps
-IMAGES_EN+= 08-05.eps
-IMAGES_EN+= 08-06.eps
-
-# Use the local DSSSL file
-DSLHTML?= ${.CURDIR}/freebsd.dsl
-DSLPRINT?= ${.CURDIR}/freebsd.dsl
-
-DOC_PREFIX?= ${.CURDIR}/../../..
-
-.include "${DOC_PREFIX}/share/mk/doc.project.mk"
diff --git a/en_US.ISO8859-1/books/corp-net-guide/book.xml b/en_US.ISO8859-1/books/corp-net-guide/book.xml
deleted file mode 100644
index abe65ada67..0000000000
--- a/en_US.ISO8859-1/books/corp-net-guide/book.xml
+++ /dev/null
@@ -1,3223 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE book PUBLIC "-//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN"
- "../../../share/xml/freebsd45.dtd">
-
-<!-- $FreeBSD$ -->
-<!-- FreeBSD Documentation Project -->
-
-<book lang='en'>
- <bookinfo>
- <title>The FreeBSD Corporate Networker's Guide</title>
-
- <author>
- <firstname>Ted</firstname>
- <surname>Mittelstaedt</surname>
- </author>
-
- <copyright>
- <year>2001</year>
- <holder>Addison-Wesley Longman, Inc (Original English language edition)</holder>
- </copyright>
-
- <copyright>
- <year>2001</year>
- <holder>Pearson Educational Japan (Japanese language translation)</holder>
- </copyright>
-
- <isbn>ENGLISH LANGUAGE EDITION ISBN: 0-201-70481-1</isbn>
- <isbn>JAPANESE LANGUAGE EDITION ISBN: 4-89471-464-7</isbn>
-
- <legalnotice id="legalnotice">
- <para>The eighth chapter of the book, <citetitle>The FreeBSD Corporate
- Networker's Guide</citetitle> is excerpted here with the permission
- of the publisher. No part of it may be further reproduced or
- distributed without the publisher's express written
- <email>Chanda.Leary-Coutu@awl.com</email>.
- The other chapters of
- <ulink url="http://cseng.aw.com/book/0,,0201704811,00.html">the
- book</ulink> covers topics such as system administration,
- fileserving, and e-mail delivery. More information about this book is
- available from the publisher, with whom you can also sign up to
- receive news of <ulink url="mailto:Chanda.Leary-Coutu@awl.com">related
- titles</ulink>. The author's web site for the book includes sample
- code, working examples,
- <ulink url="http://www.freebsd-corp-net-guide.com/errata.html">errata</ulink>
- and a Q&amp;A forum, and is available at
- <ulink url="http://www.freebsd-corp-net-guide.com/"></ulink>.</para>
- </legalnotice>
-
- <releaseinfo>$FreeBSD$</releaseinfo>
- </bookinfo>
-
- <chapter id="printserving" label="8">
- <title>Printserving</title>
-
- <para>Printserving is a complicated topic. There are many different
- software interfaces to printers, as well as a wide variety of printer
- hardware interfaces. This chapter covers the basics of setting up a
- print queue, using Samba to print, and administering print queues and
- connections.</para>
-
- <sect1 id="printserving-history">
- <title>PC printing history</title>
-
- <para>In the early days of the personal computer, printing was simple.
- The PC owner bought a cheap printer, usually a dot matrix that barely
- supported ASCII, and plugged it into the computer with a parallel
- cable. Applications would either work with the printer or not, and
- most did because all they could do was output DOS or ASCII text. The
- few software applications that supported graphics generally could only
- output on specific makes and models of printers. Shared
- <emphasis>network</emphasis> printing, if it existed, was usually done
- by some type of serial port switchbox.</para>
-
- <para>This was the general state of affairs with the PC until the
- Windows operating system was released. All at once, application
- programmers were finally free of the restrictions of worrying about
- how some printer manufacturer would change printer control codes.
- Graphics printing, in the form of fonts and images, was added to most
- applications, and demand for it rapidly increased across the
- corporation. Large, high-capacity laser printers designed for office
- printing appeared on the scene. Printing went from 150 to 300 to
- 600 dpi for the common desktop laser printer.</para>
-
- <para>Today organizational network printing is complex, and printers
- themselves are more complicated. Most organizations find that sharing
- a few high-quality laser printers is much more cost effective than
- buying many cheaper dot matrix units. Good network print serving is a
- necessity, and it can be very well provided by the FreeBSD UNIX
- system.</para>
- </sect1>
-
- <sect1 id="printserving-protocols">
- <title>Printer communication protocols and hardware</title>
-
- <para>Printers that don't use proprietary vendor codes communicate with
- computers using one or more of three major printing protocols. The
- communication is done over a hardware cable that can be a parallel
- connection (printer port) or a serial connection (COM port).</para>
-
- <sect2>
- <title>ASCII Printing Protocol</title>
-
- <para>The ASCII protocol is the simplest protocol used, as well as the
- oldest. ASCII is also used to represent text files internally in
- the DOS, UNIX, and Windows operating systems. Therefore, data taken
- from a text file or a directory listing generally requires little
- preparation before being sent to the printer, other than a
- newline-to-carriage return/linefeed conversion for UNIX. Printers
- usually follow the DOS text file convention of the print head
- requiring an explicit carriage return character followed by a
- linefeed character at the end of a line of text. Since UNIX uses
- only the linefeed character to terminate text, an additional
- carriage return character must be added to the end of each line in
- raw text print output; otherwise, text prints in a
- <emphasis>stairstep</emphasis> output. (Some printers have hardware
- or software switches to do the conversion.)</para>
- </sect2>
-
- <sect2>
- <title>PostScript Printing Protocol</title>
-
- <para>Adobe introduced the PostScript language in 1985; it is used to
- enable the printout of high quality graphics and styled font text.
- PostScript is now the de-facto print standard in the UNIX community,
- and the only print standard in the Macintosh community. Numerous
- UNIX utilities exist to <emphasis>beautify</emphasis> and enhance
- text printing with PostScript. PostScript can be used to download
- font files into a printer as well as the data to be printed.
- PostScript commands can be sent to instruct the printer CPU to
- image, rotate, and scale complex graphics and images, thus freeing
- the host CPU. Scaling is particularly important with fonts since
- the document with the font has been produced on a computer screen
- with far lower resolution than the printer. For example, a 1024x768
- computer screen on a 17-inch monitor allows for a resolution of
- approximately 82dpi, a modern desktop printer prints at a resolution
- of 600dpi. Therefore, a font must be scaled at least seven times
- larger for WYSIWYG output!</para>
-
- <para>PostScript printers generally come with a number of resident
- fonts. For example, the NEC Silentwriter 95 contains Courier,
- Helvetica, ITC Avant Garde Gothic Book, ITC Bookman Light, New
- Century Schoolbook Roman, Palatino Roman, Times Roman, and several
- symbol fonts. These are stored in Read Only Memory (ROM) in the
- printer. When a page is printed from a Windows client that contains
- a font not in the printer, a font substitution table is used. If no
- substitute can be made, Courier is usually used. The user should be
- conscious of this when creating documents - documents with fonts not
- listed in the substitution table may cause other users problems when
- printing. Avoid use of strange fonts for documents that will be
- widely distributed.</para>
-
- <para>The user program can choose to download different fonts as
- outline fonts to the PostScript printer if desired. Fonts that are
- commonly used by the user are often downloaded to PostScript
- printers that are connected directly to the user's computer, the
- fonts are then available to successive print jobs until the printer
- is turned off. When PostScript printers are networked, the clients
- must download any fonts desired <emphasis>with each print
- job</emphasis>. Since jobs come from different clients, the
- clients cannot assume that downloaded fonts will still be in the
- printer.</para>
-
- <para>PostScript print jobs also contain a header that is sent
- describing the page layout, among other things. On a shared network
- printer, this header must also be downloaded with each print job.
- Although some PostScript drivers allow downloading of the header
- only once, this usually requires a bi-directional serial connection
- to the printer, instead of a unidirectional parallel
- connection.</para>
-
- <para>PostScript print jobs can be sent either as binary data or as
- ASCII. The main advantage of binary data transmission is that it is
- faster. However, not all PostScript printers support it. Also,
- fonts can generally not be downloaded in binary. When FreeBSD is
- used as a printserver, ASCII PostScript printing should be selected
- on the clients, this is generally the default with most PostScript
- drivers.</para>
-
- <para>The Adobe company licenses PostScript interpreters as well as
- resident fonts to printer manufacturers, and extracts a hefty
- license fee from any printer manufacturer who wants to use them in
- its printer. This presents both a benefit and a problem to the end
- user. Although a single company holding control over a standard can
- guarantee compliance, it does significantly raise the cost of the
- printer. As a result, PostScript has not met with much success in
- the lower-end laser and inkjet Windows printing market, despite the
- fact that Adobe distributes PostScript software operating system
- drivers for free.</para>
-
- <para>One issue that is a concern when networking PostScript printers
- is the selection of banner page, (also known as header page, or
- <emphasis>burst page)</emphasis> printing. UNIX shared printing
- began with ASCII line printers, and since UNIX is a multiuser
- system, often many different user print jobs piled up in the printer
- output hopper. To separate these jobs the UNIX printing system
- programs support banner page printing if the client program that
- submits jobs asks for them. These pages print at the beginning or
- end of every print job and contain the username, submittal date, and
- so on.. By default, most clients, whether remote (e.g., a Windows
- LPR client) or local (e.g., the <command>/usr/bin/lpr</command>
- program) trigger a banner page to be printed. One problem is that
- some PostScript printers abort the entire job if they get
- unformatted ASCII text instead of PostScript. (In general,
- PostScript printers compatible with Hewlett-Packard Printer Control
- Language [HPPCL] handle banners without problems) Banner printing
- should be disabled for any printers with this problem, unless
- PostScript banner page printing is set up on the server.</para>
- </sect2>
-
- <sect2>
- <title>HPPCL Printing Protocol</title>
-
- <para>The Hewlett Packard company currently holds the largest market
- share of desktop inkjet and office laser printers. Back when
- Windows was released, HP decided to expand into the desktop laser
- jet market with the first LaserJet series of printers. At the time
- there was much pressure on Microsoft to use Adobe Type Manager for
- scalable fonts within Windows, and to print PostScript to
- higher-end printers. Microsoft decided against doing this and used
- a technically inferior font standard, Truetype. They thought that
- it would be unlikely that the user would download fonts to the
- printer, since desktop Publishing was not being done on PC's at the
- time. Instead users would rasterize the entire page to the printer
- using whatever proprietary graphics printer codes the selected
- printer needed. HP devised HPPCL for their LaserJets, and make
- PostScript an add-on. The current revision of HPPCL now allows for
- many of the same scaling and font download commands that PostScript
- does. HP laser jet printers that support PostScript can be
- distinguished by the letter "M" in their model number. (M is for
- Macintosh, since Macintosh requires PostScript to print) For
- example, the HP 6MP has PostScript, the 6P doesn't.</para>
-
- <para>HPPCL has almost no support in the UNIX applications market, and
- it is very unlikely that any will appear soon. One big reason is
- the development of the free <application>Ghostscript</application>
- PostScript interpreter. <application>Ghostscript</application> can
- take a PostScript input stream and print it on a PCL printer under
- UNIX. Another reason is the UNIX community's dislike of reinventing
- the wheel. HPPCL has no advantage over PostScript, and in many ways
- there are fewer problems with PostScript. Considering that
- PostScript can be added to a printer, either by hardware or use of
- <application>Ghostscript</application>, what is the point of
- exchanging an existing working solution for a slightly technically
- inferior one? Over the life of the printer, taking into account the
- costs of toner, paper, and maintenance, the initial higher cost of
- PostScript support is infinitesimal.</para>
- </sect2>
- </sect1>
-
- <sect1 id="printserving-network">
- <title>Network Printing Basics</title>
-
- <para>The most common network printing implementation is a printserver
- accepting print jobs from clients tied to the server via a network
- cable.</para>
-
- <sect2>
- <title>Printservers</title>
-
- <para>The term "printserver" is one of those networking terms, like
- <emphasis>packet,</emphasis> that has been carelessly tossed around
- until its meaning has become somewhat confusing and blurred. To be
- specific, a printserver is simply a program that arbitrates print
- data from multiple clients for a single printer. Printservers can
- be implemented in one of the four methods described in the following
- sections.</para>
-
- <sect3>
- <title>Printserver on the fileserver</title>
-
- <para>The printer can be physically cabled to the PC running the
- Network OS. Print jobs are submitted by clients to the
- printserver software on the fileserver, which sends them down the
- parallel or serial cable to the printer. The printer must be
- physically close to the fileserver. This kind of printserving is
- popular in smaller workgroup networks, in smaller offices.</para>
-
- <figure>
- <title>Printserver on the fileserver</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="08-01" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced"> ,---------.
- | ======= | Server
- | ======= | +---------------------+ ,-----.
-+-----------+ | +---------------+ | | |
-| Printer [ ]------------[ ] | Printserver | | |_____|
-+-----------+ Parallel | | Software | [ ]------_________
- Cable | +---------------+ | / ::::::: \
- +---------------------+ `---------'
- Network PC</literallayout>
- </textobject>
-
- <textobject>
- <phrase>Printer, connected to a network server running
- printserver software, with one or more network PCs printing
- through it.</phrase>
- </textobject>
- </mediaobject>
- </figure>
- </sect3>
-
- <sect3>
- <title>Printserver on a separate PC</title>
-
- <para>It is possible to run a print server program on a cheap PC
- that is located next to the printer and plugged into it via
- parallel cable. This program simply acts as a pass-through
- program, taking network packets from the network interface and
- passing them to the printer. This kind of server doesn't allow
- any manipulation of print jobs, jobs usually come from a central
- fileserver, where jobs are controlled.</para>
-
- <figure>
- <title>Printserver on a separate PC</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="08-02" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced"> Fileserver
- ,----------------.
- ,---------. .---| | === |
- | ======= | ,-----. | `----------======'
- | ======= | | | |
- +-----------+ |_____| |
- | Printer [ ]------------_________---------| Ethernet
- +-----------+ Parallel / ::::::: \ |
- Cable `---------' |
- Printserver | ,-----.
- | | |
- | |_____|
- `---------_________
- / ::::::: \
- `---------'
- Network PC</literallayout>
- </textobject>
-
- <textobject>
- <phrase>Printer connected to a printserver (typically running
- FreeBSD), with network files hosted on a separate machine,
- and a network PC, able to access both resources.</phrase>
- </textobject>
- </mediaobject>
- </figure>
- </sect3>
-
- <sect3>
- <title>Printserver on a separate hardware box</title>
-
- <para>A printserver on a separate hardware box is exemplified by
- network devices such as the Intel Netport, the HP JetDirect Ex,
- the Osicom/DPI NETPrint, and the Lexmark MarkNet. Basically, these
- are plastic boxes with an Ethernet connection on one side and a
- parallel port on the other. Like a printserver on a PC, these
- devices don't allow remote job manipulation, and merely pass
- packets from the network down the parallel port to the
- printer.</para>
-
- <figure>
- <title>Printserver on a separate hardware box</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="08-03" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced"> Fileserver
- ,----------------.
- ,---------. .---| | === |
- | ======= | | `----------======'
- | ======= | Printserver |
- +-----------+ ,--------. |
- | Printer [ ]-----------[ ] ooo [ ]-------| Ethernet
- +-----------+ Parallel `--------' |
- Cable |
- | ,-----.
- | | |
- | |_____|
- `---------_________
- / ::::::: \
- `---------'
- Network PC</literallayout>
- </textobject>
-
- <textobject>
- <phrase>Printer connected to a dedicated print server
- <quote>appliance</quote>.</phrase>
- </textobject>
- </mediaobject>
- </figure>
- </sect3>
-
- <sect3>
- <title>Printserver in the Printer</title>
-
- <para>The HP JetDirect Internal is the best known printserver of
- this type. It is inserted into a slot in the printer case, and it
- works identically to the external JetDirect units.</para>
-
- <figure>
- <title>Printserver in the printer</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="08-04" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced"> Fileserver
- ,----------------.
- ,---------. .---| | === |
- | ======= | | `----------======'
- | ======= | |
- +-----------+ |
- | Printer [ ]------------------------------| Ethernet
- +-----------+ |
- |
- | ,-----.
- | | |
- | |_____|
- `---------_________
- / ::::::: \
- `---------'
- Network PC</literallayout>
- </textobject>
-
- <textobject>
- <phrase>Printer with an embedded print server, connecting
- directly to the local network.</phrase>
- </textobject>
- </mediaobject>
- </figure>
- </sect3>
- </sect2>
-
- <sect2>
- <title>Printspools</title>
-
- <para>Printspooling is an integral part of network printing. Since
- the PC can spit out data much faster than the printer can accept it,
- the data must be buffered in a spool at some location. In addition,
- because many clients share printers, when clients send print jobs at
- the same time, jobs must be placed on a queue so that one can be
- printed after the other.</para>
-
- <sect3>
- <title>Logical location of the print spool</title>
-
- <para>Printspooling can be implemented at one of three
- locations</para>
-
- <orderedlist>
- <listitem>
- <para>The client. Clients can be required to spool their own
- print jobs on their own disks. For example, when a Windows
- client application generates a print job the job must be
- placed on the local client's hard drive. Once the remote
- print server is free to accept the job it signals the client
- to start sending the job a bit at a time. Client spooling is
- popular in peer-to-peer networks with no defined central
- fileserver. However, it is impossible for a central
- administrator to perform advanced print job management tasks
- such as moving a particular print job ahead of another, or
- deleting jobs.</para>
- </listitem>
-
- <listitem>
- <para>The printserver. If each printer on the network is
- allocated their own combination print spooler-printserver,
- jobs can stack at the printer. Many of the larger printers
- with internal printservers have internal hard disks for this
- purpose. Although this enables basic job management, it still
- restricts the ability to move jobs from one printer to
- another.</para>
- </listitem>
-
- <listitem>
- <para><emphasis>A central print spooler on a
- fileserver</emphasis>. Print jobs are received from all
- clients on the network in the spool and then dispatched to the
- appropriate printer. This scheme is the best for locations
- with several busy printers and many clients. Administration
- is extremely simple because all print jobs are spooled on a
- central server, which is particularly important in bigger
- organizations. Many large organizations have standardized on
- PostScript printing for all printing; in the event that a
- particular printer fails and is offline, incoming PostScript
- print jobs can be rerouted automatically to another printer.
- Since all printers and clients are using PostScript, clients
- don't need to be reconfigured when this happens. Print jobs
- appear the same whether printed on a 4 page-per-minute NEC
- Silentwriter 95, or a 24 page-per-minute HP LaserJet 5SiMX if
- both printers are defined in the client as PostScript
- printers.</para>
- </listitem>
- </orderedlist>
-
- <figure>
- <title>Print spool locations</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="08-05" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced"> Client
- ,---------. PC
- | ======= | ,-----.
- | ======= | | |
- +-----------+ |_____|
- | Printer [ ]---------------------------------------------------_________
- +-----------+ / ::::::: \
- `---------'
- Spool
-
- Printserver
- ,---------. PC
- | ======= | ,-----.
- | ======= | | |
- +-----------+ ,----------------. |_____|
- | Printer [ ]--------------| | === |-------------------_________
- +-----------+ `----------======' / ::::::: \
- Spool `---------'
-
-
- Fileserver
- ,---------. PC
- | ======= | ,-----.
- | ======= | Printserver Fileserver | |
- +-----------+ ,----------------. ,----------------. |_____|
- | Printer [ ]----| | === |-----| | === |------_________
- +-----------+ `----------======' `----------======' / ::::::: \
- Spool `---------'</literallayout>
- </textobject>
-
- <textobject>
- <phrase>Possible locations for the print spool</phrase>
- </textobject>
- </mediaobject>
- </figure>
-
- <para>FreeBSD is an excellent platform to implement centralized
- printserving and print spooling. The rest of this chapter
- concentrates on the centralized print spooler model. Note that
- PostScript printing is not a requirement for this model--the HPPCL
- protocol can be the standard print protocol as well. For
- transparent printing between printers with HPPCL, however, the
- printer models must be similar.</para>
- </sect3>
-
- <sect3>
- <title>Physical location of the print spool</title>
-
- <para>In some companies, the central fileserver is often placed in a
- closet, locked away. Printers, on the other hand, are best
- located in high traffic areas for ease of use. Network printing
- works best when the printers are evenly distributed throughout the
- organization. Attempting to place all the major printers in one
- location, as technically advantageous as it may seem, merely
- provokes users to requisition smaller printers that are more
- convenient for that quick print job. The administrator may end up
- with a datacenter full of nice, expensive printers that are never
- used, while the smaller personal laser printers scattered
- throughout the plant bear most of the printing load.</para>
-
- <para>The big problem with this is that scattering printers through
- the organization makes it difficult to utilize the 3 possible
- parallel ports on the fileserver due to parallel port distance
- limitations. Although high-speed serial ports may extend the
- distance, not many printers have good serial ports on them. This
- is where the hardware network print server devices can come into
- play. I prefer using these devices because they are much cheaper
- and more reliable than a standalone PC running printserver
- software. For example, Castelle
- <ulink url="http://www.castelle.com/"></ulink>
- sells the LANpress 1P/10BT printserver for about $170.00. Using
- these devices a FreeBSD UNIX server can have dozens of print spools
- accepting print jobs and then route them back out over the network
- to these remote printserver boxes. If these hardware servers are
- used, they must support the Line Printer Daemon (LPD) print
- protocol.</para>
-
- <para>With a scheme like this it is important to have enough disk
- space on the spool to handle the print jobs. A single large
- PowerPoint presentation PostScript print job containing many
- graphics may be over 100MB. When many such jobs stack up in the
- print spool waiting to print, the print spooler should have
- several gigabytes of free disk space available.</para>
- </sect3>
-
- <sect3>
- <title>Network Printing to Remote Spools</title>
-
- <para>Although several proprietary network printing protocols such
- as Banyan Vines and NetWare, are tied to proprietary network protocols,
- FreeBSD UNIX can use two TCP/IP network printing protocols to
- print to remote print spools. The two print protocols available
- on TCP/IP with FreeBSD are the open LPD protocol and the
- NetBIOS-over-TCP/IP Server Messaging Block (SMB) print protocol
- first defined by Intel and Microsoft and later used by IBM and
- Microsoft.</para>
-
- <para>The LPD protocol is defined in RFC1179. This network protocol
- is the standard print protocol used on all UNIX systems. LPD
- client implementations exist for all Windows operating systems and
- DOS. Microsoft has written LPD for the Windows NT versions, the
- other Windows operating system implementations are provided by
- third parties.</para>
-
- <para>The Microsoft Networking network protocol that runs on top of
- SMB can use NetBIOS over TCP/IP as defined in RFC1001 and RFC1002.
- This protocol has a specification for printing that is the same
- print protocol used to send print jobs to NT Server by Microsoft
- clients. To implement this protocol on FreeBSD requires the
- installation of the Samba client suite of programs discussed in
- Chapter 7.</para>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="printserving-lpr-windows">
- <title>Setting up LPR on Windows clients</title>
-
- <para>The program clients use to print via LPD is the Line Printer
- Remote, or LPR program. The following instructions cover enabling
- this program on Windows clients.</para>
-
- <sect2>
- <title>Windows 3.1/Windows for Workgroups 3.11</title>
-
- <para>Several commercial TCP/IP stacks are available for Win31, that
- provide LPR client programs, in addition to the basic TCP/IP
- protocol to Win31. WfW has TCP/IP networking available for free
- from Microsoft, but it doesn't include an LPR client. Unfortunately,
- I have not come across a freeware implementation of a 16-bit Windows
- LPR client, so with the following instructions I use the Shareware
- program WLPRSPL available from
- <ulink url="http://www.winsite.com/info/pc/win3/winsock/wlprs41.zip"></ulink>.
- This program must be active during client printing, and is usually
- placed in the Startup group.</para>
-
- <para>Organizations that want to use UNIX as a printserver to a group
- of Win31 clients without using a commercial or shareware LPR program
- have another option. The Microsoft Networking client for DOS used
- underneath Win31 contains SMB-based printing which is covered later
- in the chapter. DOS networking client setup and use are covered in
- Chapter 2 and Chapter 7.</para>
-
- <para>If LPR-based client printing is desired and the organization
- doesn't want to upgrade to Win95, (which has several LPR clients
- available) the following instructions can be used. WLPRSPL needs a
- Winsock under Windows 3.1, so for the example I explain the setup of
- the Novell 16-bit TCP/IP client. The stack can be FTPed from
- Novell, and is easy to integrate into sites that already use the
- 16-bit NetWare networking client, usually NW 3.11 and 3.12. In most
- cases, however, sites that use NetWare + Win31 are probably best off
- printing through the NetWare server, then loading an LPR spooler as
- an Netware Loadable Module (NLM) to send the job over to
- FreeBSD.</para>
-
- <para>As an alternate, the Microsoft Networking DOS 16-bit TCP/IP
- client under Win31 contains a Winsock, as does Microsoft TCP/IP for
- WfW. The target machine used here is a Compaq Deskpro 386/33 with
- 12MB of ram with an operating version of Windows 3.1, and a 3com
- 3C579 EISA network card. The instructions assume an LPR printserver
- on the network, named <hostid>mainprinter.my.domain.com</hostid>
- with a print queue named RAW.</para>
-
- <para>Use the installation instructions in Exhibit 8.1 for a quick and
- dirty TCP/IP Winsock for Win31 systems. Administrators who already
- have the Novell IPX client installed should skip those steps.</para>
- </sect2>
-
- <sect2>
- <title>Installation of the Novell TCP/IP Winsock client</title>
-
- <procedure>
- <step>
- <para>Make sure that the machine has enough environment space
- (2048 bytes or more) by adding the following line to the
- <filename>config.sys</filename> file and rebooting:</para>
-
- <programlisting>SHELL=C:\COMMAND.COM /E:2048 /P</programlisting>
- </step>
-
- <step>
- <para>Obtain the <filename>TCP16.EXE</filename> file from
- <ulink url="ftp://ftp3.novell.com/pub/updates/eol/nweol/tcp16.exe"></ulink>.</para>
- </step>
-
- <step>
- <para>Obtain the Network Adapter support diskette for the network
- card in your machine. This should be supplied with the card, or
- available via FTP from the network adapter manufacturer's FTP
- site.</para>
- </step>
-
- <step>
- <para>Now you need the file <filename>LSL.COM</filename>. This is
- available on some Network Adapter Driver diskettes, it used to
- be available from the <filename>VLM121_2.EXE</filename> file
- from Novell but unfortunately this file is no longer publicly
- accessible from Novell.</para>
- </step>
-
- <step>
- <para>If you have <filename>vlm121_2.exe</filename> in a temporary
- directory, run it. This will extract a number of files.</para>
- </step>
-
- <step>
- <para>One of the files extracted is <filename>LSL.CO_</filename>
- extract this file with the command <command>nwunpack
- lsl.co_</command>.</para>
- </step>
-
- <step>
- <para>Create the directory <filename>c:\nwclient</filename>. Then,
- copy <filename>lsl.com</filename> from the temporary directory
- into the directory.</para>
- </step>
-
- <step>
- <para>Obtain and install the printer driver for the model of
- printer that you will be spooling to and point it to
- <devicename>LPT1:</devicename>. Win31 and WfW 3.11 have an
- incomplete printer driver list, so if you need a driver
- Microsoft has many Win16 printer drivers on their FTP site. A
- list is available at
- <ulink url="ftp://ftp.microsoft.com/Softlib/index.txt"></ulink>.
- In addition, if you are installing a PostScript printer driver
- for a printer supplied in Win31, it may be necessary to patch
- the driver. The Microsoft PostScript driver supplied in Win31
- is version 3.5. (The patch named
- <filename>PSCRIP.EXE</filename> which brought the PostScript
- driver to version 3.58 is no longer publicly available.) WfW
- already uses the more recent PostScript driver, as does Win31
- version A. Installing the Adobe PostScript driver for Win31 is
- also an option. (see
- <ulink url="http://www.adobe.com/support/downloads/pdrvwin.htm"></ulink>
- for the version 3.1.2 Win31 PostScript driver).</para>
- </step>
-
- <step>
- <para>Look on the network adapter driver disk for the subdirectory
- <filename>nwclient/</filename> and then look for the ODI driver
- for the adapter card. For example, on the 3com 3C509/3C579
- adapter driver disk, the driver and location are
- <filename>\NWCLIENT\3C5X9.COM</filename>. Copy this driver to
- the <filename>c:\nwclient</filename> directory.</para>
- </step>
-
- <step>
- <para>Create a file called <filename>NET.CFG</filename> in the
- <filename>c:\nwclient</filename> directory. Often, the network
- card adapter driver diskette has a template for this file in the
- same location as the ODI driver. This can be modified, as can
- the following example:</para>
-
- <programlisting>LINK SUPPORT
-
-BUFFERS 4 1600
-
-MEMPOOL 8192
-
-LINK DRIVER
-3C5X9
-
-; PORT 300 (these are optional, if needed by card uncomment)
-
-; INT 10 (optional, uncomment and modify if needed)</programlisting>
- </step>
-
- <step>
- <para>Attempt to load the network card driver. First load
- <filename>lsl</filename>, then the ODI driver. With the 3com
- card the commands are:</para>
-
- <screen><userinput>lsl</userinput>
-<userinput>3c5x9</userinput></screen>
-
- <para>If the driver properly loads it will list the hardware port
- and interrupt settings for the network adapter. If it has
- loaded properly, unload the drivers in reverse order with the
- <option>/u</option> command:</para>
-
- <screen><userinput>3c5x9 /u</userinput>
-<userinput>lsl /u</userinput></screen>
- </step>
-
- <step>
- <para>Go to the temporary directory that contains the
- <filename>tcp16.exe</filename> file and extract it by running
- the program.</para>
- </step>
-
- <step>
- <para>Run the install batch file by typing
- <command>installr</command>. It should list <literal>New
- Installation detected</literal>. It will then copy a number
- of files into <filename>nwclient</filename>, add some
- commented-out sections to <filename>net.cfg</filename>, and call
- <command>edit</command> on <filename>net.cfg</filename>.</para>
- </step>
-
- <step>
- <para>Read the editing instructions and make the appropriate
- entries. The sample <filename>net.cfg</filename> file from
- above would look like this.</para>
-
- <programlisting>LINK SUPPORT
-
-BUFFERS 4 1600
-
-MEMPOOL 8192
-
-LINK DRIVER 3C5X9
-
-FRAME ETHERNET_II
-
-Protocol TCPIP
-
-PATH TCP_CFG c:\nwclient
-
-ip_address 192.168.1.54 LAN_NET
-
-ip_netmask 255.255.255.0 LAN_NET
-
-ip_router 192.168.1.1 LAN_NET
-
-Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
-
- <para>Save and exit, the Installer should list <literal>TCP16
- installation completed</literal>.</para>
- </step>
-
- <step>
- <para>Reload the client with the commands:</para>
-
- <screen><userinput>lsl</userinput>
-<userinput>3c5x9</userinput>
-<userinput>tcpip</userinput></screen>
-
- <para>The TCP/IP driver should list the IP numbers and other
- information.</para>
- </step>
-
- <step>
- <para>Optionally, create either a <filename>HOSTS</filename> file,
- or a <filename>RESOLV.CFG</filename> file (pointing to a
- nameserver) in <filename>c:\nwclient</filename>. Check to see
- this is operating properly by pinging a hostname.</para>
-
- <para>Add the <filename>c:\nwclient</filename> directory to the
- <envar>PATH</envar>, as well as the 3 startup commands in step
- 15 in <filename>autoexec.bat</filename></para>
- </step>
- </procedure>
- </sect2>
-
- <sect2>
- <title>Installation of the LPR client on 16-bit Windows with a Winsock
- installed</title>
-
- <para>The following assumes a running Win31 installation with a
- Winsock or a running WfW installation with the 32-bit Microsoft
- TCP/IP protocol installed.</para>
-
- <procedure>
- <step>
- <para>Install the printer driver desired. See step 8 of the
- previous set of instructions.</para>
- </step>
-
- <step>
- <para>Obtain and extract into a temporary directory the
- <filename>wlprs41.zip</filename> file from the location
- mentioned above.</para>
- </step>
-
- <step>
- <para>Run <command>setup.exe</command> from the temporary
- directory containing the <filename>wlprs</filename> files.
- </para>
- </step>
-
- <step>
- <para>In setup, accept default directory, and check Yes to add to
- its own group. Click <guibutton>Continue</guibutton> when asked
- for group name, and check whatever choice you want when asked to
- copy the <filename>doc</filename> files.</para>
- </step>
-
- <step>
- <para>Click <guibutton>No</guibutton> when asked to add the
- program to <literal>Startup</literal>.</para>
- </step>
-
- <step>
- <para>On the UNIX FreeBSD print spooler, make sure that there is
- an entry in <filename>/etc/hosts.lpd</filename> or
- <filename>/etc/hosts.equiv</filename> for the client
- workstation, thereby allowing it to submit jobs.</para>
- </step>
-
- <step>
- <para>Double-click the Windows LPR Spooler icon in the Windows LPR
- Spooler group that is opened. When it asks for a valid spool
- directory, just select the <filename>c:\wlprspl</filename>
- directory that the program installed its files into.</para>
- </step>
-
- <step>
- <para>When asked for a valid Queue Definition File, just click
- <guibutton>OK</guibutton> to use the default filename. The
- program automatically creates a queue definition file.</para>
- </step>
-
- <step>
- <para>The program opens up with its menu. Click
- <guibutton>Setup</guibutton> in the top menu, then select
- <guimenuitem>Define New Queue</guimenuitem>.</para>
- </step>
-
- <step>
- <para>For a local spool filename, just use the name of the remote
- queue (RAW) to which the client prints.</para>
- </step>
-
- <step>
- <para>For the remote printer name, use the same name as the remote
- queue (RAW) to which the client prints.</para>
- </step>
-
- <step>
- <para>For the remote hostname, use the machine name
- of the FreeBSD print spooler.
- <hostid role="fqdn"><replaceable>mainprinter.ayedomain.com</replaceable></hostid>.</para>
- </step>
-
- <step>
- <para>For the Description, enter a description such as
- <literal>3rd floor Marketing printer</literal>.</para>
- </step>
-
- <step>
- <para>For the protocol, leave the default of BSD LPR/LPD
- selected.</para>
- </step>
-
- <step>
- <para>Click on the <guimenuitem>Queue Properties</guimenuitem>,
- and make sure that the <guilabel>Print unfiltered</guilabel> is
- selected. If you're printing PostScript, then also click the
- <guibutton>Advanced options</guibutton> button. Make sure that
- <guilabel>Remove trailing Ctrl-D</guilabel> is
- <emphasis>unchecked</emphasis>, and that <guilabel>Remove
- Leading Ctrl-D</guilabel> is <emphasis>checked</emphasis>.
- Also with PostScript, if the printer cannot print ASCII, uncheck
- the <guilabel>Send header page</guilabel> box. (PostScript
- header/banner pages are discussed later in this chapter)</para>
- </step>
-
- <step>
- <para>Click <guibutton>OK</guibutton>. At the main menu of the
- program, click <guimenu>File</guimenu>, then <guimenu>Control
- Panel/Printers</guimenu> to bring up the Printers control
- panel of Windows.</para>
- </step>
-
- <step>
- <para>Make sure that the <guilabel>Use Print Manager</guilabel>
- button is checked, then highlight the printer driver and click
- the <guibutton>Connect</guibutton> button.</para>
- </step>
-
- <step>
- <para>Scroll down to the <guilabel>C:\WLPRSPL\RAW</guilabel> entry
- for the spool that was built and highlight this. Click
- <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>Minimize the Windows LPR Spooler. Copy the Windows LPR
- Spooler icon to the Startup group. Click
- <guimenu>File/Properties</guimenu> with the Windows LPR Spooler
- icon highlighted in the Startup group. Check the <guilabel>Run
- Minimized</guilabel> button.</para>
- </step>
-
- <step>
- <para>Exit Windows, and when the <guibutton>Save queue
- changes?</guibutton> button comes up, click
- <guibutton>Yes</guibutton>.</para>
- </step>
-
- <step>
- <para>Restart windows and make sure that the spooler starts
- up.</para>
- </step>
-
- <step>
- <para>Open the Control Panel and look for a new yellow icon named
- <guiicon>Set Username</guiicon> If you are running the Novell or
- other Winsock under Win31, click on this icon and put the
- username of the person using this computer into the space
- provided. If you are running WfW, this isn't necessary because
- Windows will supply the username.</para>
- </step>
-
- <step>
- <para>If the spooler is not started properly in some
- installations, there may be a bug. If placing the icon in the
- Startup group doesn't actually start the spooler, the program
- name can be placed in the <literal>run=</literal> line of
- <filename>win.ini</filename>.</para>
- </step>
-
- <step>
- <para>Try printing a print job from an application such as
- Notepad. If everything goes properly, clicking on the
- <guimenuitem>Queues/Show remote printer status</guimenuitem>" in
- the Windows LPR menu should show the print job spooled and
- printing on the remote printserver.</para>
- </step>
- </procedure>
- </sect2>
-
- <sect2>
- <title>Installation of LPR client on Windows 95/98</title>
-
- <para>The <command>wlprspl</command> program also can be used under
- Windows 95, but as a 16-bit program, it is far from an optimal
- implementation on a 32-bit operating system. In addition, Win95 and
- its derivatives fundamentally changed from Windows 3.1 in the
- printing subsystem. For these reasons I use a different LPR client
- program for Win95/98 LPR printing instructions. It is a full 32-bit
- print program, and it installs as a <emphasis>Windows 32-bit
- printer</emphasis> <emphasis>port monitor</emphasis>. The program
- is called ACITS LPR Remote Printing for Windows 95 and it is located
- at <ulink url="http://shadowland.cc.utexas.edu/acitslpr.htm"></ulink>.</para>
-
- <para>ACITS stands for Academic Computing and Instructional
- Technologies Services. The ACITS LPR client includes software
- developed by the University of Texas at Austin and its contributors,
- it was written by Glenn K. Smith, a systems analyst with the
- Networking Services group at the university. The filename of the
- archive in the original program was ACITSLPR95.EXE and as of version
- 1.4 it was free for individuals or organizations to use for their
- internal printing needs. Since that time, it has gotten so popular
- that the university has taken over the program, incremented the
- version number (to get out from under the free license) and is now
- charging a $35 per copy fee for commercial use for the newer
- versions. The older free version can still be found on overseas FTP
- servers, such as
- <ulink url="http://www.go.dlr.de/fresh/pc/src/winsock/acitslpr95.exe"></ulink>.</para>
-
- <para>It is likely that the cost of a shareware/commercial LPR program
- for Win95 plus the cost of Win95 itself will meet or exceed that of
- Win2K. As such, users wishing to print via LPR to FreeBSD UNIX
- systems will probably find it cheaper to simply upgrade to Windows
- NT Workstation or Win2K.</para>
-
- <para>ACITS LPR and Win95 have a few printing idiosyncrasies. Most
- Win95 programs, such as Microsoft Word, expect print output to be
- spooled on the local hard drive and then metered out to a printer
- that is plugged into the parallel port. Network printing, on the
- other hand, assumes that print output will go directly from the
- application to the remote print server. Under Win95, local ports
- have a setting under Properties, Details, Spool Settings labeled
- "Print directly to the printer". If this is checked, the
- application running on the desktop (such as Microsoft Word) will not
- create a little Printer icon with pages coming out of it or use
- other means of showing the progress of the job as it is built. This
- can be very disconcerting to the user of a network printer, so this
- option should be checked only with printers plugged directly into
- the parallel port. Worse, if this is checked with ACITS, it can
- cause the job to abort if the remote print spooler momentarily goes
- offline.</para>
-
- <para>Another local setting also should be changed. Generally, with
- local ports, Win95 builds the first page in the spooler and then
- starts printing it while the rest of the pages spool. If ACITS
- starts printing the first page while the rest of the pages are
- building, timeouts at the network layer can sometimes cause very
- large jobs to abort. The entire job should be set to completely
- spool before the LPR client passes it to the UNIX spooler. The
- problem is partly the result of program design: because ACITS is
- implemented as a local printer port instead of being embedded into
- Win95 networking (and available in Network Neighborhood) the program
- acts like a local printer port in some ways.</para>
-
- <para>The LPR program can be set to deselect banner/burst page
- printing if a PostScript printer that cannot support ASCII is used.
- The burst pages referred to here are NOT generated by the Windows
- machine. Use the instructions in Exhibit 8.3 to install ACITS.</para>
-
- <procedure>
- <title>LPR client on Win95/98 installation instructions</title>
-
- <step>
- <para>Obtain the <filename>ACITSLPR95.EXE</filename> file and
- place it in a temporary directory such as
- <filename>c:\temp1</filename>.</para>
- </step>
-
- <step>
- <para>Close all running programs on the desktop. The computer
- <emphasis>must</emphasis> be rebooted at completion of
- installation or the program will not work.</para>
- </step>
-
- <step>
- <para>Click <guibutton>Start</guibutton>,
- <guimenuitem>Run</guimenuitem> and type in
- <userinput>c:\temp1\acitslpr95</userinput> then click
- <guibutton>Yes</guibutton> at the InstallShield prompt.</para>
- </step>
-
- <step>
- <para>Click <guibutton>Next</guibutton>, then
- <guibutton>Yes</guibutton>. The program will run through some
- installation and then presents a Help screen that explains how
- to configure an LPR port.</para>
- </step>
-
- <step>
- <para>After the help screen closes, the program asks to reboot the
- system. Ensure that <guilabel>Yes</guilabel> is checked and
- click <guibutton>Finish</guibutton> to reboot.</para>
- </step>
-
- <step>
- <para>After the machine comes back up, install a Printer icon in
- the <guibutton>Start</guibutton>, <guimenu>Settings</guimenu>,
- <guimenuitem>Printers</guimenuitem> folder if one hasn't been
- created for the correct model of destination printer.</para>
- </step>
-
- <step>
- <para>With the Printers folder open, right-click over the printer
- icon that needs to use the LPR program and click on the
- <guilabel>Properties</guilabel> tab.</para>
- </step>
-
- <step>
- <para>Under the <guilabel>Details</guilabel> tab, click the
- <guilabel>Add Port</guilabel> tab, then click
- <guibutton>Other</guibutton>.</para>
- </step>
-
- <step>
- <para>Highlight the <guilabel>ACITS LPR Remote Printing</guilabel>
- line and click <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>The Add ACITS LPR screen opens. Type in the hostname of the
- UNIX system that the client spools through&mdash;
- <hostid role="fqdn"><replaceable>mainprinter.ayedomain.com</replaceable></hostid>.</para>
- </step>
-
- <step>
- <para>Type in the Printer/Queue name and click
- <guibutton>OK</guibutton>. (Some versions have a "Verify Printer
- Information" button.) The LPR program then contacts the UNIX
- host and makes sure that the selected printer is
- available.</para>
-
- <note>
- <para>If this fails the client machine name is probably not in
- the <filename>/etc/hosts.equiv</filename> or
- <filename>etc/hosts.lpd</filename> on the FreeBSD printserver.
- Most sites may simply decide to put a wildcard in
- <filename>hosts.equiv</filename> to allow printing, especially
- if DHCP is used, but many security-conscious sites may stick
- with individual entries in
- <filename>hosts.lpd</filename>.</para>
- </note>
- </step>
-
- <step>
- <para>If the printer is PostScript and cannot print ASCII, make
- sure that the "No banner page control flag" is checked to turn
- off banner pages. Accessible under Port settings, this flag is
- overridden if the <filename>/etc/printcap</filename> file
- specifies no banner pages.</para>
- </step>
-
- <step>
- <para>Review how the "send plain text control flag" is set. With
- this flag unchecked, the LPR code sent is L, (i.e., print
- unfiltered) meaning that the <literal>if</literal> filter gets
- called with the <option>-c</option> option. This is equivalent
- to the local invocation of <filename>/usr/bin/lpr -l</filename>.
- With the flag checked, the code is F, (formatted) meaning that
- the <literal>if</literal> filter gets called without the
- <option>-c</option> option. This is equivalent to the default
- invocation <filename>/usr/bin/lpr</filename>. (This is also an
- issue under Windows NT, which retypes the print job to text if
- this flag is checked. Some filters understand the
- <option>-c</option> flag, which is used to preserve control
- characters, so it should generally remain unchecked.</para>
- </step>
-
- <step>
- <para>Leave the "Send data file before control file" box
- unchecked. This option is used only in rare mainframe spooling
- circumstances.</para>
- </step>
-
- <step>
- <para>Click <guibutton>OK</guibutton>, then click the
- <guibutton>Spool Settings</guibutton> button at the properties
- page.</para>
- </step>
-
- <step>
- <para>Make sure that the "Spool print jobs so program finishes
- printing faster" box is checked.</para>
- </step>
-
- <step>
- <para>Make sure that "Start printing after last page is spooled"
- box is checked.</para>
- </step>
-
- <step>
- <para>Make sure that "Disable bi-directional support for this
- printer" is checked, or greyed out.</para>
- </step>
-
- <step>
- <para>Make sure that the "Spool data format" is set to RAW. Some
- printer drivers present a choice of EMF or RAW, such as the
- Generic Text driver, in this case select RAW.</para>
- </step>
-
- <step>
- <para>Click <guibutton>OK</guibutton>, then
- <guibutton>OK</guibutton> again to close the Printer Properties.
- The printer icon now spools through FreeBSD.</para>
- </step>
- </procedure>
- </sect2>
-
- <sect2>
- <title>Installation of LPR client on Windows NT</title>
-
- <para>Unlike WfW and Win95 TCP/IP, Windows NT&mdash;both server and
- workstation&mdash;includes an LPR client as well as an LPD program
- that allows incoming print jobs to be printed from LPR clients, such
- as UNIX systems.</para>
-
- <para>To install the LPR client and daemon program under Windows NT
- 3.51, use the following instructions. The TCP/IP protocol should be
- installed beforehand and you must be logged in to the NT system as
- Administrator. This can be done at any time after the NT system is
- installed, or during OS installation:</para>
-
- <procedure>
- <step>
- <para>Double-click on Main, Control Panel, then
- Network Settings.</para>
- </step>
-
- <step>
- <para>In the Installed Network Software window, "Microsoft TCP/IP
- Printing" should be listed as well as "TCP/IP Protocol". If it
- is, stop here; otherwise continue.</para>
- </step>
-
- <step>
- <para>Click the <guibutton>Add Software</guibutton> button to get
- the Add Network Software dialog box</para>
- </step>
-
- <step>
- <para>Click the down arrow and select TCP/IP Protocol and related
- components. Click <guibutton>Continue</guibutton>.</para>
- </step>
-
- <step>
- <para>Check the "TCP/IP Network Printing Support" box and click
- <guibutton>Continue</guibutton>. LPR printing is now installed.
- Follow the instructions to reboot to save changes.</para>
- </step>
- </procedure>
-
- <para>To install the LPR client and daemon program under Windows NT 4,
- use the following instructions. The TCP/IP protocol should be
- installed beforehand and you must be logged in to the NT system as
- Administrator. This can be done at any time after the NT system is
- installed, or during OS installation:</para>
-
- <procedure>
- <step>
- <para>Click on <guibutton>Start</guibutton>,
- <guimenuitem>Settings</guimenuitem>, <guimenuitem>Control
- Panel</guimenuitem>, and double-click on
- <guiicon>Network</guiicon> to open it up.</para>
- </step>
-
- <step>
- <para>Click on the <guilabel>Services</guilabel> tab.
- <literal>Microsoft TCP/IP Printing</literal> should be listed.
- If not, continue steps 3 - 4.</para>
- </step>
-
- <step>
- <para>Click <guibutton>Add</guibutton>, then select
- <guilabel>Microsoft TCP/IP Printing</guilabel> and click
- <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>Click <guibutton>Close</guibutton>. Follow instructions to
- reboot to save changes.</para>
-
- <note>
- <para>Any NT Service Packs that were previously installed must
- be reapplied after these operations.</para>
- </note>
- </step>
- </procedure>
-
- <para>Once LPR printing has been installed, the Printer icon or icons
- must be created on the NT system so that applications can print.
- Since this printer driver does all job formatting before passing the
- printing to the FreeBSD printserver, the print queues specified
- should be raw queues on the FreeBSD system, which don't do any job
- formatting.</para>
-
- <para>To install the printer icon in Print Manager and set it to send
- print jobs to the FreeBSD UNIX system, use the following
- instructions under NT 3.51. You must be logged in to the NT system
- as Administrator. This can be done at any time after the NT system
- is installed, or during OS installation.</para>
-
- <procedure>
- <step>
- <para>Click on Main, and open it. Then click on Print Manager to
- open it.</para>
- </step>
-
- <step>
- <para>Click on <guiicon>Printer</guiicon>, <guibutton>Create
- Printer</guibutton>. Select the appropriate printer
- driver.</para>
- </step>
-
- <step>
- <para>Click the down arrow under Print To and select
- Other.</para>
- </step>
-
- <step>
- <para>In the Available Print Monitors window select
- LPR port and click <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>Enter the hostname of the FreeBSD printserver, and the name
- of the printer queue and click <guibutton>OK</guibutton></para>
- </step>
-
- <step>
- <para>Click <guibutton>OK</guibutton> to close the Create Printer
- window. The Printer icon is created.</para>
- </step>
- </procedure>
-
- <para>To install the printer icon in Print Manager and set it to send
- print jobs to the FreeBSD UNIX system, use the following
- instructions under NT 4. You must be logged in to the NT system as
- Administrator. This can be done at any time after the NT system is
- installed, or during OS installation:</para>
-
- <procedure>
- <step>
- <para>Click <guibutton>Start</guibutton>,
- <guimenuitem>Settings</guimenuitem>,
- <guimenuitem>Printers</guimenuitem> to open the printer
- folder.</para>
- </step>
-
- <step>
- <para>Double-click <guiicon>Add Printer</guiicon> to start the
- wizard.</para>
- </step>
-
- <step>
- <para>Select the My Computer radio button, not the Network
- Print Server button and click <guibutton>Next</guibutton>. (The
- printer <emphasis>is</emphasis> a networked printer, it is
- managed on the local NT system. Microsoft used confusing
- terminology here.</para>
- </step>
-
- <step>
- <para>Click <guibutton>Add Port</guibutton> and select LPR Port,
- then click <guibutton>New Port</guibutton>.</para>
- </step>
-
- <step>
- <para>Enter the hostname and print queue for the FreeBSD
- printserver and click <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>Click <guibutton>Next</guibutton> and select the correct
- printer driver. Continue until the printer is set up.</para>
- </step>
- </procedure>
-
- <para>The LPR client in Windows NT allows DOS print jobs originating
- in DOS boxes to be routed to the central UNIX print spooler. This
- is an advantage over the Win95 and WfW LPR programs.</para>
-
- <sect3>
- <title>Windows NT Registry Changes</title>
-
- <para>Using the LPR daemon program under Windows NT presents one
- problem. If the NT server is used as an LPR/LPD "relay", for
- example, to pass jobs from clients to LPR print queues on a UNIX
- system, to pass jobs from LPR programs on UNIX terminating at NT
- print queues, or to pass jobs from Appletalk clients to LPR
- printers, NT retypes the job if the type code is set to P (text).
- This can wreak havoc on PostScript files printed through HP
- LaserJet printers with internal MIO cards in them, if the job
- originates from the <filename>/usr/bin/lpr</filename> program
- under UNIX, which assigns a P type code. The printserver card
- treats PostScript jobs as text, and instead of the print job, the
- raw PostScript codes print. This problem often manifests in the
- following way: <filename>/usr/bin/lpr</filename> is used to print
- a PostScript file from UNIX directly to the remote printer
- printserver, which works fine, but spooling it through NT causes
- problems.</para>
-
- <para>A registry change that can override the NT Server formatting
- behavior is detailed in Microsoft Knowledge Base article ID
- Q150930. With Windows NT 3.51, and 4.0 up to service pack 1 the
- change is global. Starting with NT 4.0 Service pack 2 the change
- can be applied to specific print queues, (see Knowledge Base
- article ID Q168457). This registry change also works for
- Windows 2000.</para>
-
- <para>Under Windows NT 4.0, the change is:</para>
-
- <procedure>
- <step>
- <para>Run Registry Editor
- (<filename>REGEDT32.EXE</filename>)</para>
- </step>
-
- <step>
- <para>From the <literal>HKEY_LOCAL_MACHINE</literal> subtree, go
- to the following key:</para>
-
- <para><literal>\SYSTEM\CurrentControlSet\Services\LPDSVC\Parameters</literal></para>
- </step>
-
- <step>
- <para>On the <guimenu>Edit</guimenu> menu, click
- <guimenuitem>Add Value</guimenuitem>.</para>
- </step>
-
- <step>
- <para>Add the following:</para>
-
- <informaltable frame="none" pgwide="1">
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>Value Name:</entry>
- <entry>SimulatePassThrough</entry>
- </row>
-
- <row>
- <entry>Data Type:</entry>
- <entry>REG_DWORD</entry>
- </row>
-
- <row>
- <entry>Data</entry>
- <entry>1</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <note>
- <para>The default value is 0, which informs LPD to assign
- datatypes according to the control commands.</para>
- </note>
- </step>
- </procedure>
-
- <para>Under Windows NT 3.51, the change is:</para>
-
- <procedure>
- <step>
- <para>Run Registry Editor
- (<filename>REGEDT32.EXE</filename>)</para>
- </step>
-
- <step>
- <para>From the <literal>HKEY_LOCAL_MACHINE</literal> subtree, go
- to the following key:</para>
-
- <para><literal>\SYSTEM\CurrentControlSet\Services\LPDSVC\Parameters</literal></para>
- </step>
-
- <step>
- <para>On the <guimenu>Edit</guimenu> menu, click
- <guimenuitem>Add Value</guimenuitem>.</para>
- </step>
-
- <step>
- <para>Add the following:</para>
-
- <informaltable frame="none" pgwide="1">
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>Value Name:</entry>
- <entry>SimulatePassThrough</entry>
- </row>
-
- <row>
- <entry>Data Type:</entry>
- <entry>REG_DWORD</entry>
- </row>
-
- <row>
- <entry>Data</entry>
- <entry>1</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <note>
- <para>The default value is 0, which informs LPD to assign
- datatypes according to the control commands.</para>
- </note>
- </step>
-
- <step>
- <para>Create an LPD key at the same level as the LPDSVC
- key.</para>
- </step>
-
- <step>
- <para>Click the LPDSVC Key, click <guimenuitem>Save
- Key</guimenuitem> from the <guimenu>Registry</guimenu> menu,
- and then save the file as
- <filename>LPDSVC.KEY</filename></para>
- </step>
-
- <step>
- <para>Click the LPD key created in step 5.</para>
- </step>
-
- <step>
- <para>Click <guimenuitem>Restore</guimenuitem> on the
- <guimenu>Registry</guimenu> menu, click the file created in
- step 6, and then click <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>A warning message appears. Click
- <guibutton>OK</guibutton> and then quit the Registry
- Editor.</para>
- </step>
-
- <step>
- <para>At a command prompt window, type:</para>
-
- <screen><userinput>net stop lpdsvc</userinput>
-<userinput>net start lpdsvc</userinput></screen>
- </step>
- </procedure>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="printserving-ps-dos">
- <title>Printing PostScript and DOS command files</title>
-
- <para>One problem with printing under Win31 and Win95 with the LPR
- methods discussed is the lack of a <quote>raw</quote>
- <devicename>LPT1:</devicename> device. This is annoying to the
- administrator who wants to print an occasional text file, such as a
- file full of printer control codes, without their being intercepted by
- the Windows printer driver. Of course this is also an issue with DOS
- programs, but a commercial site that runs significant DOS software and
- wants to print directly to UNIX with LPR really only has one
- option&mdash;to use a commercial TCP/IP stack containing a DOS LPR
- program.</para>
-
- <para>Normally, under Windows printing, virtually all graphical programs
- print through the Windows printer driver. This is true even of basic
- programs such as Notepad. For example, an administrator may have a
- DOS batch file named <filename>filename.txt</filename> containing the
- following line:</para>
-
- <programlisting>echo \033&amp;k2G &gt; lpt1:</programlisting>
-
- <para>This batch file switches a HP LaserJet from CR-LF, MS-DOS
- textfile printing into Newline termination UNIX textfile printing.
- Otherwise, raw text printed from UNIX on the HP prints with a
- stairstep effect.</para>
-
- <para>If the administrator opens this file with Notepad and prints it
- using a regular printer driver, such as an Epson LQ, the Windows
- printer driver encapsulates this print output into a series of
- printer-specific control codes that do things such as initialize the
- printer, install fonts, and so on. The printer won't interpret this
- output as control code input. Usually, if the printer is locally
- attached, the user can force a "raw text print" of the file by opening
- a DOS window and running:</para>
-
- <screen><userinput>copy filename.txt lpt1: /b</userinput></screen>
-
- <para>Since the LPR client program doesn't provide a DOS driver, it
- cannot reroute input from the <devicename>LPT1:</devicename> device
- ports. The solution is to use the Generic / Text Only printer driver
- in conjunction with Wordpad (under Win95); under Win31 use a different
- text editor. The Notepad editor supplied with Windows is unsuitable
- for this - it "helpfully" inserts a 1 inch margin of spaces around all
- printed output, as well as the filename title. Wordpad supplied with
- Win95, can be set to use margins of zero, and inserts no additions
- into the printed output. Also, make sure that banner pages are turned
- off, and the print type is set to raw.</para>
- </sect1>
-
- <sect1 id="printserving-psprinter">
- <title>Checking PostScript Printer capabilities</title>
-
- <para>Following is a PostScript command file that can be used to get a
- PostScript printer to output a number of useful pieces of information
- that are needed to set up a printer icon under Windows properly. It
- was printed from Wordpad, in Win95, through the Generic / Text Only
- printer driver with the following instructions:</para>
-
- <procedure>
- <step>
- <para><guibutton>Start</guibutton>, <guimenuitem>Run</guimenuitem>,
- type in <userinput>Wordpad</userinput> and press
- <keycap>Enter</keycap>.</para>
- </step>
-
- <step>
- <para><guimenu>File</guimenu>, <guimenuitem>Open</guimenuitem>
- <filename>testps.txt</filename></para>
- </step>
-
- <step>
- <para><guimenu>File</guimenu>, <guimenuitem>Page
- Setup</guimenuitem>, <guimenuitem>Printer</guimenuitem>, select
- <guimenuitem>Generic / Text Only</guimenuitem>, click
- <guibutton>Properties</guibutton></para>
- </step>
-
- <step>
- <para>Click <guimenuitem>Device Options</guimenuitem>, select
- <guilabel>TTY custom</guilabel>, click
- <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>Click <guibutton>OK</guibutton>, then set all four margins to
- <literal>0</literal>; click <guibutton>OK</guibutton>.</para>
- </step>
-
- <step>
- <para>Click <guimenu>File</guimenu>,
- <guimenuitem>Print</guimenuitem>,
- <guibutton>OK</guibutton>.</para>
- </step>
- </procedure>
-
- <para>This could also have been printed with
- <filename>/usr/bin/lpr</filename> on a UNIX command prompt. The file
- prints <emphasis>Test Page</emphasis> and some printer statistics
- below that, as follows.</para>
-
- <programlisting>% filename: testps.txt
-% purpose: to verify proper host connection and function of PostScript
-% printers.
-/buf 10 string def
-/CM {
-save statusdict/product get (PostScript) anchorsearch
-exch pop {length 0 eq
-{1}{2}ifelse
-}
-{2}ifelse exch restore
-}bind def
-/isCM {
-CM 1 ge
-}bind def
-/Times-BoldItalic findfont 75 scalefont setfont
-150 500 moveto
-(Test Page) false charpath
-isCM{gsave 0.0 1.0 1.0 0.0 setcmykcolor fill grestore}if
-2 setlinewidth stroke
-/Times-Roman findfont 10 scalefont setfont
-150 400 moveto
-(Your PostScript printer is properly connected and operational.)show
-150 380 moveto
-(The border around the page indicates your printer's printable region.)show
-{ vmreclaim } stopped pop
-vmstatus exch sub exch pop
-150 360 moveto
-(Max Available Printer Virtual Memory (KB):)show
-150 340 moveto
-dup 1024 div truncate buf cvs show
-150 320 moveto
-(Calculated memory size used for PostScript printer icon properties:) show
-150 300 moveto
-0.85 mul 1024 div truncate buf cvs show
-150 280 moveto
-(Printer Model: )show
-statusdict begin product show end
-150 260 moveto
-(PostScript Level: )show
-/languagelevel where
-{ languagelevel 3 string cvs show pop }
-{(1) show } ifelse
-150 240 moveto
-(PostScript Version: )show
-statusdict begin
-version show (.)show
-revision 40 string cvs show end
-clippath stroke
-showpage</programlisting>
- </sect1>
-
- <sect1 id="printserving-lpr-freebsd">
- <title>Setting up LPR/LPD on FreeBSD</title>
-
- <para>When a FreeBSD system is booted, it starts the LPD spooler control
- daemon program if the <filename>/etc/rc.conf</filename> file has
- <literal>lpd_enable="YES"</literal> set. If this is not set, attempts
- to print through and from the FreeBSD system will fail with an
- <errorname>lpr: connect: No such file or directory</errorname> error
- message.</para>
-
- <para>The LPD program manages all incoming print jobs, whether they come
- in from the network, or from local users on the UNIX system. It
- transfers print jobs to all locally attached parallel or serial
- printers, as well as defined remote printers. Several programs also
- are used to manipulate jobs in the print spools that LPD manages, as
- well as the user programs to submit them from the UNIX command prompt.
- All of these programs use the <filename>/etc/printcap</filename> file,
- which is the master control file for the printing system.</para>
-
- <para>Back when printing was mostly text, it was common to place
- printers on a serial connection that stretched for long distances.
- Often, 9600bps was used because it could work reliably up to a block
- away, which allowed printers to be located almost anywhere on an
- office high-rise floor. Modern office print jobs, on the other hand,
- are generally graphics-laden and tend to be rather large. These jobs
- would take hours to transfer over a slower 9600bps serial printer
- connection. Today, most printers that are not connected to a remote
- hardware print server box are directly connected to the server using
- parallel cables. All of the examples shown here are direct
- connections that are parallel connections.</para>
-
- <para>The <filename>printcap</filename> configuration file, like most
- UNIX configuration files, indicates comment lines starting with a hash
- character. Lines without a hash character are meant to be part of a
- printer queue description line. Each printer queue description line
- starts with a symbolic name, and ends with a newline. Since the
- description lines are often quite long, they are often written to span
- multiple lines by escaping intermediate newlines with the backslash
- (<literal>\</literal>) character. The
- <filename>/etc/printcap</filename> file, as supplied, defines a single
- printer queue, <literal>lp</literal>. The <literal>lp</literal> queue
- is the default queue. Most UNIX-supplied printing utilities send
- print output to this queue if no printer is specified by the user. It
- should be set to point to the most popular print queue with
- <emphasis>local</emphasis> UNIX print users, (i.e., users that have
- shell accounts).</para>
-
- <para>The layout of <filename>/etc/printcap</filename> is covered in the
- manual page, which is reached by running the <userinput>man
- printcap</userinput> command. The stock
- <filename>/etc/printcap</filename> file at the line defining the spool
- <literal>lp</literal> shows:</para>
-
- <programlisting>#
-lp|local line printer:\
- :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
-#</programlisting>
-
- <para>In this example the first line defines the names by which the
- printer is known, and ends with an escaped newline. The next line
- defines the physical device, the PC parallel port, by
- <filename>/dev/lpt0</filename>, and the directory in which the spool
- files are stored at <filename>/var/spool/output/lpd</filename>, and
- the error log file. Note that this particular error log file will not
- show all LPD errors, such as bad job submittals, it usually shows only
- the errors that originate within the printing system itself.</para>
-
- <para>In general, the administrator creates two print queues for every
- printer that is connected to the FreeBSD machine. The first queue
- entry contains whatever additional capabilities UNIX shell users on
- the server require. The second is a raw queue that performs no print
- processing on the incoming print job. This queue is used by remote
- clients, such as Windows clients, that format their own jobs.</para>
-
- <para>If the administrator is setting up the printer to allow incoming
- LPR jobs from network clients, such as other Windows or UNIX systems,
- those systems <emphasis>must</emphasis> be listed in
- <filename>/etc/hosts.lpd</filename>.</para>
-
- <sect2>
- <title>Creating the spools</title>
-
- <para>Building new print spools is merely a matter of making an entry
- in the <filename>/etc/printcap</filename> file, creating the spool
- directories, and setting the correct permissions on them. For
- example, the following additional line defines a PostScript printer
- named NEC (in addition to the <literal>lp</literal>
- definition):</para>
-
- <programlisting>#
-lp|local line printer:\
- :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
-
-NEC|NEC Silentwriter 95 PostScript printer:\
- :lp=/dev/lpt0:sd=/var/spool/output/NEC:lf=/var/log/lpd-errs:
-#</programlisting>
-
- <para>Because UNIX is case sensitive, NEC is different from
- <literal>nec</literal> in both the name of the printer and the name
- of the Spool directory. With the print spooler LPD, the Spool
- directories <emphasis>must</emphasis> be different from each other,
- or the spooler gets confused and doesn't print.</para>
-
- <para>After the <filename>/etc/printcap</filename> is modified, the
- root user must create the <filename>/var/spool/output/NEC</filename>
- directory and assign ownership of it to the <username>bin</username>
- user, assign group ownership to <username>daemon</username>, and set
- permissions with the following commands:</para>
-
- <screen>&prompt.user; <userinput>su root</userinput>
-&prompt.root; <userinput>cd /var/spool/output</userinput>
-&prompt.root; <userinput>mkdir NEC</userinput>
-&prompt.root; <userinput>chown bin NEC</userinput>
-&prompt.root; <userinput>chgrp daemon NEC</userinput>
-&prompt.root; <userinput>chmod 755 NEC</userinput></screen>
- </sect2>
-
- <sect2>
- <title>Additional spool capabilities</title>
-
- <para>Because modern print jobs (especially PostScript) can sometimes
- reach hundreds of megabytes, the <literal>sd</literal> capability
- entry in the <filename>/etc/printcap</filename> file should always
- point to a Spool directory on a filesystem that has enough space.
- The <filename>/var</filename> directory on a default FreeBSD
- installation is generally set to a fairly small amount, which can
- easily overflow the spool. There are four ways to handle this
- problem:</para>
-
- <orderedlist>
- <listitem>
- <para>During FreeBSD installation, if the administrator knows a
- lot of print jobs are going to go through the spooler,
- <filename>/var</filename> should be set to a large
- amount of free space.</para>
- </listitem>
-
- <listitem>
- <para>Modify the <literal>sd</literal> capability in the
- <filename>/etc/printcap</filename> file to point to a spool
- directory in a different, larger filesystem, such as
- <filename>/usr/spool</filename>.</para>
- </listitem>
-
- <listitem>
- <para>Use soft links to point the
- <filename>/var/spool/output</filename> directory to directories
- on a larger filesystem.</para>
- </listitem>
-
- <listitem>
- <para>Don't define a <filename>/var</filename> directory at all
- during FreeBSD installation; this would make the installer link
- <filename>/var</filename> to
- <filename>/usr/var</filename>.</para>
- </listitem>
- </orderedlist>
-
- <para>In addition to spools, the following other capabilities are
- usually placed in a production
- <filename>/etc/printcap</filename> file.</para>
-
- <para>The entry <literal>fo</literal> prints a form feed when the
- printer is opened. It is handy for HPPCL (HP LaserJets) or other
- non-PostScript printers that are located behind electronic print
- sharing devices. It can also be used for printers that accept input
- from multiple connections, such as a parallel port, serial port, and
- localtalk port. An example is an HP LaserJet with an MIO card in it
- plugged into both Ethernet and LocalTalk networks. It will clear
- any garbage out of the printer before the job is processed.</para>
-
- <para>The entry <literal>mx</literal> defines the maximum size of a
- print job, which is a must for modern print jobs that frequently
- grow far past the default print size of a megabyte. The original
- intent of this capability was to prevent errant programs from
- stuffing the spool with jobs so large that they would use up all
- paper in a printer. Graphics-heavy print jobs have made it
- impossible to depend on this kind of space limitation, so
- <literal>mx</literal> is usually set to zero, which turns it
- off.</para>
-
- <para>The entry <literal>sh</literal> suppresses printing of banner
- pages in case the printer cannot handle ASCII and the client
- mistakenly requests them.</para>
-
- <para>The entry <literal>ct</literal> denotes a TCP Connection
- timeout. This is useful if the remote print server doesn't close
- the connection properly.</para>
-
- <note>
- <para>FreeBSD 2.2.5 contains a bug in the LPD system - as a
- workaround the <literal>ct</literal> capability needs to be set
- very large, such as 3600, or the appropriate patch installed and
- LPD recompiled. More recent versions of FreeBSD do not have this
- bug.</para>
- </note>
- </sect2>
-
- <sect2>
- <title>Printing to hardware print server boxes or remote print
- servers.</title>
-
- <para>Hardware print server boxes, such as the HP JetDirect internal
- and external cards, need some additional capabilities defined in the
- <filename>/etc/printcap</filename> entry; <literal>rp</literal>, for
- remote print spool, and <literal>rm</literal> for remote machine
- name.</para>
-
- <para>The <literal>rm</literal> capability is simply the DNS or
- <filename>/etc/hosts</filename> name of the IP number associated
- with the remote printserver device. Obviously, print server
- devices, such as the HP JetDirect, must not use a dynamic TCP/IP
- network numbering assignment. If they get their numbering via DHCP,
- the IP number should be assigned from the static pool; it should
- always be the same IP number.</para>
-
- <para>Determining the name used for <literal>rp</literal>, on the
- other hand, can be rather difficult. Here are some common
- names:</para>
-
- <para>Windows NT Server: Printer name of the printer icon created in
- Print Manager</para>
-
- <para>FreeBSD: Print queue name defined in
- <filename>/etc/printcap</filename></para>
-
- <para>HP JetDirect: Either the name <literal>TEXT</literal> or the
- name <literal>RAW</literal>. <literal>TEXT</literal> automatically
- converts incoming UNIX newline text to DOS-like CR/LF text that the
- printer can print. <literal>RAW</literal> should be used for
- PostScript, and HPPCL printing.</para>
-
- <para>HP JetDirect EX +3: External, 3 port version of the JetDirect.
- Use <literal>RAW1</literal>, <literal>RAW2</literal>,
- <literal>RAW3</literal>, <literal>TEXT1</literal>,
- <literal>TEXT2</literal>, or <literal>TEXT3</literal> depending on
- the port desired.</para>
-
- <para>Intel NetPort: Either use <literal>TEXT</literal> for UNIX text
- conversion printing or use <literal>PASSTHRU</literal> for normal
- printing.</para>
-
- <para>DPI: Use <literal>PORT1</literal> or <literal>PORT2</literal>
- depending on which port the printer is plugged into.</para>
-
- <para>For other manufacturer's print servers refer to the manuals
- supplied with those devices.</para>
-
- <para>The following is an example printcap that redefines the default
- <literal>lp</literal> print queue to send print jobs to the first
- parallel port on a remote HP LaserJet plugged into a JetDirect EX +3
- named <hostid role="fqdn">floor2hp4.biggy.com</hostid>.</para>
-
- <programlisting>#
-lp|local line printer:\
- :rm=floor2hp4.biggy.com:rp=RAW1:\
- :sd=/var/spool/output/lpd:\
- :lf=/var/log/lpd-errs:
-#</programlisting>
-
- <note>
- <para>The <literal>rp</literal> capability <emphasis>must</emphasis>
- be defined or the job goes to the default print queue on the
- remote host. If the remote device does not have a single print
- queue, such as another UNIX system, this causes problems. For
- example, if the remote device was a JetDirect EX + 3 and
- <literal>rp</literal> was omitted, all queues defined would print
- out of the first parallel port.</para>
- </note>
- </sect2>
-
- <sect2>
- <title>Filters</title>
-
- <para>The last two important printcap capabilities concern print
- filters, <literal>if</literal> (input filter) and
- <literal>of</literal> (output filter). If defined, incoming print
- jobs are run through the filters that these entries point to for
- further processing.</para>
-
- <para>Filters are the reason that the UNIX print spooling system is so
- much more powerful than any other commercial server operating
- system. Under FreeBSD, incoming print jobs are acted on by any
- filters specified in the <filename>/etc/printcap</filename>
- <emphasis>no matter where they originate</emphasis>. Incoming print
- jobs from remote Windows, Mac, NT, OS/2 or other clients can be
- intercepted and manipulated by any program specified as a filter.
- Want a PostScript Printer? There's a filter that adds PostScript
- capability to a non-PostScript printer. Want to make a cheap Epson
- MX 80 dot-matrix emulate an expensive Okidata Microline dot-matrix
- for some archaic mainframe application? Write a filter that will
- rewrite the print codes to do it. Want custom-built banner pages?
- Use a filter. Many UNIX <filename>/etc/printcap</filename> filters
- on many Internet sites can do a variety of interesting and unique
- things. Someone may have already written a filter that does what you
- want!</para>
-
- <sect3>
- <title>Types of Filters</title>
-
- <para>Three types of filters can be defined in the
- <filename>/etc/printcap</filename> file. In this book all filter
- examples are for Input filters.</para>
-
- <sect4>
- <title>Input Filters</title>
-
- <para>Input filters are specified by the <literal>if</literal>
- capability. Every job that comes into the spool is acted on by
- any filter specified in the <literal>if</literal> entry for that
- spool. Virtually all filters that an administrator would use are
- specified here. These filters can be either shell scripts, or
- compiled programs.</para>
- </sect4>
-
- <sect4>
- <title>Fixed Filters</title>
-
- <para>Fixed filters are specified by separate capabilities, such
- as <literal>cf</literal>, <literal>df</literal>, and
- <literal>gf</literal>. Mostly, these exist for historical
- reasons. Originally, the idea of LPD was that incoming jobs
- would be submitted with the type fields set to trigger whatever
- filter was desired. However, type codes are confusing and
- annoying to the user, who has to remember which option is needed
- to trigger which type. It is much easier to set up multiple
- queues with different names, and this is what most sites do
- these days. For example, originally a DVI fixed filter might be
- specified in a spool for <literal>lp</literal>, triggered by the
- <option>-d</option> option passed to <command>lpr</command>.
- Jobs without this option aren't acted on by the DVI filter.
- However, the same thing can be done by creating a queue named
- <literal>lp</literal> that doesn't have a DVI filter, and a
- queue named <literal>lpdvi</literal> which has the DVI filter
- specified in the <literal>if</literal> capability. Users just
- need to remember which queue to print to, instead of what option
- needed for this or that program.</para>
- </sect4>
-
- <sect4>
- <title>Output Filters</title>
-
- <para>These are specified by the <literal>of</literal> capability.
- Output filters are much more complicated than input filters and
- are hardly ever used in normal circumstances. They also
- generally require a compiled program somewhere, either directly
- specified or wrapped in a shell script, since they have to do
- their own signal-handling.</para>
- </sect4>
- </sect3>
-
- <sect3>
- <title>Printing Raw UNIX Text with a Filter</title>
-
- <para>One of the first things that a new UNIX user will discover when
- plugging a standard LaserJet or impact printer into a UNIX system
- is the <emphasis>stairstep</emphasis> problem. The symptom is
- that the user dumps text to the printer, either through LPR or
- redirection (by catting it to the parallel device) and instead of
- receiving the expected Courier 10-point printout, gets a page with
- a single line of text, or two lines of text "stairstepped", text
- and nothing else.</para>
-
- <para>The problem is rooted in how printers and UNIX handle
- textfiles internally. Printers by and large follow the "MS-DOS
- Textfile" convention of requiring a carriage return, then a
- linefeed, at the end of every text line. This is a holdover from
- the early days when printers were mechanical devices, and the
- print head needed to return and the platen to advance to start a
- new line. UNIX uses only the linefeed character to terminate a
- text line. So, simply dumping raw text out the parallel port
- works on MS-DOS, but not on UNIX.</para>
-
- <para>If the printer is a PostScript printer, and doesn't support
- standard ASCII, then dumping UNIX text to it doesn't work. But
- then, neither would dumping MS-DOS text to it. (Raw text printing
- on PostScript printers is discussed later in this chapter.) Note
- also that if the printer is connected over the network to an HP
- JetDirect hardware print server, internal or external, the TEXT
- queue on the hardware print automatically adds the extra Carriage
- Return character to the end of a text line.</para>
-
- <para>If the printer is the garden-variety HP LaserJet, DeskJet, or
- an impact printer, and under DOS the administrator is used to
- printing raw text from the command line for directory listings,
- there are two ways to fix stairstep. The first is to send a
- command to the printer to make it print in "unix textfile" mode,
- which makes the printer supply its own carriage return. This
- solution is ugly in a printer environment with UNIX and Windows
- machines attempting to share use of the same printer. Switching
- the printer to work with UNIX disrupts DOS/Windows raw text
- printouts.</para>
-
- <para>The better solution is to use a simple filter that converts
- incoming text from UNIX style to DOS style. The following filter
- posted on questions@FreeBSD.org and the sample
- <filename>/etc/printcap</filename> entry can be used to do
- this:</para>
-
- <programlisting>#!/bin/sh
-# /usr/local/libexec/crlfilter
-#
-# simple parlor trick to add CR to LF for printer
-# Every line of standard input is printed with CRLF
-# attached.
-#
-
-awk '{printf "%s\r\n", $0}' -</programlisting>
-
- <para>An alternative filter posted using sed could be written
- as:</para>
-
- <programlisting>#!/bin/sh
-# /usr/local/libexec/crlfilter
-#
-# Add CR to LF for printer
-# Every line of standard input is printed with CRLF
-# attached.
-#
-# Note, the ^M is a *real* ^M (^V^M if your typing in vi)
-#
-
-sed 's/$/^M/' -</programlisting>
-
- <para>Here is an example of a filter that triggers the printers
- automatic LF-to-CR/LF converter (this option is only useful on HP
- LaserJets that support this command):</para>
-
- <programlisting>#!/bin/sh
-# Simply copies stdin to stdout. Ignores all filter
-# arguments.
-# Tells printer to treat LF as CR+LF. Writes a form feed
-# character after printing job.
-
-printf "\033&amp;k2G" &amp;&amp; cat &amp;&amp; printf "\f" &amp;&amp; exit 0
-
-exit 2</programlisting>
-
- <para>The printcap file used to trigger the filter is:</para>
-
- <programlisting>#/etc/printcap
-# The trailer (tr) is used when the queue empties. I found that the
-# form feed (\f) was basically required for the HP to print properly.
-# Banners also need to be shut off.
-#
-
-lp|local line printer:\
- :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
- :if=/usr/local/libexec/crlfilter:sh:tr=\f:mx#0:
-#</programlisting>
- </sect3>
-
- <sect3>
- <title>The <literal>pr</literal> filter</title>
-
- <para>Although most filters are built by scripts or programs and are
- added to the UNIX machine by the administrator, there is one
- filter that is supplied with the FreeBSD operating system is very
- useful for raw text files: the <literal>pr</literal> filter. It is
- most commonly used when printing from the UNIX command shell. The
- <literal>pr</literal> filter paginates and applies headers and
- footers to ASCII text files. It is automatically invoked with the
- <option>-p</option> option used with the <command>lpr</command>
- program at the UNIX command prompt.</para>
-
- <para>The <literal>pr</literal> filter is special - it runs <emphasis>in
- addition</emphasis> to any input filters specified for the print
- queue in <filename>/etc/printcap</filename>,
- <emphasis>if</emphasis> the user sets the option for a print job.
- This allows headers and pagination to be applied in addition to
- any special conversion, such as CR to CR/LF that a specified input
- filter may apply.</para>
- </sect3>
-
- <sect3>
- <title>Printing PostScript Banner Pages with a Filter.</title>
-
- <para>Unfortunately, the canned banner page supplied in the LPD
- program prints only on a text-compatible printer. If the attached
- printer understands only PostScript and the administrator wants to
- print banner pages, it is possible to install a filter into the
- <filename>/etc/printcap</filename> file to do this.</para>
-
- <para>The following filter is taken from the FreeBSD Handbook. I've
- slightly changed its invocation for a couple of reasons. First,
- some PostScript printers have difficulty when two print files are
- sent within the same print job or they lack the trailing
- Control-D. Second is that the handbook invocation uses the LPRPS
- program, which requires a serial connection to the printer.</para>
-
- <para>The following filter shows another trick: calling LPR from
- within a filter program to spin off another print job.
- Unfortunately, the problem with using this trick is that the
- banner page always gets printed after the job. This is because
- the incoming job spools first, and then FreeBSD runs the filter
- against it, so the banner page generated by the filter always
- spools behind the existing job.</para>
-
- <para>There are two scripts, both should be put in the
- <filename>/usr/local/libexec</filename> directory, and the modes
- set to executable. The <filename>printcap</filename> also must be
- modified to create the nonbanner and banner versions of the print
- queue. Following the scripts is the
- <filename>/etc/printcap</filename> file showing how they are
- called. Notice that the <literal>sh</literal> parameter is turned
- on since the actual printed banner is being generated on the fly
- by the filter:</para>
-
- <programlisting>#!/bin/sh
-# Filename /usr/local/libexec/psbanner
-# parameter spacing comes from if= filter call template of:
-# if -c -w -l -i -n login -h host
-# parsing trickiness is to allow for the presence or absence of -c
-# sleep is in there for ickiness of some PostScript printers
-
-for dummy
-do
- case "$1" in
- -n) alogname="$2" ;;
- -h) ahostname="$2" ;;
- esac
- shift
-done
-
-/usr/local/libexec/make-ps-header $alogname $ahostname "PostScript" | \
- lpr -P lpnobanner
-
-sleep 10
-
-cat &amp;&amp; exit 0</programlisting>
-
- <para>Here is the <filename>make-ps-header</filename> listing.</para>
-
- <programlisting>#!/bin/sh
-# Filename /usr/local/libexec/make-ps-header
-#
-# These are PostScript units (72 to the inch). Modify for A4 or
-# whatever size paper you are using:
-#
-
-page_width=612
-page_height=792
-border=72
-
-#
-# Save these, mostly for readability in the PostScript, below.
-#
-
-user=$1
-host=$2
-job=$3
-date=`date`
-
-#
-# Send the PostScript code to stdout.
-#
-
-exec cat &lt;&lt;EOF
-%!PS
-%
-% Make sure we do not interfere with user's job that will follow
-%
-
-%
-% Make a thick, unpleasant border around the edge of the paper.
-%
-
-$border $border moveto
-$page_width $border 2 mul sub 0 rlineto
-0 $page_height $border 2 mul sub rlineto
-currentscreen 3 -1 roll pop 100 3 1 roll setscreen
-$border 2 mul $page_width sub 0 rlineto closepath
-0.8 setgray 10 setlinewidth stroke 0 setgray
-
-%
-% Display user's login name, nice and large and prominent
-%
-
-/Helvetica-Bold findfont 64 scalefont setfont
-$page_width ($user) stringwidth pop sub 2 div $page_height 200 sub moveto
-($user) show
-
-%
-% Now show the boring particulars
-%
-
-/Helvetica findfont 14 scalefont setfont
-/y 200 def
-[ (Job:) (Host:) (Date:) ] {
-200 y moveto show /y y 18 sub def
-} forall
-/Helvetica-Bold findfont 14 scalefont setfont
-/y 200 def
-[ ($job) ($host) ($date) ] {
-270 y moveto show /y y 18 sub def
-} forall
-
-%
-% That is it
-%
-
-showpage</programlisting>
-
- <para>Here is the <filename>/etc/printcap</filename> file.</para>
-
- <programlisting>#
-lp|local line printer, PostScript, banner:\
- :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:\
- :if=/usr/local/libexec/psbanner:sh:mx#0:
-
-lpnobanner|local line printer, PostScript, no banner:\
- :lp=/dev/lpt0:sd=/var/spool/output/lpd-noban:\
- :lf=/var/log/lpd-errs:sh:mx#0:
-#</programlisting>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="printserving-accounting">
- <title>Printer Accounting</title>
-
- <para>The FreeBSD print spooler can manage accounting statistics for
- printer usage. The spooler counts each page printed and generates
- totals for each user. In this manner departments or individuals can
- be charged money for their use of the printer.</para>
-
- <para>In the academic world, such as student computer labs, accounting
- is very political. Many schemes have been developed to attempt to
- gather statistics to charge people (generally students) for printing.
- Administrators in this environment who deal with printers can have
- almost as many accounting problems as printer problems. In the
- corporate environment, on the other hand, accounting is not as
- important. I strongly recommend against any corporation attempting to
- implement printer accounting on shared printers for a number of
- reasons:</para>
-
- <orderedlist>
- <listitem>
- <para>The entire UNIX accounting system is based on ASCII printouts.
- It is easy to count the number of ASCII pages, form feeds, or text
- lines in a print job. In corporations, however, PostScript and
- HPPCL are generally the order of the day. It is almost impossible
- to figure out by examining the datastream how many pages it will
- occupy, and even if this could be done accurately, it wastes
- significant computational resources.</para>
-
- <note>
- <para>It is possible to get some PostScript printers to count
- pages, but doing so requires a bidirectional connection to the
- printer and additional programming on the UNIX system. This
- task is beyond the scope of this book.</para>
- </note>
- </listitem>
-
- <listitem>
- <para>Banner pages aren't included in UNIX printer accounting
- counts. Therefore, someone submitting 20 two-page jobs uses much
- more paper than does someone submitting one 40 page job, yet both
- are charged the same amount.</para>
- </listitem>
-
- <listitem>
- <para>The username of the submitter can be easily forged, if the job
- is remotely submitted over the network from a client (practically
- all jobs in a Windows client printing environment are remotely
- submitted). Although some LPR clients can be set to authenticate,
- and the <literal>rs</literal> capability can be set to enforce
- authentication, not all can, especially Windows LPR
- clients.</para>
- </listitem>
-
- <listitem>
- <para>It is more difficult for a submitter to hide the IP number or
- machine name of the remote client, but in a Windows environment
- there is no guarantee that someone was sitting at a particular
- desktop machine when the job was submitted.</para>
- </listitem>
-
- <listitem>
- <para>A business generates no revenue by monitoring printer usage.
- In the academic community, however, when a student lab charges for
- printouts the lab is actually extracting money from an entity (the
- student) that is separate from the lab. Within a corporation, the
- concept of department A getting revenue from user B is pointless
- and doesn't generate a net gain for the corporation as a
- whole.</para>
-
- <para>For my printer administration, I have found that I can save
- more money on printing costs by purchasing supplies wisely than by
- attempting to discourage printing through "chargebacks". What is
- the sense of being miserly with printing while spending double on
- toner cartridges because no one is willing to comparison shop, or
- signing a "lease" agreement that isn't beneficial for the printer?
- When you get down to it, corporate users don't care much for print
- sharing anyway, and they generally only agree to it because the
- administrator can buy a far bigger, faster, and fancier printer
- than they can requisition.</para>
- </listitem>
-
- <listitem>
- <para>Worse yet, if usage on a shared printer is charged, it
- encourages employees to look for other places to print.
- Inevitably, people run out buy cheap inkjet printers for their own
- use, and the business ends up spending more on paper and supplies
- for many poor-quality small printers, than it would for a few
- decent big ones. Moreover, the inferior output of these printers
- makes the organization as a whole look bad.</para>
- </listitem>
-
- <listitem>
- <para>The corporate spirit should be one of teamwork, not bickering.
- The surest way to kill a network in a corporation is to set up a
- situation that puts the administrator into the policeman position
- or pits one department against another.</para>
- </listitem>
- </orderedlist>
-
- <para>The only justification I've ever seen for running accounting on
- corporate printers is using the accounting system to automate
- reminders to the administrator to replace paper, or toner. Aside from
- this use, a corporation that implements accounting as a way of
- encouraging employees not to waste paper ends up defeating the purpose
- of turning on accounting.</para>
- </sect1>
-
- <sect1 id="printserving-samba">
- <title>Microsoft Networking Client printing with Samba</title>
-
- <para>Although LPR is a time-tested and truly cross-platform printing
- solution, sites with a majority of Windows clients running Microsoft
- Networking have an alternate printing mechanism&mdash;Samba. Samba
- can provide print services to clients running SMB-compatible network
- clients. With a running Samba installation, the administrator may
- "share out" printers as well as filesystem directories from the
- FreeBSD system.</para>
-
- <para>Printers accessed with Samba must be defined both in the
- <filename>/etc/printcap</filename> file and the
- <filename>/usr/local/etc/smb.conf</filename> file. If the individual
- printers are defined in the <filename>smb.conf</filename> file with
- the <literal>printer driver=</literal> statement set to the exact
- model name of the printer, the "Auto printer driver install" feature
- of Windows NT and Win95/98 is activated. This automatically loads the
- correct printer driver if the user clicks on the print queue in
- Network Neighborhood under Windows 95 or NT 4.0. The restriction, of
- course, is that the printer model must be in the Windows client driver
- database.</para>
-
- <para>The <filename>smb.conf</filename> file also defines the
- <literal>print</literal> command used to pass jobs to the UNIX print
- spool. It is a good idea to redefine this via the <literal>print
- command</literal> option to <literal>lpr -s -P %p %s; rm
- %s</literal>. This turns on soft linking, so that large print jobs
- don't get truncated.</para>
-
- <para>In operation, the SMB-networking client builds the print job on
- itself and then transfers the entire job over the network to the Samba
- server. On the server, Samba has its own temporary print spool
- directory to which the job is copied. Once the job has been
- completely received, it is then passed to the UNIX print
- spooler.</para>
-
- <figure>
- <title>Microsoft Networking Client printing with Samba</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="08-06" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced"> ,---------.
- | ======= | FreeBSD Server
- | ======= | +---------------------+ ,-----.
-+-----------+ | +---------------+ | | |
-| Printer [ ]------------[ ] | Samba | | |_____|
-+-----------+ Parallel | | Software | [ ]------_________
- Cable | +---------------+ | / ::::::: \
- | | `---------'
- | +---------------+ | Network PC
- | | Print | |
- | | Software | |
- | +---------------+ |
- +---------------------+</literallayout>
- </textobject>
-
- <textobject>
- <phrase>The Samba software and the print software run on the same
- host. Samba receives the print job, then hands it to the print
- spooler.</phrase>
- </textobject>
- </mediaobject>
- </figure>
-
- <sect2>
- <title>Client access issues</title>
-
- <para>Because a Windows client formats print jobs before sending them
- to the server, the administrator may want to hide some of the
- specialty print queues on the server. For example, the queue that
- converts LF to CRLF for UNIX text printouts would probably not be
- shared out. To make such queues invisible, the
- <literal>browseable=no</literal> option can be turned on in the
- <filename>smb.conf</filename> file. Also, the <literal>load
- printers</literal> option must be set to no to allow individual
- printer definitions.</para>
-
- <note>
- <para>In general, the only print queues that should be visible
- through Samba are the "raw" print queues that are set up by the
- administrator to allow incoming preformatted print jobs.</para>
- </note>
-
- <para>Windows clients that print to Samba print queues on the UNIX
- system can view and cancel print jobs in the print queue. They
- cannot pause them, however, which is a difference between Novell and
- Windows NT Server print queues. They also cannot prioritize print
- jobs from the print queue window, although the administrator can
- reprioritize print jobs that are in the queue from a command shell
- on the FreeBSD server.</para>
- </sect2>
-
- <sect2>
- <title>Printer entries in configuration files</title>
-
- <para>Following are listings of sample
- <filename>/etc/printcap</filename> and
- <filename>smb.conf</filename> files used on the system to provide
- print services. An explanation of the interaction of these files
- follows.</para>
-
- <example>
- <title><filename>/etc/printcap</filename></title>
-
- <programlisting>#
-#
-# The printer in lpt0 is a PostScript printer. The nec-crlf entry
-# is for testing the printer when it is switched into HP LaserJet III
-# mode.
-#
-
-lp|local line printer:\
- :lp=/dev/lpt0:sd=/var/spool/output/lpd:\
- :lf=/var/log/lpd-errs:sh:mx#0:
-
-#
-
-nec-crlf|NEC Silentwriter 95 in ASCII mode with UNIX text filter:\
- :lp=/dev/lpt0:sd=/usr/lpdspool/nec-crlf:\
- :lf=/var/log/lpd-errs:sh:mx#0:\
- :if=/usr/local/libexec/crlfilter:tr=\f:
-
-#
-
-nec-raw|NEC Silentwriter 95 used for PostScript passthrough printing:\
- :lp=/dev/lpt0:sd=/usr/lpdspool/nec-raw:\
- :lf=/var/log/lpd-errs:sh:mx#0:
-
-#
-
-nec-ps-banner|NEC Silentwriter 95 with PostScript banner page created:\
- :lp=/dev/lpt0:sd=/usr/lpdspool/nec-ps-banner:\
- :lf=/var/log/lpd-errs:sh:mx#0:if=/usr/local/libexec/psbanner:
-
-#
-#</programlisting>
- </example>
-
- <example>
- <title><filename>/usr/local/etc/smb.conf</filename></title>
-
- <programlisting>[global]
-comment = FreeBSD - Samba %v
-log file = /var/log/samba.log
-dont descend = /dev,/proc,/root,/stand
-print command = lpr -s -P %p %s; rm %s
-interfaces = <replaceable>X.X.X.X</replaceable> (the system IP number goes here)
-printing = bsd
-map archive = no
-status = yes
-public = yes
-read only = no
-preserve case = yes
-strip dot = yes
-security = share
-guest ok = no
-password level = 1
-dead time = 15
-domain master = yes
-workgroup = WORKGROUP
-
-[homes]
-browseable = no
-comment = User Home Directory
-create mode = 0775
-public = no
-
-[printers]
-path = /var/spool
-comment = Printers
-create mode = 0700
-browseable = no
-read only = yes
-public = no
-
-[lp]
-printable = yes
-browseable = no
-
-[nec-raw]
-comment = Main PostScript printer driver for Windows clients
-printer driver = NEC SilentWriter 95
-printable = yes
-browseable = yes
-
-[wwwroot]
-path = /usr/local/www
-read only = no
-create mode = 0775
-comment = Internal Web Server</programlisting>
- </example>
- </sect2>
-
- <sect2>
- <title>Browsing output</title>
-
- <para>Following is the output of a <userinput>net view</userinput>
- command executed at a DOS prompt under Windows 95:</para>
-
- <screen>Shared resources at \\SERVER
-
-Sharename Type Comment
---------------------------------------------------------------------
-nec-crlf Print NEC Silentwriter 95 in ASCII mode
-nec-raw Print Main PostScript printer driver
-tedm Disk User Home Directory
-wwwroot Disk Internal Web Server
-
-The command was completed successfully.</screen>
-
- <para>In the <filename>/etc/printcap</filename> file four print queues
- are defined, all tied to the printer plugged into the parallel port
- on the FreeBSD server. The first is <literal>lp</literal>, the
- generic local line printer. Since this print queue generally has a
- filter placed on it to format jobs from the UNIX print queue
- properly, it should not be visible on the SMB network (i.e., visible
- in Network Neighborhood). The second queue,
- <literal>nec-crlf</literal>, has a filter that converts UNIX text to
- text that prints without stairstepping, so it also should be hidden
- from the SMB network. The third, <literal>nec-raw</literal>, should
- be visible on the network because this is the spool that the Windows
- clients use. The last queue, <literal>nec-ps-banner</literal>, is
- another specialty queue for UNIX local printing and thus should not
- be visible.</para>
-
- <para>When the <filename>smb.conf</filename> file is parsed, the
- default entry <literal>[printers]</literal> is first read and used
- as a set of defaults for printers that are going to be shared out.
- Next, the <filename>/etc/printcap</filename> file is read to get a
- list of all printers on the server. Last, each printer is checked
- for a service name in the <filename>smb.conf</filename> file that
- contains settings that override the set of defaults.</para>
-
- <para>In the listing of what resources are visible on the network,
- both <literal>nec-crlf</literal> and <literal>nec-raw</literal>
- print queues are visible, and <literal>lp</literal> and
- <literal>nec-ps-banner</literal> is not. <literal>lp</literal> is
- not visible because there is a specific entry,
- <literal>[lp]</literal> in the <filename>smb.conf</filename> file
- that blocks it. <literal>nec-ps-banner</literal> doesn't have such
- an entry, but because the print queue name is not a legal length for
- a SMB name, it isn't shared out either.</para>
-
- <para>The <literal>nec-crlf</literal> printer is visible so as to
- illustrate another point - comments. If a print queue has no entry
- in the <filename>smb.conf</filename> file and is built by scanning
- the <filename>/etc/printcap</filename> file and using the
- <literal>[printers]</literal> defaults, the comment is taken from
- the <filename>/etc/printcap</filename> file next to the queue
- definition name. Otherwise, if an entry is made for the printer in
- the <filename>smb.conf</filename> file the comment is taken from the
- entry in <filename>smb.conf</filename>.</para>
- </sect2>
- </sect1>
-
- <sect1 id="printserving-nt-and-freebsd">
- <title>Printing between NT Server/NetWare and FreeBSD.</title>
-
- <para>Up to this point in the chapter, our main concern has been FreeBSD
- and Windows NT printing interoperability with NT as a print client
- passing jobs to the FreeBSD system. What happens if the situation is
- reversed and the FreeBSD system is itself a printing client of another
- LPD server? This situation can arise in a mixed UNIX/NetWare or
- UNIX/NT environment. The administrator may elect to forgo the use of
- Samba, and use an NT server to provide print services. Alternatively,
- the administrator may have existing DOS Novell IPX clients that they
- don't want to change, printing to an existing IPX Novell NetWare
- server. Many of the earlier hardware print servers, such as the Intel
- NetPort 1 and NetPort 2 were IPX only. A site with a large number of
- these hardware servers may wish to move the clients to TCP/IP, but
- leave the existing IPX-based printing network intact.</para>
-
- <para>With NetWare it is possible to load an LPD NetWare loadable module
- (NLM) on the NetWare server that takes incoming LPR print jobs and
- prints them on IPX print queues. Later versions of NetWare may
- include this NLM, it was an extra cost add-on with NetWare 3.X</para>
-
- <para>With Windows NT Server, loading the TCP/IP LPR printing support
- also loads the LPD print server on NT. By using LPR client programs
- on UNIX, it is possible to submit, view status, and remove jobs
- remotely from an NT server that has LPR installed as a port for its
- printers.</para>
-
- <para>Following is a sample <filename>/etc/printcap</filename> file entry
- that defines a print queue named <literal>tank</literal> on the FreeBSD
- system pointed to an NT LPD server queue named
- <literal>sherman</literal> on a NT Server named
- <hostid role="fqdn">big.army.mil</hostid> in the DNS. This uses the
- <literal>rm</literal> printcap capability. Unlike the earlier
- examples, the output print jobs are sent out not by the PC parallel
- port but over the network to the NT server.</para>
-
- <programlisting>#
-tank|sample remote printer:\
- :rm=big.army.mil:rp=sherman:sd=/var/spool/output/lphost:\
- :lf=/var/log/lpd-errs:
-#</programlisting>
-
- <note>
- <para>When using an NT server as an LPD server it may be necessary to
- make the NT registry changes mentioned under Windows NT Registry
- Changes, earlier in the chapter.</para>
- </note>
- </sect1>
-
- <sect1 id="printserving-unix">
- <title>Printing from UNIX</title>
-
- <para>Two commands used at the FreeBSD command prompt are intended as
- general-purpose print commands: <command>lp</command> and
- <command>lpr</command>.</para>
-
- <sect2>
- <title><command>lp</command></title>
-
- <para>The <command>lp</command> command is simply a front end command
- that calls the <command>lpr</command> command with appropriate
- options. Its main use is to allow the running of precompiled
- binary programs and scripts that assume that the
- <command>lp</command> command is the <emphasis>official</emphasis>
- printing command.</para>
- </sect2>
-
- <sect2>
- <title><command>lpr</command></title>
-
- <para>The <command>lpr</command> command is the main command that is
- used to print files from the command prompts under the FreeBSD
- operating system. It is frequently spawned off as a child program,
- or used in pipes. For example, when the Netscape web browser's
- Print button is clicked, Netscape may create the PostScript output,
- but the output goes through the <command>lpr</command>
- command.</para>
-
- <para>The <command>lpr</command> command, like many UNIX command-line
- printing programs, assumes that the default print queue name is
- <literal>lp</literal>. When the FreeBSD machine is set up, the
- administrator usually sets the <literal>lp</literal> queue to print
- through a filter that allows raw UNIX text sent to it to print
- properly. For example, if an HP LaserJet printer that doesn't have
- PostScript is connected to the server, the
- <literal>lp</literal> queue specifies in the
- <filename>/etc/printcap</filename> file the CRLF filter listed
- earlier. On the other hand, if an Apple Laserwriter that doesn't
- support ASCII is connected to the server, the
- <literal>a2ps</literal>filter would be specified in the
- <filename>/etc/printcap</filename> for the <literal>lp</literal>
- queue.</para>
-
- <para>When printing raw text files usually the <option>-p</option>
- option is specified to <command>lpr</command>. When printing
- preformatted files, such as PostScript files, the
- <option>-P</option> option is used, which selects whatever queue is
- used to handle these job types.</para>
- </sect2>
-
- <sect2>
- <title>Managing the UNIX Print Queue</title>
-
- <para>Once the print jobs coming in from clients are received on the
- FreeBSD system and placed in the print spool, they are metered out
- at a slower rate to the various printers. If traffic activity is
- light, and few print jobs get sent through, the administrator can
- probably ignore the print queue as long as it continues to work.
- However, a busy network printer running at an optimal rate of speed
- usually has a backlog of unprinted jobs in the queue waiting for
- print time. To keep all users happy and to provide for the
- occasional rush print job, the UNIX LPD/LPR printing system has
- several administration commands which are described here.</para>
-
- <sect3>
- <title>Viewing the queue</title>
-
- <para>On busy printers, and to troubleshoot stopped printers, users
- sometimes need to view the print jobs in the queue. Administrators
- also need to view the queue to see what jobs may need to be
- expedited. This can be done from the workstation that remotely
- submitted the job if the LPR client has the ability to do this.
- The Windows 3.1 LPR client discussed earlier has this capability.
- Unfortunately, many LPR clients don't, which means that the
- administrator must Telnet into the UNIX machine that the print
- queues are on and view them there.</para>
-
- <para>The UNIX shell command used to view the queue is the
- <command>lpq</command> command. It is frequently run as
- <userinput>lpq -a</userinput> which shows jobs in all queues. The
- following is a sample output of the command:</para>
-
- <screen>&prompt.root; <userinput>lpq -a</userinput>
-nec-raw:
-Rank Owner Job Files Total Size
-1st tedm 19 C:/WLPRSPL/SPOOL/~LP00018.TMP 105221 bytes
-2nd tedm 20 C:/WLPRSPL/SPOOL/~LP00019.TMP 13488 bytes
-3rd root 3 hosts 1220 bytes
-4th tedm 1 Printer Test Page 765 bytes
-5th tedm 2 Microsoft Word - CHAPTE10.DOC 15411 bytes</screen>
-
- <para>The first two jobs and the last two jobs came from remote
- clients, the third came from the command prompt.</para>
- </sect3>
-
- <sect3>
- <title>Removing print jobs</title>
-
- <para>Deleting unwanted print jobs that haven't yet printed from the
- queue can be done by the remote workstations that submitted the
- job if their LPR implementations have the necessary commands. The
- Windows 3.1 LPR client I detailed earlier has this capability. Many
- LPR clients don't, however, which means that the administrator
- must Telnet into the UNIX machine that the print queues are on and
- delete the jobs there.</para>
-
- <para>The administrator can delete any print jobs from any queues by
- running the <command>lprm</command> command followed by the
- specified print queue and the job number. Below is a sample
- output of the command:</para>
-
- <screen>&prompt.root; <userinput>lprm -P nec-raw 19</userinput>
-dfA019tedmitte dequeued
-cfA019dostest dequeued
-&prompt.root; <userinput>lprm -P nec-raw 3</userinput>
-dfA003toybox.placo.com dequeued
-cfA003toybox.placo.com dequeued</screen>
-
- <para>The <command>lprm</command> command is also used under UNIX to
- delete remote print jobs.</para>
- </sect3>
-
- <sect3>
- <title>Advanced management</title>
-
- <para>The administrator logged into the FreeBSD system as the root
- user can also perform several other operations that ordinary users
- cannot. These include turning the queues on and off, and moving
- print jobs within the print queues. The command used to do this
- is the <command>lpc</command> command.</para>
-
- <para><command>lpc</command> has two modes of operation. In the
- first mode, the command is run by itself, which puts the
- administrator into an <prompt>lpc</prompt> prompt. Some general
- help is available for the commands, such as the following sample
- output:</para>
-
- <screen>&prompt.root; <userinput>lpc</userinput>
-<prompt>lpc&gt;</prompt> <userinput>help</userinput>
-Commands may be abbreviated.
-Commands are:
-abort enable disable help restart status topq ?
-clean exit down quit start stop up
-<prompt>lpc&gt;</prompt> <userinput>help disable</userinput>
-disable turn a spooling queue off
-<prompt>lpc&gt;</prompt> <userinput>help status</userinput>
-status show status of daemon and queue
-<prompt>lpc&gt;</prompt> <userinput>exit</userinput></screen>
-
- <para>In the second mode of operation the <command>lpc</command>
- command is just run by itself, followed by the command and the
- print queue name. Following is a sample output:</para>
-
- <screen>&prompt.root; <userinput>lpc disable lp</userinput>
-lp:
-queuing disabled</screen>
-
- <para>Under FreeBSD, there is no command that specifically allows
- the administrator to move jobs from one queue to another. This
- can be done, however, by changing into the raw queue directory
- then rerunning the <command>lpr</command> command. Following is a
- sample run showing three print jobs moved from a dysfunctional
- queue to a good one:</para>
-
- <screen>&prompt.root; <userinput>lpq -a</userinput>
-lp:
-Warning: lp is down: printing disabled
-printing disabled
-Rank Owner Job Files Total Size
-1st root 51 hosts 1220 bytes
-2nd root 52 services 60767 bytes
-3rd root 53 printcap 2383 bytes
-&prompt.root; <userinput>cd /var/spool/output/lpd</userinput>
-&prompt.root; <userinput>ls</userinput>
-.seq cfA053toybox.placo.com dfA053toybox.placo.com
-cfA051toybox.placo.com dfA051toybox.placo.com lock
-cfA052toybox.placo.com dfA052toybox.placo.com status
-&prompt.root; <userinput>lpr -P nec-raw dfA051toybox.placo.com</userinput>
-&prompt.root; <userinput>lpr -P nec-raw dfA052toybox.placo.com</userinput>
-&prompt.root; <userinput>lpr -P nec-raw dfA053toybox.placo.com</userinput>
-&prompt.root; <userinput>lprm -P lp -</userinput>
-&prompt.root; <userinput>lpq -a</userinput>
-nec-raw:
-Warning: nec-raw is down: printing disabled
-Warning: no daemon present
-Rank Owner Job Files Total Size
-1st root 5 dfA051toybox.placo.com 1220 bytes
-2nd root 6 dfA052toybox.placo.com 60767 bytes
-3rd root 7 dfA053toybox.placo.com 2383 bytes</screen>
-
- <note>
- <para>Moving jobs from queue to queue is feasible only when all
- printers are similar, as when all printers support
- PostScript.</para>
- </note>
- </sect3>
-
- <sect3>
- <title>Remote Management</title>
-
- <para>Just as the root user can manipulate remotely submitted jobs
- in the print queue, print jobs can be remotely managed by regular
- users with the LPR clients that created them. Unfortunately, some
- LPR clients, such as the ACITS LPR client for Win95, don't have
- enough programming to be able to do this. Others, like the Win31
- client, can manipulate the print jobs remotely.</para>
-
- <para>FreeBSD offers some level of protection against inadvertent
- deletion of print jobs from remote hosts by restricting
- manipulation of a job to the same host that originated it. Even
- if the owner of the job matches a local user account on the
- server, for an ordinary user to delete remotely submitted print
- jobs, the request still must come from the remote host.</para>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="printserving-advanced">
- <title>Advanced Printing Topics</title>
-
- <para>The FreeBSD UNIX LPR/LPD printing system is very flexible, and,
- with the addition of filters, can be adapted to very unusual printing
- environments. To enhance this flexibility, several useful printing
- utilities are supplied on the FreeBSD CDROM which the administrator
- might wish to install.</para>
-
- <sect2>
- <title>Ghostscript</title>
-
- <para>The Ghostscript program, invoked as
- <filename>/usr/local/bin/gs</filename>, is one of the most useful
- printing utilities that have been developed for the free software
- community. Ghostscript reads incoming PostScript data, (or Adobe
- PDF files) interprets it, and outputs it as a raster image. This
- can be displayed on screen, for example, with the GhostView program
- under the X Window system, or printed on most graphics printers,
- such as Epson dot-matrix, HP DeskJet, or HP LaserJet. In effect, it
- is a way of adding PostScript printing capability to a printer that
- doesn't have PostScript firmware code. Ghostscript has been ported
- to numerous operating systems including Windows.</para>
-
- <para>The Ghostscript home page is located at
- <ulink url="http://www.cs.wisc.edu/~ghost/"></ulink>
- and contains the most current version of the program. A prebuilt
- FreeBSD binary of Ghostscript is located in the Packages section of
- the FreeBSD CDROM. This can be installed on the FreeBSD system by
- selecting the package from the prepackaged software list that is
- accessed through the <command>/stand/sysinstall</command>
- installation program. Many packaged programs on the CD depend on
- GhostScript, and so it may already be installed.</para>
-
- <para>Installation of the packaged version of GhostScript is
- recommended in the FreeBSD ports Section because it has been tested
- with the other packages that require it. The package creates a
- directory containing some documentation files in
- <filename>/usr/local/share/ghostscript/X.XX/doc</filename>.
- Unfortunately, because of the packaging process on the FreeBSD CDROM
- not all the useful installation files are copied into this location.
- So, if the package was version 5.03 (for example) the administrator
- will also want to get the file
- <ulink url="ftp://ftp.cs.wisc.edu/ghost/aladdin/gs502/ghostscript-5.02.tar.gz"></ulink>,
- and unzip and untar it into a temporary directory.</para>
-
- <para>Extracting the archive file creates a directory structure under
- the <filename>gs5.03</filename> subdirectory. To install
- ghostscript in the <filename>/etc/printcap</filename> file, read the
- <filename>gs5.03/devs.mak</filename> file to determine which printer
- driver definition works with your printer and then use the following
- instructions:</para>
-
- <procedure>
- <step>
- <para>Change to the root user with <command>su</command>.</para>
- </step>
-
- <step>
- <para>In the <filename>gs5.03</filename> directory, copy the
- <filename>lprsetup.sh</filename>,
- <filename>unix-lpr.txt</filename>, and
- <filename>unix-lpr.sh</filename> files to
- <filename>/usr/local/share/ghostscript/5.03</filename>.</para>
- </step>
-
- <step>
- <para>Change to the
- <filename>/usr/local/share/ghostscript/5.03</filename>
- directory. Edit <filename>lprsetup.sh</filename> with a text
- editor such as <command>vi</command>.</para>
- </step>
-
- <step>
- <para>Modify the <literal>DEVICES=</literal> entries
- to list your selected printer driver definitions per the
- instructions in <filename>unix-lpr.txt</filename>.</para>
- </step>
-
- <step>
- <para>Modify the <literal>PRINTERDEV=</literal> to
- <literal>/dev/lpt0</literal>, and the <literal>GSDIR=</literal>
- to <literal>/usr/local/share/ghostscript</literal>, and the
- <literal>SPOOLDIR=</literal> to
- <literal>/var/spool/output</literal>. Save the file.</para>
- </step>
-
- <step>
- <para>Edit the <filename>unix-lpr.sh</filename> file and change
- the <literal>PSFILTERPATH=</literal> to
- <literal>/usr/local/share/ghostscript</literal>.</para>
- </step>
-
- <step>
- <para>If the printer that you defined in the
- <filename>lprsetup.sh</filename> file is a monochrome printer,
- remove the <literal>"-dBitsPerPixel=${bpp}"</literal> and
- <literal>"$colorspec"</literal> entries on the
- <literal>gs</literal> invocation line and save the file.
- Otherwise, if it is a color definition leave them in. For
- example, the following line is for a monochrome LaserJet:</para>
-
- <programlisting>") | gs -q -dNOPAUSE -sDEVICE=${device} \"</programlisting>
-
- <para>Don't remove anything else. Exit the editor, and save the
- <filename>unix-lpr.sh</filename> file.</para>
- </step>
-
- <step>
- <para>Copy the <filename>unix-lpr.sh</filename> file to the parent
- directory, <filename>/usr/local/share/ghostscript</filename> and
- set the execute bit on it.</para>
- </step>
-
- <step>
- <para>Set the execute bit on <filename>lprsetup.sh</filename> with
- chmod and run the file by typing
- <userinput>./lprsetup.sh</userinput>.</para>
- </step>
-
- <step>
- <para>Follow the instructions on creating the Spool directories.
- If you will be using accounting and a separate log file, run the
- <command>touch</command> command to create the empty files per
- directions in script output.</para>
- </step>
-
- <step>
- <para>The sample <command>/etc/printcap</command> is located in
- the current directory; the filename is
- <filename>printcap.insert</filename>. Use this as a template to
- modify the <filename>/etc/printcap</filename> file. A sample
- <filename>/etc/printcap</filename> file for a LaserJet 3 is
- below:</para>
-
- <programlisting>#
-#
-ljet3.raw|Raw output device ljet3 for Ghostscript:\
- :rm=big.army.mil:rp=sherman:sd=/var/spool/output/ljet3/raw:\
- :mx#0:sf:sh:rs:
-
-#
-
-ljet3|Ghostscript device ljet3 (output to ljet3.raw):\
- :lp=/dev/null:sd=/var/spool/output/ljet3:\
- :lf=/var/log/lpd-errs:mx#0:sf:sh:rs:\
- :if=/usr/local/share/ghostscript/filt/indirect/ljet3/gsif:\
- :af=/var/spool/output/ljet3/acct:
-
-#</programlisting>
- </step>
- </procedure>
- </sect2>
-
- <sect2>
- <title>a2ps filter</title>
-
- <para>Another handy utility is the <command>a2ps</command> filter, short
- for ASCII-to-PostScript. This program takes an incoming ASCII
- datastream and converts it into PostScript. It can also print
- multiple pages on a single sheet of paper by shrinking them down. It
- is a useful tool for a printer that cannot interpret ASCII, such as
- a PostScript-only printer.</para>
-
- <para><command>A2ps</command> is not installed in the FreeBSD system
- by default; it is located in the ports section
- <filename>/usr/ports/print/a2ps43</filename>. A prepackaged binary
- can be installed with <command>/stand/sysinstall</command> but I
- have had problems with that port. It is best to install it by
- running <command>make</command> in the a2ps43 ports directory. A
- printcap entry and filter using this follow:</para>
-
- <example>
- <title><filename>/etc/printcap</filename></title>
-
- <programlisting>#
-lp|local line printer with output dumped through a2ps for raw listings:\
- :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:sh:mx#0:\
- :if=/usr/local/libexec/ascii2postscript:
-#</programlisting>
- </example>
-
- <example>
- <title><filename>/usr/local/libexec/ascii2postscript</filename></title>
-
- <programlisting>#!/bin/sh
-#
-# Simple filter that converts ASCII to PostScript for basic stuff like
-# directory listings.
-#
-
-/usr/local/bin/a2ps &amp;&amp; exit 0
-
-exit 2</programlisting>
- </example>
-
- <para>Read the system manual page for <command>a2ps</command> to see
- the options available with this program, and remember to set the
- filter script <filename>ascii2postscript</filename>
- all-executable.</para>
- </sect2>
- </sect1>
-
- <sect1 id="printserving-misc">
- <title>Miscellaneous</title>
-
- <para>The large number of other printing utilities cannot be covered
- here. Some add features such as automatic job type sensing, others
- handle bidirectional communication between the server and the printer.
- There are also a few other experimental LPR printing replacement
- systems. Commands such as ghostscript and <command>a2ps</command> can
- also be used in pipes that create pretty output on an ordinary impact
- printer.</para>
-
- <para>One last hint - the system manual pages can be printed with the
- <option>-t</option> option which turns their ordinary ASCII output to
- beautifully formatted PostScript. Try the command <command>man -t
- man</command> and send the output through GhostScript or a
- PostScript printer for easier to read manual pages.</para>
- </sect1>
- </chapter>
-</book>
diff --git a/en_US.ISO8859-1/books/corp-net-guide/freebsd.dsl b/en_US.ISO8859-1/books/corp-net-guide/freebsd.dsl
deleted file mode 100644
index 59efdeff4e..0000000000
--- a/en_US.ISO8859-1/books/corp-net-guide/freebsd.dsl
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- $FreeBSD$ -->
-
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
-<!ENTITY freebsd.dsl PUBLIC "-//FreeBSD//DOCUMENT DocBook Stylesheet//EN" CDATA DSSSL>
-]>
-
-<style-sheet>
- <style-specification use="docbook">
- <style-specification-body>
-
- ;; Keep the legalnotice together with the rest of the text
- (define %generate-legalnotice-link%
- #f)
- </style-specification-body>
- </style-specification>
-
- <external-specification id="docbook" document="freebsd.dsl">
-</style-sheet>
diff --git a/en_US.ISO8859-1/books/dev-model/book.xml b/en_US.ISO8859-1/books/dev-model/book.xml
index cd0f309f82..ad561cf0b0 100644
--- a/en_US.ISO8859-1/books/dev-model/book.xml
+++ b/en_US.ISO8859-1/books/dev-model/book.xml
@@ -44,7 +44,13 @@
<year>2002-2005</year>
<holder>Niklas Saers</holder>
</copyright>
- <revhistory>
+ <revhistory>
+ <revision>
+ <revnumber>1.3</revnumber>
+ <date>October, 2012</date>
+ <revremark>Remove hats held by specific people, these
+ are documented elsewhere.</revremark>
+ </revision>
<revision>
<revnumber>1.2</revnumber>
<date>April, 2005</date>
@@ -882,8 +888,6 @@
</para>
<para>
- <!-- [TODO] - check all email adresses and names -->
-
Hat held by:
The DocEng team <email>doceng@FreeBSD.org</email>.
The
@@ -908,27 +912,6 @@
</para>
</section>
- <section id="role-internationalisation" xreflabel="Internationalisation">
- <title>Internationalisation</title>
- <para>
- The Internationalisation hat is responsible for coordinating
- the localisation efforts of the FreeBSD kernel and userland
- utilities. The translation effort are coordinated by
- <xref linkend="sub-project-documentation"/>. The
- Internationalisation hat should suggest and promote standards
- and guidelines for writing and maintaining the software in a
- fashion that makes it easier to translate.
- </para>
- <para>
- Hat currently available.
- <!--
- [TODO] - Is this still the case?
- Although Ache does Localization
- Andrey A. Chernov <email>ache@FreeBSD.org</email>
- -->
- </para>
- </section>
-
<section id="role-postmaster" xreflabel="Postmaster">
<title>Postmaster</title>
<para>
@@ -944,21 +927,6 @@
</para>
</section>
- <section id="role-quality-assurance" xreflabel="Quality Assurance">
- <title>Quality Assurance</title>
-
- <para>
- The responsibilities of this role are to manage the quality assurance
- measures.
- </para>
-
- <para>
- Hat currently held by:
- Robert Watson <email>rwatson@FreeBSD.org</email>.
- </para>
-
- </section>
-
<section id="role-release-coordination" xreflabel="Release Coordination">
<title>Release Coordination</title>
@@ -993,8 +961,6 @@
<para id="role-releng" xreflabel="Release Engineering Team">
Hat held by:
the Release Engineering team <email>re@FreeBSD.org</email>.
- The current Release Engineer is
- Ken Smith <email>kensmith@FreeBSD.org</email>.
The
<ulink url="http://www.freebsd.org/releng/charter.html">
Release Engineering Charter</ulink>.
@@ -1052,16 +1018,6 @@
Officer Team <email>security-team@FreeBSD.org</email> to
help do the work.
</para>
- <para>
- Hat held by:
- the Security Officer <email>security-officer@FreeBSD.org</email>,
- currently headed by
- Colin Percival <email>cperciva@FreeBSD.org</email>.
- The
- <ulink url="http://www.freebsd.org/security/index.html#sec">
- Security Officer and The Security Officer Team's
- charter</ulink>.
- </para>
</section>
<section id="role-repo-manager" xreflabel="Source Repository Manager">
@@ -1069,7 +1025,7 @@
<para>
The Source Repository Manager is the only one who is allowed
to directly modify the repository without using the
- <xref linkend="tool-cvs"/> tool.
+ <xref linkend="tool-svn"/> tool.
It is his/her
responsibility to ensure that technical problems that arise in the
repository are resolved quickly. The source repository
@@ -1078,8 +1034,7 @@
</para>
<para>
Hat held by:
- the Source Repository Manager <email>cvs@FreeBSD.org</email>,
- currently headed by Peter Wemm <email>peter@FreeBSD.org</email>.
+ the Source Repository Manager <email>cvs@FreeBSD.org</email>.
</para>
</section>
@@ -1205,10 +1160,7 @@
</para>
<para>
Hat held by:
- the Donations Liaison Office <email>donations@FreeBSD.org</email>,
- currently headed by
- Michael W. Lucas <email>mwlucas@FreeBSD.org</email>.
-
+ the Donations Liaison Office <email>donations@FreeBSD.org</email>.
</para>
</section>
@@ -1230,8 +1182,7 @@
<para>
Hat held by:
- the Admin team <email>admin@FreeBSD.org</email>,
- currently headed by Mark Murray <email>markm@FreeBSD.org</email>
+ the Admin team <email>admin@FreeBSD.org</email>.
</para>
</section>
@@ -2237,11 +2188,9 @@
developed tools. These tools are commonly used in the open source world.
</para>
- <section id="tool-cvs" xreflabel="CVS">
- <title>Concurrent Versions System (CVS)</title>
- <para>
- Concurrent Versions System
- or simply <quote>CVS</quote>
+ <section id="tool-svn" xreflabel="SVN">
+ <title>Subversion (SVN)</title>
+ <para>Subversion (<quote>SVN</quote>)
is a system to handle multiple versions of text files and
tracking who committed what changes and why. A project lives
within a <quote>repository</quote> and different versions are
@@ -2261,7 +2210,6 @@
</para>
</section>
-
<section id="tool-gnats" xreflabel="GNATS">
<title>GNATS</title>
<para>
diff --git a/en_US.ISO8859-1/books/developers-handbook/Makefile b/en_US.ISO8859-1/books/developers-handbook/Makefile
index 436231ffd9..2d673e307e 100644
--- a/en_US.ISO8859-1/books/developers-handbook/Makefile
+++ b/en_US.ISO8859-1/books/developers-handbook/Makefile
@@ -19,11 +19,11 @@ INSTALL_ONLY_COMPRESSED?=
IMAGES_EN= sockets/layers.eps sockets/sain.eps sockets/sainfill.eps sockets/sainlsb.eps sockets/sainmsb.eps sockets/sainserv.eps sockets/serv.eps sockets/serv2.eps sockets/slayers.eps
#
-# SRCS lists the individual SGML files that make up the document. Changes
+# SRCS lists the individual XML files that make up the document. Changes
# to any of these files will force a rebuild
#
-# SGML content
+# XML content
SRCS= book.xml
SRCS+= introduction/chapter.xml
SRCS+= ipv6/chapter.xml
diff --git a/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml b/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml
index 3f90f40252..aa80bb4bf9 100644
--- a/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml
+++ b/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml
@@ -786,6 +786,254 @@ Debugger (msg=0xf01b0383 "Boot flags requested debugger")
stack, and do a backtrace with <command>where</command>.</para>
</sect1>
+ <sect1 id="kerneldebug-dcons">
+ <title>Kernel debugging with Dcons</title>
+
+ <para>&man.dcons.4; is a very simple console driver that is
+ not directly connected with any physical devices. It just reads
+ and writes characters from and to a buffer in a kernel or
+ loader. Due to its simple nature, it is very useful for kernel
+ debugging, especially with a &firewire; device. Currently, &os;
+ provides two ways to interact with the buffer from outside of
+ the kernel using &man.dconschat.8;.</para>
+
+ <sect2>
+ <title>Dcons over &firewire;</title>
+
+ <para>Most &firewire; (IEEE1394) host controllers are
+ based on the <acronym>OHCI</acronym> specification that
+ supports physical access to the host memory. This means that
+ once the host controller is initialized, we can access the
+ host memory without the help of software (kernel). We can
+ exploit this facility for interaction with &man.dcons.4;.
+ &man.dcons.4; provides similar functionality as a serial
+ console. It emulates two serial ports, one for the console
+ and <acronym>DDB</acronym>, the other for
+ <acronym>GDB</acronym>. Because remote memory access is fully
+ handled by the hardware, the &man.dcons.4; buffer is
+ accessible even when the system crashes.</para>
+
+ <para>&firewire; devices are not limited to those
+ integrated into motherboards. <acronym>PCI</acronym> cards
+ exist for desktops, and a cardbus interface can be purchased
+ for laptops.</para>
+
+ <sect3>
+ <title>Enabling &firewire; and Dcons support on the target
+ machine</title>
+
+ <para>To enable &firewire; and Dcons support in the kernel of
+ the <emphasis>target machine</emphasis>:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Make sure your kernel supports
+ <literal>dcons</literal>, <literal>dcons_crom</literal>
+ and <literal>firewire</literal>.
+ <literal>Dcons</literal> should be statically linked
+ with the kernel. For <literal>dcons_crom</literal> and
+ <literal>firewire</literal>, modules should be
+ OK.</para>
+ </listitem>
+ <listitem>
+ <para>Make sure physical <acronym>DMA</acronym> is enabled.
+ You may need to add
+ <literal>hw.firewire.phydma_enable=1</literal> to
+ <filename>/boot/loader.conf</filename>.</para>
+ </listitem>
+ <listitem>
+ <para>Add options for debugging.</para>
+ </listitem>
+ <listitem>
+ <para>Add <literal>dcons_gdb=1</literal> in
+ <filename>/boot/loader.conf</filename> if you use GDB
+ over &firewire;.</para>
+ </listitem>
+ <listitem>
+ <para>Enable <literal>dcons</literal> in
+ <filename>/etc/ttys</filename>.</para>
+ </listitem>
+ <listitem>
+ <para>Optionally, to force <literal>dcons</literal> to
+ be the high-level console, add
+ <literal>hw.firewire.dcons_crom.force_console=1</literal>
+ to <filename>loader.conf</filename>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>To enable &firewire; and Dcons support in &man.loader.8;
+ on i386 or amd64:</para>
+
+ <para>Add
+ <literal>LOADER_FIREWIRE_SUPPORT=YES</literal> in
+ <filename>/etc/make.conf</filename> and rebuild
+ &man.loader.8;:</para>
+
+ <screen>&prompt.root; <userinput>cd /sys/boot/i386 &amp;&amp; make clean &amp;&amp; make &amp;&amp; make install</userinput></screen>
+
+ <para>To enable &man.dcons.4; as an active low-level
+ console, add <literal>boot_multicons="YES"</literal> to
+ <filename>/boot/loader.conf</filename>.</para>
+
+ <para>Here are a few configuration examples. A sample kernel
+ configuration file would contain:</para>
+
+ <screen>device dcons
+device dcons_crom
+options KDB
+options DDB
+options GDB
+options ALT_BREAK_TO_DEBUGGER</screen>
+
+ <para>And a sample <filename>/boot/loader.conf</filename>
+ would contain:</para>
+
+ <screen>dcons_crom_load="YES"
+dcons_gdb=1
+boot_multicons="YES"
+hw.firewire.phydma_enable=1
+hw.firewire.dcons_crom.force_console=1</screen>
+
+ </sect3>
+
+ <sect3>
+ <title>Enabling &firewire; and Dcons support on the host
+ machine</title>
+
+ <para>To enable &firewire; support in the kernel on the
+ <emphasis>host machine</emphasis>:</para>
+
+ <screen>&prompt.root; <userinput>kldload firewire</userinput></screen>
+
+ <para>Find out the <acronym>EUI64</acronym> (the unique 64
+ bit identifier) of the &firewire; host controller, and
+ use &man.fwcontrol.8; or <command>dmesg</command> to
+ find the <acronym>EUI64</acronym> of the target machine.</para>
+
+ <para>Run &man.dconschat.8;, with:</para>
+
+ <screen>&prompt.root; <userinput>dconschat -e \# -br -G 12345 -t <replaceable>00-11-22-33-44-55-66-77</replaceable></userinput></screen>
+
+ <para>The following key combinations can be used once
+ &man.dconschat.8; is running:</para>
+
+ <informaltable pgwide="1">
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ <keycombo action="seq">
+ <keycap>~</keycap>
+ <keycap>.</keycap>
+ </keycombo>
+ </entry>
+ <entry>Disconnect</entry>
+ </row>
+ <row>
+ <entry>
+ <keycombo action="seq">
+ <keycap>~</keycap>
+ <keycombo action="simul">
+ <keycap>Ctrl</keycap>
+ <keycap>B</keycap>
+ </keycombo>
+ </keycombo>
+ </entry>
+ <entry>ALT BREAK</entry>
+ </row>
+ <row>
+ <entry>
+ <keycombo action="seq">
+ <keycap>~</keycap>
+ <keycombo action="simul">
+ <keycap>Ctrl</keycap>
+ <keycap>R</keycap>
+ </keycombo>
+ </keycombo>
+ </entry>
+ <entry>RESET target</entry>
+ </row>
+ <row>
+ <entry>
+ <keycombo action="seq">
+ <keycap>~</keycap>
+ <keycombo action="simul">
+ <keycap>Ctrl</keycap>
+ <keycap>Z</keycap>
+ </keycombo>
+ </keycombo>
+ </entry>
+ <entry>Suspend dconschat</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>Attach remote <acronym>GDB</acronym> by starting
+ &man.kgdb.1; with a remote debugging session:</para>
+
+ <screen><userinput>kgdb -r :12345 kernel</userinput></screen>
+
+ </sect3>
+ <sect3>
+ <title>Some general tips</title>
+
+ <para>Here are some general tips:</para>
+
+ <para>To take full advantage of the speed of &firewire;,
+ disable other slow console drivers:</para>
+
+ <screen>&prompt.root; conscontrol delete ttyd0 # serial console
+&prompt.root; conscontrol delete consolectl # video/keyboard</screen>
+
+ <para>There exists a <acronym>GDB</acronym> mode for
+ &man.emacs.1;; this is what you will need to add to your
+ <filename>.emacs</filename>:</para>
+
+ <screen><userinput>(setq gud-gdba-command-name "kgdb -a -a -a -r :12345")
+(setq gdb-many-windows t)
+(xterm-mouse-mode 1)
+M-x gdba</userinput></screen>
+
+ <para>And for <acronym>DDD</acronym> (<filename>devel/ddd</filename>):</para>
+
+ <screen># remote serial protocol
+LANG=C ddd --debugger kgdb -r :12345 kernel
+# live core debug
+LANG=C ddd --debugger kgdb kernel /dev/fwmem0.2</screen>
+ </sect3>
+ </sect2>
+
+ <sect2>
+ <title>Dcons with KVM</title>
+
+ <para>We can directly read the &man.dcons.4; buffer via
+ <filename>/dev/mem</filename> for live systems, and in the
+ core dump for crashed systems. These give you similar output
+ to <command>dmesg -a</command>, but the &man.dcons.4; buffer
+ includes more information.</para>
+
+ <sect3>
+ <title>Using Dcons with KVM</title>
+
+ <para>To use &man.dcons.4; with <acronym>KVM</acronym>:</para>
+
+ <para>Dump a &man.dcons.4; buffer of a live system:</para>
+
+ <screen>&prompt.root; <userinput>dconschat -1</userinput></screen>
+
+ <para>Dump a &man.dcons.4; buffer of a crash dump:</para>
+
+ <screen>&prompt.root; <userinput>dconschat -1 -M vmcore.XX</userinput></screen>
+
+ <para>Live core debugging can be done via:</para>
+
+ <screen>&prompt.root; <userinput>fwcontrol -m target_eui64</userinput>
+&prompt.root; <userinput>kgdb kernel /dev/fwmem0.2</userinput></screen>
+ </sect3>
+ </sect2>
+ </sect1>
+
<sect1 id="kerneldebug-options">
<title>Glossary of Kernel Options for Debugging</title>
diff --git a/en_US.ISO8859-1/books/developers-handbook/policies/chapter.xml b/en_US.ISO8859-1/books/developers-handbook/policies/chapter.xml
index 2451e051e2..6d7432628c 100644
--- a/en_US.ISO8859-1/books/developers-handbook/policies/chapter.xml
+++ b/en_US.ISO8859-1/books/developers-handbook/policies/chapter.xml
@@ -142,161 +142,12 @@
key issue in the decisions.</para>
<note>
- <para>Because of some unfortunate design limitations with the <acronym role="Revision Control System">RCS</acronym> file
- format and the use of vendor branches, minor, trivial and/or
+ <para>Because it makes it harder to import future versions
+ minor, trivial and/or
cosmetic changes are <emphasis>strongly discouraged</emphasis> on
- files that are still tracking the vendor branch. <quote>Spelling
- fixes</quote> are explicitly included here under the
- <quote>cosmetic</quote> category and are to be avoided.
- The repository bloat impact from a single character
- change can be rather dramatic.</para>
+ files that are still tracking the vendor branch.</para>
</note>
- <sect2 id="vendor-import-cvs">
- <title>Vendor Imports with CVS</title>
-
- <para>The <application>file</application> utility, used to identify
- the format of a file, will be used as example of how this model
- works:</para>
-
- <para><filename>src/contrib/file</filename> contains the source as
- distributed by the maintainers of this package. Parts that are entirely
- not applicable for &os; can be removed. In the case of &man.file.1;, the
- <filename>python</filename> subdirectory and files with the <filename>lt</filename>
- prefix were eliminated before the import, amongst others.</para>
-
- <para><filename>src/lib/libmagic</filename> contains a <application>bmake</application> style
- <filename>Makefile</filename> that uses the standard
- <filename>bsd.lib.mk</filename> makefile rules to produce the library
- and install the documentation.</para>
-
- <para><filename>src/usr.bin/file</filename> contains a <application>bmake</application> style
- <filename>Makefile</filename> which will produce and install the
- <command>file</command> program and its associated man-pages using the
- standard <filename>bsd.prog.mk</filename> rules.</para>
-
- <para>The important thing here is that the
- <filename>src/contrib/file</filename> directory is created according to
- the rules: it is supposed to contain the sources as distributed (on a
- proper vendor-branch and without <acronym>RCS</acronym> keyword expansion) with as few
- FreeBSD-specific changes as possible. If there are any doubts on
- how to go about it, it is imperative that you ask first and not blunder
- ahead and hope it <quote>works out</quote>.</para>
-
- <para>Because of the previously mentioned design limitations with
- vendor branches, it is required that <quote>official</quote> patches from
- the vendor be applied to the original distributed sources and the result
- re-imported onto the vendor branch again. Official patches should never
- be patched into the FreeBSD checked out version and <quote>committed</quote>, as this
- destroys the vendor branch coherency and makes importing future versions
- rather difficult as there will be conflicts.</para>
-
- <para>Since many packages contain files that are meant for compatibility
- with other architectures and environments than FreeBSD, it is
- permissible to remove parts of the distribution tree that are of no
- interest to FreeBSD in order to save space. Files containing copyright
- notices and release-note kind of information applicable to the remaining
- files shall <emphasis>not</emphasis> be removed.</para>
-
- <para>If it seems easier, the <command>bmake</command>
- <filename>Makefile</filename>s can be produced from the dist tree
- automatically by some utility, something which would hopefully make it
- even easier to upgrade to a new version. If this is done, be sure to
- check in such utilities (as necessary) in the
- <filename>src/tools</filename> directory along with the port itself so
- that it is available to future maintainers.</para>
-
- <para>In the <filename>src/contrib/file</filename> level directory, a file
- called <filename>FREEBSD-upgrade</filename> should be added and it
- should state things like:</para>
-
- <itemizedlist>
- <listitem>
- <para>Which files have been left out.</para>
- </listitem>
-
- <listitem>
- <para>Where the original distribution was obtained from and/or the
- official master site.</para>
- </listitem>
-
- <listitem>
- <para>Where to send patches back to the original authors.</para>
- </listitem>
-
- <listitem>
- <para>Perhaps an overview of the FreeBSD-specific changes that have
- been made.</para>
- </listitem>
- </itemizedlist>
-
- <para>Example wording from
- <filename>src/contrib/groff/FREEBSD-upgrade</filename> is
- below:</para>
-
- <programlisting>&dollar;FreeBSD: src/contrib/groff/FREEBSD-upgrade,v 1.5.12.1 2005/11/15 22:06:18 ru Exp $
-
-This directory contains virgin copies of the original distribution files
-on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
-the files in this directory via patches and a cvs commit.
-
-To upgrade to a newer version of groff, when it is available:
- 1. Unpack the new version into an empty directory.
- [Do not make ANY changes to the files.]
-
- 2. Use the command:
- cvs import -m 'Virgin import of FSF groff v&lt;version&gt;' \
- src/contrib/groff FSF v&lt;version&gt;
-
- For example, to do the import of version 1.19.2, I typed:
- cvs import -m 'Virgin import of FSF groff v1.19.2' \
- src/contrib/groff FSF v1_19_2
-
- 3. Follow the instructions printed out in step 2 to resolve any
- conflicts between local FreeBSD changes and the newer version.
-
-Do not, under any circumstances, deviate from this procedure.
-
-To make local changes to groff, simply patch and commit to the main
-branch (aka HEAD). Never make local changes on the FSF branch.
-
-All local changes should be submitted to Werner Lemberg &lt;wl@gnu.org&gt; or
-Ted Harding &lt;ted.harding@nessie.mcc.ac.uk&gt; for inclusion in the next
-vendor release.
-
-ru@FreeBSD.org - 20 October 2005</programlisting>
-
- <para>Another approach my also be taken for the list of files to be
- excluded, which is especially useful when the list is large or
- complicated or where imports happen frequently. By creating a
- file <filename>FREEBSD-Xlist</filename> in the same directory the
- vendor source is imported into, containing a list of filename
- patterns to be excluded one per line, future imports can often
- performed with:</para>
-
- <screen>&prompt.user; <userinput><command>tar</command> <option>-X</option> <filename>FREEBSD-Xlist</filename> <option>-xzf</option> <filename><replaceable>vendor-source.tgz</replaceable></filename></userinput></screen>
-
- <para>An example of a <filename>FREEBSD-Xlist</filename> file, from
- <filename>src/contrib/tcsh</filename>, is here:</para>
-
- <programlisting>*/BUGS
-*/config/a*
-*/config/bs2000
-*/config/bsd
-*/config/bsdreno
-*/config/[c-z]*
-*/tests
-*/win32</programlisting>
-
- <note>
- <para>Please do not import <filename>FREEBSD-upgrade</filename> or
- <filename>FREEBSD-Xlist</filename> with the contributed source.
- Rather you should add these files after the initial
- import.</para>
- </note>
-
- </sect2>
-
<sect2 id="vendor-import-svn">
<sect2info>
<authorgroup>
diff --git a/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml b/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml
index bba1da5520..08710e0134 100644
--- a/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml
+++ b/en_US.ISO8859-1/books/developers-handbook/tools/chapter.xml
@@ -349,9 +349,11 @@
<sect1 id="tools-compiling">
<title>Compiling with <command>cc</command></title>
- <para>This section deals only with the GNU compiler for C and C++,
- since that comes with the base FreeBSD system. It can be
- invoked by either <command>cc</command> or <command>gcc</command>. The
+ <para>This section deals with the <application>gcc</application>
+ and <application>clang</application> compilers for C and C++,
+ since they come with the &os; base system. Starting with
+ &os;&nbsp;10.X <command>clang</command> is installed as
+ <command>cc</command>. The
details of producing a program with an interpreter vary
considerably between interpreters, and are usually well covered
in the documentation and on-line help for the
@@ -377,14 +379,7 @@
<step>
<para>Convert the source code into assembly
language&mdash;this is very close to machine code, but still
- understandable by humans. Allegedly.
-
- <footnote>
- <para>To be strictly accurate, <command>cc</command> converts the
- source code into its own, machine-independent
- <firstterm>p-code</firstterm> instead of assembly language at
- this stage.</para>
- </footnote></para>
+ understandable by humans. Allegedly.</para>
</step>
<step>
@@ -537,13 +532,7 @@
an executable that runs faster than normal. You can add a
number after the <option>-O</option> to specify a higher
level of optimization, but this often exposes bugs in the
- compiler's optimizer. For instance, the version of
- <command>cc</command> that comes with the 2.1.0 release of
- FreeBSD is known to produce bad code with the
- <option>-O2</option> option in some circumstances.</para>
-
- <para>Optimization is usually only turned on when compiling
- a release version.</para>
+ compiler's optimizer.</para>
<informalexample>
<screen>&prompt.user; <userinput>cc -O -o foobar foobar.c</userinput>
diff --git a/en_US.ISO8859-1/books/faq/Makefile b/en_US.ISO8859-1/books/faq/Makefile
index e2e7548a0a..cfea6ba431 100644
--- a/en_US.ISO8859-1/books/faq/Makefile
+++ b/en_US.ISO8859-1/books/faq/Makefile
@@ -16,11 +16,11 @@ INSTALL_ONLY_COMPRESSED?=
WITH_BIBLIOXREF_TITLE?=YES
#
-# SRCS lists the individual SGML files that make up the document. Changes
+# SRCS lists the individual XML files that make up the document. Changes
# to any of these files will force a rebuild
#
-# SGML content
+# XML content
SRCS= book.xml
URL_RELPREFIX?= ../../../..
diff --git a/en_US.ISO8859-1/books/faq/book.xml b/en_US.ISO8859-1/books/faq/book.xml
index 813c654451..8f855241e8 100644
--- a/en_US.ISO8859-1/books/faq/book.xml
+++ b/en_US.ISO8859-1/books/faq/book.xml
@@ -50,6 +50,7 @@
<year>2010</year>
<year>2011</year>
<year>2012</year>
+ <year>2013</year>
<holder>The &os; Documentation Project</holder>
</copyright>
@@ -57,24 +58,18 @@
<legalnotice id="trademarks" role="trademarks">
&tm-attrib.freebsd;
- &tm-attrib.3com;
&tm-attrib.adobe;
- &tm-attrib.creative;
- &tm-attrib.cvsup;
&tm-attrib.ibm;
&tm-attrib.ieee;
&tm-attrib.intel;
- &tm-attrib.iomega;
&tm-attrib.linux;
&tm-attrib.microsoft;
&tm-attrib.mips;
- &tm-attrib.netscape;
&tm-attrib.opengroup;
&tm-attrib.oracle;
&tm-attrib.sgi;
&tm-attrib.sparc;
&tm-attrib.sun;
- &tm-attrib.usrobotics;
&tm-attrib.general;
</legalnotice>
@@ -88,14 +83,13 @@
unless otherwise noted. If you are interested in helping with
this project, send email to the &a.doc;. The latest version of
this document is always available from the <ulink
- url="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/faq/index.html">&os; World Wide Web server</ulink>.
+ url="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/faq/index.html">&os; website</ulink>.
It may also be downloaded as one large <ulink
- url="book.html">HTML</ulink> file with HTTP or as plain text,
- &postscript;, PDF, etc. from the <ulink
+ url="book.html">HTML</ulink> file with HTTP or as a variety
+ of other formats from the <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">&os; FTP
server</ulink>. You may also want to <ulink
- url="&url.base;/search/index.html">Search the FAQ</ulink>.
- </para>
+ url="&url.base;/search/index.html">Search the FAQ</ulink>.</para>
</abstract>
</bookinfo>
@@ -124,18 +118,18 @@
</question>
<answer>
- <para>Briefly, &os; is a &unix;&nbsp;like operating system for
- AMD64 and &intel; EM64T, &i386; PC-98, IA-64, &arm;,
- &powerpc; and &ultrasparc; platforms based on U.C.
+ <para>&os; is a modern operating system for desktops,
+ laptops, servers, and embedded systems with
+ support for a large number of <ulink
+ url="http://www.FreeBSD.org/platforms/">platforms</ulink>.</para>
+
+ <para>It is based on U.C.
Berkeley's <quote>4.4BSD-Lite</quote> release, with some
<quote>4.4BSD-Lite2</quote> enhancements. It is also based
indirectly on William Jolitz's port of U.C. Berkeley's
<quote>Net/2</quote> to the &i386;, known as
<quote>386BSD</quote>, though very little of the 386BSD code
- remains. A fuller description of what &os; is and how it
- can work for you may be found on the <ulink
- url="&url.base;/index.html">&os; home page</ulink>.
- </para>
+ remains.</para>
<para>&os; is used by companies, Internet Service Providers,
researchers, computer professionals, students and home users
@@ -144,8 +138,7 @@
<para>For more detailed information on &os;, please see the
<ulink
- url="&url.books.handbook;/index.html">&os; Handbook</ulink>.
- </para>
+ url="&url.books.handbook;/index.html">&os; Handbook</ulink>.</para>
</answer>
</qandaentry>
@@ -155,32 +148,11 @@
</question>
<answer>
- <para>The goal of the &os; Project is to provide software that
- may be used for any purpose and without strings attached.
- Many of us have a significant investment in the code (and
- project) and would certainly not mind a little financial
- compensation now and then, but we definitely do not insist
- on it. We believe that our first and foremost
- <quote>mission</quote> is to provide code to any and all
- comers, and for whatever purpose, so that the code gets the
- widest possible use and provides the widest possible
- benefit. This is, we believe, one of the most fundamental
- goals of Free Software and one that we enthusiastically
- support.</para>
-
- <para>That code in our source tree which falls under the
- <ulink
- url="http://www.FreeBSD.org/copyright/COPYING">GNU General Public License (GPL)</ulink>
- or <ulink
- url="http://www.FreeBSD.org/copyright/COPYING.LIB">GNU Library General Public License (LGPL)</ulink>
- comes with slightly more strings attached, though at least
- on the side of enforced access rather than the usual
- opposite. Due to the additional complexities that can
- evolve in the commercial use of GPL software, we do,
- however, endeavor to replace such software with submissions
- under the more relaxed <ulink
- url="http://www.FreeBSD.org/copyright/freebsd-license.html">&os; license</ulink>
- whenever possible.</para>
+ <para>The goal of the &os; Project is to provide a
+ stable and fast general purpose
+ operating system that may
+ be used for any purpose
+ without strings attached.</para>
</answer>
</qandaentry>
@@ -205,7 +177,39 @@
<listitem>
<para>Do not sue us if it breaks.</para>
</listitem>
+
+ <listitem>
+ <para>Do not remove or modify the license.</para>
+ </listitem>
</itemizedlist>
+
+ <para>Many of us have a significant investment in the
+ project
+ and would certainly not mind a little financial
+ compensation now and then, but we definitely do not insist
+ on it. We believe that our first and foremost
+ <quote>mission</quote> is to provide code to any and all
+ comers, and for whatever purpose, so that the code gets
+ the
+ widest possible use and provides the widest possible
+ benefit. This, we believe, is one of the most
+ fundamental
+ goals of Free Software and one that we enthusiastically
+ support.</para>
+
+ <para>Code in our source tree which falls under the
+ <ulink
+ url="http://www.FreeBSD.org/copyright/COPYING">GNU General Public License (GPL)</ulink>
+ or <ulink
+ url="http://www.FreeBSD.org/copyright/COPYING.LIB">GNU Library General Public License (LGPL)</ulink>
+ comes with slightly more strings attached, though at least
+ on the side of enforced access rather than the usual
+ opposite. Due to the additional complexities that can
+ evolve in the commercial use of GPL software, we do,
+ however, endeavor to replace such software with submissions
+ under the more relaxed <ulink
+ url="http://www.FreeBSD.org/copyright/freebsd-license.html">&os; license</ulink>
+ whenever possible.</para>
</answer>
</qandaentry>
@@ -227,8 +231,7 @@
network servers, and just about everything else you might
want. Most of these applications can be managed through the
<ulink
- url="http://www.FreeBSD.org/ports/">Ports Collection</ulink>.
- </para>
+ url="http://www.FreeBSD.org/ports/">Ports Collection</ulink>.</para>
<para>If you need to use an application that is only available
on one operating system, you simply cannot replace that
@@ -244,7 +247,11 @@
<para>If you are migrating to &os; from some other &unix;
environment, you already know most of what you need to. If
your background is in graphic-driven operating systems such
- as &windows; and older versions of &macos;, expect to invest
+ as &windows; and &macos;, you may be interested in using
+ <ulink
+ url="http://www.pcbsd.org/">PC-BSD</ulink>, a &os; based
+ distribution, instead. If you have not used &unix; before
+ expect to invest
additional time learning the &unix; way of doing things.
This FAQ and the <ulink
url="&url.books.handbook;/index.html">&os; Handbook</ulink>
@@ -299,7 +306,37 @@
differences between the various projects,
called <ulink
url="http://www.freebsdworld.gr/freebsd/bsd-family-tree.html">The BSD Family Tree</ulink>
- which goes a fair way to answering this question.</para>
+ which goes a fair way to answering this question.
+ Some of the information is out of date, but the history
+ portion in particular remains accurate.</para>
+
+ <para>Most of the BSDs share patches and code, even today.
+ All of the BSDs have common ancestry.</para>
+
+ <para>The design goals of &os; are described in
+ <xref linkend="FreeBSD-goals"/>, above. The design goals
+ of the other most popular BSDs may be summarized as
+ follows:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>OpenBSD aims for operating system security above
+ all else. The OpenBSD team wrote &man.ssh.1; and
+ &man.pf.4;, which have both been ported to &os;.</para>
+ </listitem>
+
+ <listitem>
+ <para>NetBSD aims to be easily ported to other hardware
+ platforms.</para>
+ </listitem>
+
+ <listitem>
+ <para>DragonFlyBSD is a fork of &os;&nbsp;4.8 that has
+ since developed many interesting features of its own,
+ including the HAMMER file system and support for
+ user-mode <quote>vkernels</quote>.</para>
+ </listitem>
+ </itemizedlist>
</answer>
</qandaentry>
@@ -308,11 +345,6 @@
<para>What is the latest version of &os;?</para>
</question>
-<!--
- This answer is a hack to deal with the fact that for now there are
- multiple "latest" versions of FreeBSD.
--->
-
<answer>
<para>At any point in the development of &os;, there can be
multiple parallel branches. &rel.relx; releases are
@@ -372,29 +404,24 @@
<answer>
<para><ulink
- url="&url.books.handbook;/current-stable.html#CURRENT">&os.current;</ulink>
+ url="&url.books.handbook;/current-stable.html#current">&os.current;</ulink>
is the development version of the operating system, which
will in due course become the new &os.stable; branch. As
such, it is really only of interest to developers working on
the system and die-hard hobbyists. See the <ulink
- url="&url.books.handbook;/current-stable.html#CURRENT">relevant section</ulink>
+ url="&url.books.handbook;/current-stable.html#current">relevant section</ulink>
in the <ulink
url="&url.books.handbook;/index.html">Handbook</ulink> for
details on running <emphasis>-CURRENT</emphasis>.</para>
- <para>If you are not familiar with the operating system or are
- not capable of identifying the difference between a real
- problem and a temporary problem, you should not use
+ <para>If you are not familiar with &os;
+ you should not use
&os.current;. This branch sometimes evolves quite quickly
- and can be un-buildable sometimes.
+ and due to mistake can be un-buildable at times.
People that use &os.current; are expected to be able to
- analyze any problems and only report them if they are deemed
- to be mistakes rather than <quote>glitches</quote>.
- Questions such as <quote>make world produces some error
- about groups</quote> on the &a.current; may be treated with
- contempt.</para>
+ analyze, debug, and report problems.</para>
- <para>Every month, <ulink
+ <para>&os; <ulink
url="&url.base;/snapshots/">snapshot</ulink>
releases are made based on the current state of the
<emphasis>-CURRENT</emphasis> and
@@ -437,15 +464,10 @@
<emphasis>-STABLE</emphasis> snapshots.</para>
<para>Snapshot releases are directly available from <ulink
- url="&url.base;/snapshots/">snapshot</ulink>.
- </para>
+ url="&url.base;/snapshots/">snapshot</ulink>.</para>
- <para>Official snapshots are generated each month on a regular
- basis for all actively developed branches. There are also
- daily snapshot builds of the popular &arch.i386; and
- &arch.amd64; branches, hosted on <ulink
- url="http://snapshots.us.freebsd.org/"></ulink>.
- </para>
+ <para>Official snapshots are generated on a regular
+ basis for all actively developed branches.</para>
</answer>
</qandaentry>
@@ -458,9 +480,9 @@
<answer>
<para>Back when &os;&nbsp;2.0.5 was released, &os; development
branched in two. One branch was named <ulink
- url="&url.books.handbook;/current-stable.html#STABLE">-STABLE</ulink>,
+ url="&url.books.handbook;/current-stable.html#stable">-STABLE</ulink>,
one <ulink
- url="&url.books.handbook;/current-stable.html#CURRENT">-CURRENT</ulink>.
+ url="&url.books.handbook;/current-stable.html#current">-CURRENT</ulink>.
<emphasis>&os;-STABLE</emphasis> is intended for Internet
Service Providers and other commercial enterprises for whom
sudden shifts or experimental features are quite
@@ -470,24 +492,10 @@
been one unbroken line since 2.0 was released, leading
towards &rel.current;-RELEASE and beyond. For more detailed
information on branches see <quote><ulink
- url="&url.articles.releng;/release-proc.html#REL-BRANCH">&os; Release Engineering: Creating the Release Branch</ulink></quote>,
+ url="&url.articles.releng;/release-proc.html#rel-branch">&os; Release Engineering: Creating the Release Branch</ulink></quote>,
the status of the branches and the upcoming release schedule
can be found on the <ulink
- url="http://www.FreeBSD.org/releng">Release Engineering Information</ulink> page.
- </para>
-
- <para>The 2.2-STABLE branch was retired with the release of
- 2.2.8. The 3-STABLE branch has ended with the release of
- 3.5.1, the final 3.<replaceable>X</replaceable> release.
- The 4-STABLE branch has ended with the release of 4.11, the
- final 4.<replaceable>X</replaceable> release. The only
- changes made to either of these branches will be, for the
- most part, security-related bug fixes. Support for the
- 5-STABLE branches has ended with the release of 5.5, the
- final 5.<replaceable>X</replaceable> release. Support for
- the 6-STABLE branch will continue for some time but focus
- primarily on security-related bug fixes and other serious
- issues.</para>
+ url="http://www.FreeBSD.org/releng">Release Engineering Information</ulink> page.</para>
<para>&rel.current;-STABLE is the actively developed
<emphasis>-STABLE</emphasis> branch. The latest release on
@@ -513,7 +521,7 @@
on average. Release dates are announced well in advance, so
that the people working on the system know when their
projects need to be finished and tested. A testing period
- precedes each release, in order to ensure that the addition
+ precedes each release, to ensure that the addition
of new features does not compromise the stability of the
release. Many users regard this caution as one of the best
things about &os;, even though waiting for all the latest
@@ -543,7 +551,7 @@
url="&url.base;/administration.html#t-core">core team</ulink> of
9 people. There is a much larger team of more than 350
<ulink
- url="&url.articles.contributors;/article.html#STAFF-COMMITTERS">committers</ulink>
+ url="&url.articles.contributors;/article.html#staff-committers">committers</ulink>
who are authorized to make changes directly to the &os;
source tree.</para>
@@ -562,15 +570,13 @@
<answer>
<para>Every significant release of &os; is available via
anonymous FTP from the <ulink
- url="ftp://ftp.FreeBSD.org/pub/FreeBSD/"> &os; FTP site</ulink>:
- </para>
+ url="ftp://ftp.FreeBSD.org/pub/FreeBSD/"> &os; FTP site</ulink>:</para>
<itemizedlist>
<listitem>
<para>The latest &rel.stable; release, &rel.current;-RELEASE
can be found in the <ulink
- url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/i386/&rel.current;-RELEASE/">&rel.current;-RELEASE directory</ulink>.
- </para>
+ url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/i386/&rel.current;-RELEASE/">&rel.current;-RELEASE directory</ulink>.</para>
</listitem>
<listitem>
@@ -585,22 +591,13 @@
<listitem>
<para>The latest &rel2.stable; release, &rel2.current;-RELEASE
can be found in the <ulink
- url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel2.current;-RELEASE/">&rel2.current;-RELEASE directory</ulink>.
- </para>
- </listitem>
-
- <listitem>
- <para>The latest &rel3.stable; release, &rel3.current;-RELEASE
- can be found in the <ulink
- url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel3.current;-RELEASE/">&rel3.current;-RELEASE directory</ulink>.
- </para>
+ url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel2.current;-RELEASE/">&rel2.current;-RELEASE directory</ulink>.</para>
</listitem>
</itemizedlist>
<para>Information about obtaining &os; on CD, DVD, and other
media can be found in <ulink
- url="&url.books.handbook;/mirrors.html">the Handbook</ulink>.
- </para>
+ url="&url.books.handbook;/mirrors.html">the Handbook</ulink>.</para>
</answer>
</qandaentry>
@@ -627,19 +624,6 @@
an article on how to write good problem reports.</para>
</answer>
</qandaentry>
-
- <qandaentry>
- <question id="other-info-sources">
- <para>What other sources of information are there?</para>
- </question>
-
- <answer>
- <para>Please check the <ulink
- url="http://www.FreeBSD.org/docs.html">Documentation</ulink>
- list on the main <ulink
- url="http://www.FreeBSD.org">&os;</ulink> web site.</para>
- </answer>
- </qandaentry>
</qandaset>
</chapter>
@@ -909,8 +893,7 @@
</listitem>
<listitem>
- <para>The compression and packaging scheme. There are
- three of these currently in use.</para>
+ <para>The compression and packaging scheme.</para>
<orderedlist>
<listitem>
@@ -928,42 +911,11 @@
(i.e., <filename>article.pdf</filename>,
<filename>book.html</filename>, and so on).</para>
- <para>These files are then compressed using two
- compression schemes.</para>
-
- <informaltable frame="none" pgwide="1">
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Scheme</entry>
-
- <entry>Description</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><literal>zip</literal></entry>
-
- <entry>The <literal>zip</literal> format. If you want to
- uncompress this on &os; you will need to
- install the <filename
- role="package">archivers/unzip</filename>
- port first.</entry>
- </row>
-
- <row>
- <entry><literal>bz2</literal></entry>
-
- <entry>The <literal>bzip2</literal> format. Less widespread than
- <literal>zip</literal>, but generally gives smaller files.
- Install the <filename
- role="package">archivers/bzip2</filename>
- port to uncompress these files.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
+ <para>These files are then compressed using either
+ the <literal>zip</literal> or
+ <literal>bz2</literal> compression schemes.
+ &man.tar.1; can be used to uncompress these
+ files.</para>
<para>So the &postscript; version of the Handbook,
compressed using <literal>bzip2</literal> will be stored in a file
@@ -980,16 +932,18 @@
appropriate documents into place.</para>
<para>For example, the split HTML version of the FAQ,
- compressed using &man.bzip2.1;, can be found in the
+ compressed using &man.bzip2.1;, can be found in
<filename>doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2</filename>
- file. To download and uncompress that file you would have
- to do this.</para>
+ To download and uncompress that file you would have
+ to do this:</para>
<screen>&prompt.root; <userinput>fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2</userinput>
-&prompt.root; <userinput>bzip2 -d book.html-split.tar.bz2</userinput>
-&prompt.root; <userinput>tar xvf book.html-split.tar</userinput></screen>
+&prompt.root; <userinput>tar xvf book.html-split.tar.bz2</userinput></screen>
- <para>You will be left with a collection of
+ <para>If the file is compressed,
+ <application>tar</application> will automatically
+ detect the appropriate format and decompress it correctly.
+ You will be left with a collection of
<filename>.html</filename> files. The main one is called
<filename>index.html</filename>, which will contain the
table of contents, introductory material, and links to the
@@ -1000,22 +954,14 @@
<qandaentry>
<question id="mailing">
- <para>Where do I find info on the &os; mailing lists?</para>
- </question>
-
- <answer>
- <para>You can find full information in the <ulink
- url="&url.books.handbook;/eresources.html#ERESOURCES-MAIL">Handbook entry on mailing-lists</ulink>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="newsgroups">
- <para>What &os; news groups are available?</para>
+ <para>Where do I find info on the &os; mailing lists?
+ What &os; news groups are available?</para>
</question>
<answer>
<para>You can find full information in the <ulink
+ url="&url.books.handbook;/eresources.html#eresources-mail">Handbook entry on mailing-lists</ulink>
+ and the <ulink
url="&url.books.handbook;/eresources-news.html">Handbook entry on newsgroups</ulink>.</para>
</answer>
</qandaentry>
@@ -1102,6 +1048,10 @@
</listitem>
</itemizedlist>
+ <para>The &os; wiki has a <ulink
+ url="http://wiki.freebsd.org/IrcChannels">good list</ulink>
+ of IRC channels.</para>
+
<para>Each of these channels are distinct and are not
connected to each other. Their chat styles also differ, so
you may need to try each to find one suited to your chat
@@ -1114,13 +1064,13 @@
</qandaentry>
<qandaentry>
- <question id="forums">
- <para>Are there any web based forums to discuss &os;?</para>
- </question>
- <answer>
- <para>The official &os; forums are located at <ulink
- url="http://forums.FreeBSD.org/">http://forums.FreeBSD.org/</ulink>.</para>
- </answer>
+ <question id="forums">
+ <para>Are there any web based forums to discuss &os;?</para>
+ </question>
+ <answer>
+ <para>The official &os; forums are located at <ulink
+ url="http://forums.FreeBSD.org/">http://forums.FreeBSD.org/</ulink>.</para>
+ </answer>
</qandaentry>
<qandaentry>
@@ -1141,11 +1091,10 @@
<para>BSD Certification Group, Inc. provides system
administration certifications for DragonFly&nbsp;BSD, &os;, NetBSD,
OpenBSD. If you are interested in them, visit <ulink
- url="http://www.BSDCertification.org">their site</ulink>.
- </para>
+ url="http://www.BSDCertification.org">their site</ulink>.</para>
<para>Any other organizations providing training and support
- should contact the Project in order to be listed here.</para>
+ should contact the Project to be listed here.</para>
</answer>
</qandaentry>
</qandaset>
@@ -1165,70 +1114,105 @@
<title>Installation</title>
<qandaset>
+
+ <qandaentry>
+ <question id="which-architecture">
+ <para>Which platform should I download? I have a 64
+ bit capable &intel; CPU,
+ but I only see <literal>amd64</literal>.</para>
+ </question>
+
+ <answer>
+ <para>&arch.amd64; is the term &os; uses for 64-bit
+ compatible x86 architectures. Most modern computers
+ should use &arch.amd64;. Older hardware should use
+ &arch.i386;. If you are installing on a
+ non-x86-compatible architecture select the platform
+ which best matches the architecture you are
+ using.</para>
+ </answer>
+ </qandaentry>
+
<qandaentry>
<question id="floppy-download">
<para>Which file do I download to get &os;?</para>
</question>
<answer>
- <para>You need three floppy images:
- <filename>floppies/boot.flp</filename>,
- <filename>floppies/kern1.flp</filename>, and
- <filename>floppies/kern2.flp</filename>. These images need
- to be copied onto floppies by tools like
- <command>fdimage</command> or &man.dd.1;.</para>
+ <para>On the
+ <ulink url="http://www.freebsd.org/where.html">Getting &os;</ulink>
+ page select <literal>[iso]</literal> next to the
+ architecture you want to use.</para>
- <para>If you need to download the distributions yourself (for
- a DOS file system install, for instance), below are some
- recommendations for distributions to grab:</para>
+ <para>Any of the following can be used:</para>
- <itemizedlist>
- <listitem>
- <para>base/</para>
- </listitem>
+ <informaltable frame="none" pgwide="1">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>file</entry>
+ <entry>description</entry>
+ </row>
+ </thead>
- <listitem>
- <para>manpages/</para>
- </listitem>
+ <tbody>
+ <row>
+ <entry><filename>disc1.iso</filename></entry>
+ <entry>Contains enough to install &os; and
+ a minimal set of packages.</entry>
+ </row>
- <listitem>
- <para>compat*/</para>
- </listitem>
+ <row>
+ <entry><filename>dvd1.iso</filename></entry>
+ <entry>Similar to <filename>disc1.iso</filename>
+ but with additional packages.</entry>
+ </row>
- <listitem>
- <para>doc/</para>
- </listitem>
+ <row>
+ <entry><filename>memstick.img</filename></entry>
+ <entry>A bootable image sufficient for copying to a
+ USB stick.</entry>
+ </row>
- <listitem>
- <para>src/ssys.*</para>
- </listitem>
- </itemizedlist>
+ <row>
+ <entry><filename>bootonly.iso</filename></entry>
+ <entry>A minimal image that requires network
+ access during installation to completely
+ install &os;.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>&arch.pc98; users require these floppy images:
+ <filename>floppies/boot.flp</filename>,
+ <filename>floppies/kern1.flp</filename>,
+ <filename>floppies/kern2.flp</filename>, and
+ <filename>floppies/mfsroot1.flp</filename>. These images
+ need
+ to be copied onto floppies by tools like
+ &man.dd.1;.</para>
<para>Full instructions on this procedure and a little bit
more about installation issues in general can be found in
the <ulink
- url="&url.books.handbook;/install.html">Handbook entry on installing &os;</ulink>.
- </para>
+ url="&url.books.handbook;/install.html">Handbook entry on installing &os;</ulink>.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="floppy-image-too-large">
- <para>What do I do if the floppy images does not fit on a
- single floppy?</para>
+ <para>What do I do if the images do not fit on a
+ single disk?</para>
</question>
<answer>
- <para>A 3.5&nbsp;inch (1.44&nbsp;MB) floppy can accommodate
- 1,474,560&nbsp;bytes of data. The boot image is exactly
- 1,474,560&nbsp;bytes in size.</para>
-
- <para>Common mistakes when preparing the boot floppy
+ <para>Common mistakes when preparing the boot media
are:</para>
<itemizedlist>
<listitem>
- <para>Not downloading the floppy image in
+ <para>Not downloading the image in
<emphasis>binary</emphasis> mode when using
<acronym>FTP</acronym>.</para>
@@ -1236,7 +1220,8 @@
<emphasis>ascii</emphasis> and attempt to change any
end-of-line characters received to match the conventions
used by the client's system. This will almost
- invariably corrupt the boot image. Check the size of
+ invariably corrupt the boot image. Check the SHA-256
+ of
the downloaded boot image: if it is not
<emphasis>exactly</emphasis> that on the server, then
the download process is suspect.</para>
@@ -1258,10 +1243,9 @@
floppy, track for track, and is not meant to be placed
on the floppy as a regular file. You have to transfer
it to the floppy <quote>raw</quote>, using the low-level
- tools (e.g. <command>fdimage</command> or
+ tools (e.g., <command>fdimage</command> or
<command>rawrite</command>) described in the <ulink
- url="&url.books.handbook;/install.html">installation guide to &os;</ulink>.
- </para>
+ url="&url.books.handbook;/install.html">installation guide to &os;</ulink>.</para>
</listitem>
</itemizedlist>
</answer>
@@ -1273,15 +1257,17 @@
</question>
<answer>
- <para>Installation instructions can be found in the <ulink
- url="&url.books.handbook;/install.html">Handbook entry on installing &os;</ulink>.
- </para>
+ <para>Installation instructions for versions since
+ &os;&nbsp;9.0 can be found at <ulink
+ url="&url.books.handbook;/bsdinstall.html">Handbook entry on installing &os;</ulink>.
+ Older instructions can be found in the <ulink
+ url="&url.books.handbook;/install.html">legacy entry on installing &os;</ulink>.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="need-to-run">
- <para>What do I need in order to run &os;?</para>
+ <para>What do I need to run &os;?</para>
</question>
<answer>
@@ -1295,7 +1281,7 @@
<qandaentry>
<question id="custom-boot-floppy">
- <para>How can I make my own custom install disk?</para>
+ <para>How can I make my own custom release or install disk?</para>
</question>
<answer>
@@ -1313,7 +1299,8 @@
</question>
<answer>
- <para>Install &windows; first, then &os;. &os;'s boot manager
+ <para>If &windows; is installed first, then yes.
+ &os;'s boot manager
will then manage to boot &windows; and &os;. If you install
&windows; second, it will boorishly overwrite your boot
manager without even asking. If that happens, see the next
@@ -1322,287 +1309,26 @@
</qandaentry>
<qandaentry>
- <question id="win95-damaged-boot-manager">
- <para>&windows; killed my boot manager! How do I get it
- back?</para>
- </question>
-
- <answer>
- <para>You can reinstall the boot manager &os; comes with in
- one of three ways:</para>
-
- <itemizedlist>
- <listitem>
- <para>Running DOS, go into the <filename
- class="directory">tools</filename> directory of your
- &os; distribution and look for
- <filename>bootinst.exe</filename>. You run it like
- so:</para>
-
- <screen><prompt>...\TOOLS&gt;</prompt> <userinput>bootinst.exe boot.bin</userinput></screen>
-
- <para>and the boot manager will be reinstalled.</para>
- </listitem>
-
- <listitem>
- <para>Boot the &os; boot floppy again and go to the
- <guimenuitem>Custom</guimenuitem> menu item for custom
- installation. Choose
- <guimenuitem>Partition</guimenuitem>. Select the drive
- which used to contain your boot manager (likely the
- first one) and when you come to the partition editor for
- it, as the very first thing (e.g. do not make any
- changes) press <keycap>W</keycap>. This will ask for
- confirmation, select &gui.yes;, and when you get the
- Boot Manager selection prompt, be sure to select the
- <application>&os; Boot Manager</application>. This will
- re-write the boot manager to disk. Now quit out of the
- installation menu and reboot off the hard disk as
- normal.</para>
- </listitem>
-
- <listitem>
- <para>Boot the &os; boot floppy (or CD-ROM) and choose the
- <guimenuitem>Fixit</guimenuitem> menu item. Select
- either the Fixit floppy or CD-ROM #2 (the
- <quote>live</quote> file system option) as appropriate
- and enter the fixit shell. Then execute the following
- command:</para>
-
- <screen><prompt>Fixit#</prompt> <userinput>fdisk -B -b /boot/boot0 <replaceable>bootdevice</replaceable></userinput></screen>
-
- <para>substituting <replaceable>bootdevice</replaceable>
- for your real boot device such as
- <devicename>ad0</devicename> (first IDE disk),
- <devicename>ad4</devicename> (first IDE disk on
- auxiliary controller), <devicename>da0</devicename>
- (first SCSI disk), etc.</para>
- </listitem>
- </itemizedlist>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="boot-on-thinkpad">
- <para>My A, T, or X series IBM Thinkpad locks up when I first
- booted up my &os; installation. How can I solve
- this?</para>
- </question>
-
- <answer>
- <para>A bug in early revisions of IBM's BIOS on these machines
- mistakenly identifies the &os; partition as a potential FAT
- suspend-to-disk partition. When the BIOS tries to parse the
- &os; partition it hangs.</para>
-
- <para>According to IBM<footnote>
- <para>In an email from Keith Frechette
- <email>kfrechet@us.ibm.com</email>.</para></footnote>,
- the following model/BIOS release numbers incorporate the
- fix.</para>
-
- <informaltable frame="none" pgwide="1">
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Model</entry>
-
- <entry>BIOS revision</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>T20</entry>
-
- <entry>IYET49WW or later</entry>
- </row>
-
- <row>
- <entry>T21</entry>
-
- <entry>KZET22WW or later</entry>
- </row>
-
- <row>
- <entry>A20p</entry>
-
- <entry>IVET62WW or later</entry>
- </row>
-
- <row>
- <entry>A20m</entry>
-
- <entry>IWET54WW or later</entry>
- </row>
-
- <row>
- <entry>A21p</entry>
-
- <entry>KYET27WW or later</entry>
- </row>
-
- <row>
- <entry>A21m</entry>
-
- <entry>KXET24WW or later</entry>
- </row>
-
- <row>
- <entry>A21e</entry>
-
- <entry>KUET30WW</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>It has been reported that later IBM BIOS revisions may
- have reintroduced the bug. <ulink
- url="http://docs.FreeBSD.org/cgi/mid.cgi?20010427133759.A71732">This message</ulink>
- from &a.nectar; to the &a.mobile; describes a procedure
- which may work if your newer IBM laptop does not boot &os;
- properly, and you can upgrade or downgrade the BIOS.</para>
-
- <para>If you have an earlier BIOS, and upgrading is not an
- option, a workaround is to install &os;, change the partition
- ID &os; uses, and install new boot blocks that can handle
- the different partition ID.</para>
-
- <para>First, you will need to restore the machine to a state
- where it can get through its self-test screen. Doing this
- requires powering up the machine without letting it find a
- &os; partition on its primary disk. One way is to remove
- the hard disk and temporarily move it to an older ThinkPad
- (such as a ThinkPad 600) or a desktop PC with an appropriate
- conversion cable. Once it is there, you can delete the &os;
- partition and move the hard disk back. The ThinkPad should
- now be in a bootable state again.</para>
-
- <para>With the machine functional again, you can use the
- workaround procedure described here to get a working &os;
- installation.</para>
-
- <procedure>
- <step>
- <para>Download <filename>boot1</filename> and
- <filename>boot2</filename> from <ulink
- url="http://people.FreeBSD.org/~bmah/ThinkPad/"></ulink>.
- Put these files somewhere you will be able to retrieve
- them later.</para>
- </step>
-
- <step>
- <para>Install &os; as normal on to the ThinkPad.
- <emphasis>Do not</emphasis> use <literal>Dangerously
- Dedicated</literal> mode. <emphasis>Do not</emphasis>
- reboot when the install has finished.</para>
- </step>
-
- <step>
- <para>Either switch to the <quote>Emergency Holographic
- Shell</quote> (<keycombo
- action="simul"><keycap>Alt</keycap><keycap>F4</keycap></keycombo>)
- or start a <quote>fixit</quote> shell.</para>
- </step>
-
- <step>
- <para>Use &man.fdisk.8; to change the &os; partition ID
- from <literal>165</literal> to <literal>166</literal>
- (this is the type used by OpenBSD).</para>
- </step>
-
- <step>
- <para>Bring the <filename>boot1</filename> and
- <filename>boot2</filename> files to the local file
- system.</para>
- </step>
-
- <step>
- <para>Use &man.disklabel.8; to write
- <filename>boot1</filename> and <filename>boot2</filename>
- to your &os; slice.</para>
-
- <screen>&prompt.root; <userinput>disklabel -B -b boot1 -s boot2 ad0s<replaceable>n</replaceable></userinput></screen>
-
- <para><replaceable>n</replaceable> is the number of the
- slice where you installed &os;.</para>
- </step>
-
- <step>
- <para>Reboot. At the boot prompt you will be given the
- option of booting <literal>OpenBSD</literal>. This will
- actually boot &os;.</para>
- </step>
- </procedure>
-
- <para>Getting this to work in the case where you want to dual
- boot OpenBSD and &os; on the same laptop is left as an
- exercise for the reader.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="install-bad-blocks">
- <para>Can I install on a disk with bad blocks?</para>
- </question>
-
- <answer>
- <para>You can, but it is a bad idea.</para>
-
- <para>If you are seeing bad block errors with a modern IDE
- drive, chances are the drive is going to die very soon (the
- drive's internal remapping functions are no longer
- sufficient to fix the bad blocks, which means the disk is
- heavily corrupted); we suggest you buy a new hard
- drive.</para>
-
- <para>If you have a SCSI drive with bad blocks, see <link
- linkend="awre">this answer</link>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="boot-floppy-strangeness">
- <para>Strange things happen when I boot the install floppy!
- What is happening?</para>
+ <question id="bootmanager-restore">
+ <para>Another operating system destroyed my Boot Manager. How
+ do I get it back?</para>
</question>
<answer>
- <para>If you are seeing things like the machine grinding to a
- halt or spontaneously rebooting when you try to boot the
- install floppy, here are three questions to ask
- yourself:</para>
+ <para>This depends on what boot manager you have installed.
+ The &os; boot selection menu (likely what you are using
+ if you end up in this situation) can be reinstalled using
+ &man.boot0cfg.8;. For example, to restore the boot menu
+ onto the disk <replaceable>ada0</replaceable>:</para>
- <orderedlist>
- <listitem>
- <para>Did you use a new, freshly-formatted, error-free
- floppy (preferably a brand-new one straight out of the
- box, as opposed to the magazine cover disk that has been
- lying under the bed for the last three years)?</para>
- </listitem>
+ <screen>&prompt.root; <userinput>boot0cfg -B ada0</userinput></screen>
- <listitem>
- <para>Did you download the floppy image in binary (or
- image) mode? (do not be embarrassed, even the best of us
- have accidentally downloaded a binary file in ASCII mode
- at least once!)</para>
- </listitem>
+ <para>The non-interactive MBR bootloader can be installed using
+ &man.gpart.8;:</para>
- <listitem>
- <para>If you are using &windows;&nbsp;95 or
- &windows;&nbsp;98 did you run <command>fdimage</command>
- or <command>rawrite</command> in pure DOS mode? These
- operating systems can interfere with programs that write
- directly to hardware, which the disk creation program
- does; even running it inside a DOS shell in the GUI can
- cause this problem.</para>
- </listitem>
- </orderedlist>
+ <screen>&prompt.root; <userinput>gpart bootcode -b /boot/mbr ada0</userinput></screen>
- <para>There have also been reports of &netscape; causing
- problems when downloading the boot floppy, so it is probably
- best to use a different FTP client if you can.</para>
+ <para>For more complex situations, including GPT disks, see &man.gpart.8;.</para>
</answer>
</qandaentry>
@@ -1631,174 +1357,6 @@
</qandaentry>
<qandaentry>
- <question id="install-PLIP">
- <para>Can I install on my laptop over PLIP (Parallel Line
- IP)?</para>
- </question>
-
- <answer>
- <para>Yes. Use a standard Laplink cable. If necessary, you
- can check out the <ulink
- url="&url.books.handbook;/network-plip.html">PLIP section of the Handbook</ulink>
- for details on parallel port networking.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="geometry">
- <para>Which geometry should I use for a disk drive?</para>
- </question>
-
- <answer>
- <note>
- <para>By the <quote>geometry</quote> of a disk, we mean
- the number of cylinders, heads and sectors/track on a
- disk. We will refer to this as C/H/S for convenience.
- This is how the PC's BIOS works out which area on a disk
- to read/write from.</para>
- </note>
-
- <para>This causes a lot of confusion among new system
- administrators. First of all, the
- <emphasis>physical</emphasis> geometry of a SCSI drive is
- totally irrelevant, as &os; works in term of disk blocks.
- In fact, there is no such thing as <quote>the</quote>
- physical geometry, as the sector density varies across the
- disk. What manufacturers claim is the <quote>physical
- geometry</quote> is usually the geometry that they have
- determined wastes the least space. For IDE disks, &os; does
- work in terms of C/H/S, but all modern drives internally
- convert this into block references.</para>
-
- <para>All that matters is the <emphasis>logical</emphasis>
- geometry. This is the answer that the BIOS gets when it
- asks the drive <quote>what is your geometry?</quote> It then
- uses this geometry to access the disk. As &os; uses the
- BIOS when booting, it is very important to get this right.
- In particular, if you have more than one operating system on
- a disk, they must all agree on the geometry. Otherwise you
- will have serious problems booting!</para>
-
- <para>For SCSI disks, the geometry to use depends on whether
- extended translation support is turned on in your controller
- (this is often referred to as <quote>support for DOS disks
- &gt;1GB</quote> or something similar). If it is turned off,
- then use <replaceable>N</replaceable> cylinders, 64 heads
- and 32 sectors/track, where <replaceable>N</replaceable> is
- the capacity of the disk in MB. For example, a 2&nbsp;GB disk
- should pretend to have 2048 cylinders, 64 heads and 32
- sectors/track.</para>
-
- <para>If it <emphasis>is</emphasis> turned on (it is often
- supplied this way to get around certain limitations in
- &ms-dos;) and the disk capacity is more than 1&nbsp;GB, use
- <replaceable>M</replaceable> cylinders, 63 sectors per track
- (<emphasis>not</emphasis> 64), and 255 heads, where
- <replaceable>M</replaceable> is the disk capacity in MB
- divided by 7.844238 (!). So our example 2&nbsp;GB drive
- would have 261 cylinders, 63 sectors per track and 255
- heads.</para>
-
- <para>If you are not sure about this, or &os; fails to detect
- the geometry correctly during installation, the simplest way
- around this is usually to create a small DOS partition on
- the disk. The BIOS should then detect the correct geometry,
- and you can always remove the DOS partition in the partition
- editor if you do not want to keep it. You might want to
- leave it around for programming network cards and the like,
- however.</para>
-
- <para>Alternatively, there is a freely available utility
- distributed with &os; called
- <filename>pfdisk.exe</filename>. You can find it in the
- <filename class="directory">tools</filename> subdirectory on
- the &os; CD-ROM or on the various &os; FTP sites. This
- program can be used to work out what geometry the other
- operating systems on the disk are using. You can then enter
- this geometry in the partition editor.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="disk-divide-restrictions">
- <para>Are there any restrictions on how I divide the disk
- up?</para>
- </question>
-
- <answer>
- <para>Yes. You must make sure that your root partition is
- below 1024 cylinders so the BIOS can boot the kernel from it.
- (Note that this is a limitation in the PC's BIOS, not
- &os;).</para>
-
- <para>For a SCSI drive, this will normally imply that the root
- partition will be in the first 1024&nbsp;MB (or in the first
- 4096&nbsp;MB if extended translation is turned on &mdash; see
- previous question). For IDE, the corresponding figure is
- 504&nbsp;MB.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="disk-manager">
- <para>Is &os; compatible with any disk managers?</para>
- </question>
-
- <answer>
- <para>&os; recognizes the <application>Ontrack Disk
- Manager</application> and makes allowances for it. Other disk
- managers are not supported.</para>
-
- <para>If you just want to use the disk with &os; you do not
- need a disk manager. Just configure the disk for as much
- space as the BIOS can deal with (usually
- 504&nbsp;megabytes), and &os; should figure out how much
- space you really have. If you are using an old disk with an
- MFM controller, you may need to explicitly tell &os; how
- many cylinders to use.</para>
-
- <para>If you want to use the disk with &os; and another
- operating system, you may be able to do without a disk
- manager: just make sure the &os; boot partition and the
- slice for the other operating system are in the first 1024
- cylinders. If you are reasonably careful, a
- 20&nbsp;megabyte boot partition should be plenty.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="missing-os">
- <para>When I boot &os; for the first time after install I get
- <errorname>Missing Operating System</errorname>. What is
- happening?</para>
- </question>
-
- <answer>
- <para>This is classically a case of &os; and DOS or some other
- OS conflicting over their ideas of disk <link
- linkend="geometry">geometry</link>. You will have to
- reinstall &os;, but obeying the instructions given above
- will almost always get you going.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="stop-at-boot-manager">
- <para>Why can I not get past the boot manager's
- <prompt>F?</prompt> prompt?</para>
- </question>
-
- <answer>
- <para>This is another symptom of the problem described in the
- preceding question. Your BIOS geometry and &os; geometry
- settings do not agree! If your controller or BIOS supports
- cylinder translation (often marked as <quote>&gt;1GB drive
- support</quote>), try toggling its setting and reinstalling
- &os;.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="need-complete-sources">
<para>Do I need to install the source?</para>
</question>
@@ -1824,8 +1382,8 @@
kernel contains the drivers an ordinary computer will
need. &man.freebsd-update.8;, the &os; binary upgrade
tool, cannot upgrade custom kernels, another reason
- to stick with the GENERIC kernel when possible.
- For computers with very limited RAM, such as
+ to stick with the <literal>GENERIC</literal> kernel when
+ possible. For computers with very limited RAM, such as
embedded systems, it may be worthwhile to build a
smaller custom kernel containing just the required
drivers.</para>
@@ -1861,24 +1419,9 @@
</qandaentry>
<qandaentry>
- <question id="boot-floppy-hangs">
- <para>Why does the boot floppy start, but hang at the
- <literal>Probing Devices...</literal> screen?</para>
- </question>
-
- <answer>
- <para>If you have a IDE &iomegazip; or &jaz; drive installed,
- remove it and try again. The boot floppy can get confused by
- the drives. After the system is installed you can reconnect
- the drive. Hopefully this will be fixed in a later
- release.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="panic-on-install-reboot">
<para>Why do I get a <errorname>panic: can't mount
- root</errorname> error when rebooting the system after
+ root</errorname> error when rebooting the system after
installation?</para>
</question>
@@ -1928,8 +1471,8 @@
</listitem>
<listitem>
- <para>Move the &os; disk onto the primary IDE
- controller, so the hard disks are consecutive.</para>
+ <para>Move the &os; disk onto the primary IDE
+ controller, so the hard disks are consecutive.</para>
</listitem>
</orderedlist>
</answer>
@@ -1944,8 +1487,7 @@
<para>Memory limits depend on the platform used. On a
standard &i386; install, the limit is 4&nbsp;GB but more
memory can be supported through &man.pae.4;. See <link
- linkend="memory-i386-over-4gb">instructions for using 4&nbsp;GB or more memory on &i386;</link>.
- </para>
+ linkend="memory-i386-over-4gb">instructions for using 4&nbsp;GB or more memory on &i386;</link>.</para>
<para>&os;/pc98 has a limit of 4&nbsp;GB memory, and PAE can
not be used with it. Other architectures supported by &os;
@@ -2067,6 +1609,21 @@
shows up before loader is started.</para>
</answer>
</qandaentry>
+
+ <qandaentry>
+ <question id="general-configuration-tool">
+ <para>Is there a tool to perform post-installation
+ configuration tasks?</para>
+ </question>
+
+ <answer>
+ <para>Yes, &rel.head.releng; users can set
+ <varname>WITH_BSDCONFIG</varname> in
+ <filename>/etc/src.conf</filename>. Users of &rel.relx;
+ and higher may also install
+ <filename role="package">sysutils/bsdconfig</filename>.</para>
+ </answer>
+ </qandaentry>
</qandaset>
</chapter>
@@ -2104,13 +1661,7 @@
a particular hardware type.</para>
</answer>
</qandaentry>
- </qandaset>
- </sect1>
-
- <sect1 id="compatibility-memory">
- <title>Memory</title>
- <qandaset>
<qandaentry>
<question id="memory-upper-limitation">
<para>Does &os; support more than 4&nbsp;GB of memory (RAM)?
@@ -2200,18 +1751,18 @@
</question>
<answer>
- <para>Yes. &os; currently runs on the Intel x86 and the
- AMD64 architectures. The Intel EM64T, IA-64, &arm;,
- &powerpc;, and &sparc64; architectures are also
- supported. Upcoming platforms are &mips; and &s390;, join
- the &a.mips; for more information about ongoing work on
- the &mips; platform. For general discussion on new
- architectures, join the &a.platforms;.</para>
-
- <para>If your machine has a different architecture and you
- need something right now, we suggest you look at <ulink
- url="http://www.netbsd.org/">NetBSD</ulink> or <ulink
- url="http://www.openbsd.org/">OpenBSD</ulink>.</para>
+ <para>Yes. &os; divides support into multiple tiers.
+ Tier 1 architectures, such as i386 or amd64; are
+ fully supported. Tiers 2 and 3 are supported on a
+ if-possible basis. A full explanation of the tier
+ system is available in the
+ <ulink
+ url="&url.articles.committers-guide;/archs.html">Committer's Guide.</ulink></para>
+
+ <para>A complete list of supported architectures can be
+ found on the
+ <ulink
+ url="http://www.FreeBSD.org/platforms/">platforms page.</ulink></para>
</answer>
</qandaentry>
@@ -2227,7 +1778,7 @@
motherboard bugs may generate some problems.</para>
<para>&os; will take advantage of HyperThreading (HTT)
- support on Intel CPUs that support this feature. A kernel
+ support on &intel; CPUs that support this feature. A kernel
with the <literal>options SMP</literal> feature enabled
will automatically detect the additional logical
processors.</para>
@@ -2235,6 +1786,25 @@
<para>&man.smp.4; has more details.</para>
</answer>
</qandaentry>
+
+ <qandaentry>
+ <question id="microcode">
+ <para>What is microcode?
+ How do I install &intel; CPU microcode updates?</para>
+ </question>
+
+ <answer>
+ <para>Microcode is a method of programmatically
+ implementating hardware level instructions. This allows
+ for CPU bugs to be fixed without replacing the on board chip.</para>
+
+ <para>Install <filename role="package">sysutils/devcpu-data</filename>,
+ then add:</para>
+ <programlisting>microcode_update_enable="YES"</programlisting>
+
+ <para>to <filename>/etc/rc.conf</filename></para>
+ </answer>
+ </qandaentry>
</qandaset>
</sect1>
@@ -2266,8 +1836,7 @@
<para>See the complete list in the Hardware Notes for &os;
<ulink url="&rel.current.hardware;">&rel.current;</ulink>
or <ulink
- url="&rel2.current.hardware;">&rel2.current;</ulink>.
- </para>
+ url="&rel2.current.hardware;">&rel2.current;</ulink>.</para>
</answer>
</qandaentry>
@@ -2328,7 +1897,7 @@
drive. See &man.burncd.8; for details.</para>
<para>&os; also supports any SCSI CD-R or CD-RW drives.
- Install and use the <command>cdrecord</command> command
+ Install and use <command>cdrecord</command>
from the ports or packages system, and make sure that you
have the <devicename>pass</devicename> device compiled in
your kernel.</para>
@@ -2342,118 +1911,6 @@
<qandaset>
<qandaentry>
- <question id="usbkbd">
- <para>Does &os; support my USB keyboard?</para>
- </question>
-
- <answer>
- <para>&os; supports USB keyboards out-of-the-box. Once you
- have USB keyboard support enabled on your system, the AT
- keyboard becomes <devicename>/dev/kbd0</devicename> and
- the USB keyboard becomes
- <devicename>/dev/kbd1</devicename>, if both are connected
- to the system. If there is the USB keyboard only, it will
- be <devicename>/dev/ukbd0</devicename>.</para>
-
- <para>If you want to use the USB keyboard in the console,
- you have to explicitly tell the console driver to use the
- existing USB keyboard. This can be done by running the
- following command as a part of system
- initialization.</para>
-
- <screen>&prompt.root; <userinput>kbdcontrol -k /dev/kbd1 &lt; /dev/console &gt; /dev/null</userinput></screen>
-
- <para>Note that if the USB keyboard is the only keyboard, it
- is accessed as <devicename>/dev/ukbd0</devicename>, thus,
- the command should look like:</para>
-
- <screen>&prompt.root; <userinput>kbdcontrol -k /dev/ukbd0 &lt; /dev/console &gt; /dev/null</userinput></screen>
-
- <note>
- <para>To make this change permanent across reboots, add
- <literal>keyboard="/dev/ukbd0"</literal> to
- <filename>/etc/rc.conf</filename>.</para>
- </note>
-
- <para>Once this is done, the USB keyboard should work in the
- X environment as well without any special settings.</para>
-
- <para>If you want to switch back to the default keyboard,
- use this command:</para>
-
- <screen>&prompt.root; <userinput>kbdcontrol -k /dev/kbd0 &gt; /dev/null</userinput></screen>
-
- <para>To allow using both the second USB keyboard and the
- first AT keyboard at the same time on a console via
- &man.kbdmux.4; driver type the following commands:</para>
-
- <screen>&prompt.root; <userinput>kbdcontrol -K &lt; /dev/console &gt; /dev/null</userinput>
-&prompt.root; <userinput>kbdcontrol -a atkbd0 &lt; /dev/kbdmux0 &gt; /dev/null</userinput>
-&prompt.root; <userinput>kbdcontrol -a ukbd1 &lt; /dev/kbdmux0 &gt; /dev/null</userinput>
-&prompt.root; <userinput>kbdcontrol -k /dev/kbdmux0 &lt; /dev/console &gt; /dev/null</userinput></screen>
-
- <para>See the &man.ukbd.4;, &man.kbdcontrol.1; and
- &man.kbdmux.4; manual pages for more information.</para>
-
- <note>
- <para>Hot-plugging and unplugging of the USB keyboard may
- not work quite right yet. We recommend connecting the
- keyboard before starting the system and leaving it
- connected until the system is shutdown to avoid
- issues.</para>
- </note>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="busmouse">
- <para>I have an unusual bus mouse. How do I set it
- up?</para>
- </question>
-
- <answer>
- <para>&os; supports the bus mouse and the InPort bus mouse
- from such manufacturers as Microsoft, Logitech and ATI. The
- <filename>GENERIC</filename> kernel does not include the
- device driver. To build a custom kernel with the bus mouse
- driver, add the following line to the kernel config
- file:</para>
-
- <programlisting>device mse0 at isa? port 0x23c irq5</programlisting>
-
- <para>Bus mice usually come with dedicated interface cards.
- These cards may allow you to set the port address and the
- IRQ number other than shown above. Refer to the manual of
- your mouse and the &man.mse.4; manual page for more
- information.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="ps2mouse">
- <para>How do I use my PS/2 (<quote>mouse port</quote> or
- <quote>keyboard</quote>) mouse?</para>
- </question>
-
- <answer>
- <para>The PS/2 mouse is supported out-of-the-box. The
- necessary device driver, <devicename>psm</devicename>, is
- included in the kernel.</para>
-
- <para>If your custom kernel does not have this, add the
- following line to your kernel configuration and compile a
- new kernel.</para>
-
- <programlisting>device psm0 at atkbdc? irq 12</programlisting>
-
- <para>Once the kernel detects <devicename>psm0</devicename>
- correctly at boot time, a device node
- <devicename>psm0</devicename> will be created
- automatically.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="moused">
<para>Is it possible to use a mouse in any way outside the X
Window system?</para>
@@ -2503,10 +1960,14 @@
</question>
<answer>
- <para>Once you get the mouse daemon running (see the <link
- linkend="moused">previous section</link>), hold down the
+ <para>It is not possible to remove data using the mouse.
+ However, it is possible to <quote>copy and
+ paste</quote>.
+ Once you get the mouse daemon running (see the
+ <link linkend="moused">previous question</link>)
+ hold down
button 1 (left button) and move the mouse to select a region
- of text. Then, press the button 2 (middle button) to paste
+ of text. Then, press button 2 (middle button) to paste
it at the text cursor. Pressing button 3 (right button)
will <quote>extend</quote> the selected region of
text.</para>
@@ -2534,20 +1995,7 @@
<para>For the possible usage of wheels in the X Window
environment, refer to <link
- linkend="x-and-wheel">that section</link>.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="laptop-mouse-trackball">
- <para>How do I use the mouse/trackball/touchpad on my
- laptop?</para>
- </question>
-
- <answer>
- <para>Please refer to <link linkend="ps2mouse">the answer to
- the previous question</link>.</para>
+ linkend="x-and-wheel">that section</link>.</para>
</answer>
</qandaentry>
@@ -2573,29 +2021,17 @@ bind ^[[3~ ed-delete-next-char # for xterm</programlisting>
bindkey ^[[3~ delete-char # for xterm</programlisting>
<para>For more information, see <ulink
- url="http://www.ibb.net/~anne/keyboard.html">this page</ulink>.
- </para>
+ url="http://www.ibb.net/~anne/keyboard.html">this page</ulink>.</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
<sect1 id="compatibility-networking">
- <title>Networking and Serial Devices</title>
+ <title>Networking</title>
<qandaset>
<qandaentry>
- <question id="network-cards">
- <para>Which network cards does &os; support?</para>
- </question>
-
- <answer>
- <para>See the Hardware Notes supplied with each release of
- &os; for a more complete list.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="support-broadcom">
<para>Is there a native driver for the Broadcom 43xx
cards?</para>
@@ -2606,38 +2042,6 @@ bindkey ^[[3~ delete-char # for xterm</programlisting>
&man.bwn.4; and &man.bwi.4; drivers.</para>
</answer>
</qandaentry>
-
- <qandaentry>
- <question id="multiport-serial-support">
- <para>Which multi-port serial cards are supported by
- &os;?</para>
- </question>
-
- <answer>
- <para>There is a list of these in the <ulink
- url="&url.books.handbook;/serial.html">Serial Communications</ulink>
- chapter of the handbook.</para>
-
- <para>Some unnamed clone cards have also been known to work,
- especially those that claim to be AST compatible.</para>
-
- <para>Check the &man.sio.4; manual page to get more
- information on configuring such cards.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="serial-console-prompt">
- <para>How do I get the boot: prompt to show on the serial
- console?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/serialconsole-setup.html">this section of the handbook</ulink>.
- </para>
- </answer>
- </qandaentry>
</qandaset>
</sect1>
@@ -2646,30 +2050,6 @@ bindkey ^[[3~ delete-char # for xterm</programlisting>
<qandaset>
<qandaentry>
- <question id="sound-card-support">
- <para>Which sound cards are supported by &os;?</para>
- </question>
-
- <answer>
- <para>&os; supports various sound cards (for more details,
- see <ulink
- url="&url.base;/releases/">&os; Release Information</ulink>
- and the &man.snd.4; manual page). There is also limited
- support for MPU-401 and compatible MIDI cards. Cards
- conforming to the &microsoft; Sound System specification
- are also supported.</para>
-
- <note>
- <para>This is only for sound! This driver does not
- support CD-ROMs, SCSI or joysticks on these cards, except
- for the &soundblaster;. The &soundblaster; SCSI
- interface and some non-SCSI CD-ROMs are supported, but
- you cannot boot off this device.</para>
- </note>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="es1370-silent-pcm">
<para>Workarounds for no sound from my &man.pcm.4; sound
card?</para>
@@ -2697,59 +2077,9 @@ bindkey ^[[3~ delete-char # for xterm</programlisting>
</question>
<answer>
- <para>&os; supports <acronym>APM</acronym> on certain
- machines. Further information can be found in
- &man.apm.4;.</para>
-
- <para>&os; also supports the <acronym>ACPI</acronym>
- features found in most modern hardware. Further
- information can be found in &man.acpi.4;. If a system
- supports both <acronym>APM</acronym> and
- <acronym>ACPI</acronym>, either can be used. We suggest
- you try both and choose the one that best fits your
- needs.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="micron-hang-boot">
- <para>Why does my Micron system hang at boot time?</para>
- </question>
-
- <answer>
- <para>Certain Micron motherboards have a non-conforming PCI
- BIOS implementation that causes grief when &os; boots
- because PCI devices do not get configured at their
- reported addresses.</para>
-
- <para>Disable the <quote>Plug and Play Operating
- System</quote> flag in the BIOS to work around this
- problem.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="asusk7v-boot-failure">
- <para>The boot floppy hangs on a system with an ASUS K7V
- motherboard. How do I fix this?</para>
- </question>
-
- <answer>
- <para>Go into the BIOS setup and disable the <quote>boot
- virus protection</quote>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="micron-3comnic-failure">
- <para>Why does my &tm.3com; PCI network card not work with my
- Micron computer?</para>
- </question>
-
- <answer>
- <para>See <link
- linkend="micron-hang-boot">the previous answer</link>.
- </para>
+ <para>&os; supports the <acronym>ACPI</acronym>
+ features found in modern hardware. Further
+ information can be found in &man.acpi.4;.</para>
</answer>
</qandaentry>
</qandaset>
@@ -2805,142 +2135,6 @@ bindkey ^[[3~ delete-char # for xterm</programlisting>
</qandaentry>
<qandaentry>
- <question id="awre">
- <para>What do I do when I have bad blocks on my hard
- drive?</para>
- </question>
-
- <answer>
- <para>With SCSI drives, the drive should be capable of
- re-mapping these automatically. However, many drives ship
- with this feature disabled.</para>
-
- <para>To enable bad block remapping edit the first device page
- mode, which can be done by giving the command (as
- <username>root</username>)</para>
-
- <screen>&prompt.root; <userinput>camcontrol modepage sd0 -m 1 -e -P 3</userinput></screen>
-
- <para>and changing the values of AWRE and ARRE from 0 to
- 1:</para>
-
- <programlisting>AWRE (Auto Write Reallocation Enbld): 1
-ARRE (Auto Read Reallocation Enbld): 1</programlisting>
-
- <para>Modern IDE drives also have bad block remapping features
- in the controller, and they ship with this feature turned
- on.</para>
-
- <para>If you see warnings about bad blocks (on either type of
- drive), it is time to consider replacing the drive. You
- might be able to use the drive manufacturer's diagnostic
- program to lock out those bad blocks, but at best this will
- buy you some time.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="hpnetserver-scsi-failure">
- <para>Why does &os; not detect my HP Netserver's SCSI
- controller?</para>
- </question>
-
- <answer>
- <para>This is basically a known problem. The EISA on-board
- SCSI controller in the HP Netserver machines occupies EISA
- slot number 11, so all the <quote>true</quote> EISA slots
- are in front of it. Alas, the address space for EISA slots
- &gt;= 10 collides with the address space assigned to PCI,
- and &os;'s auto-configuration currently cannot handle this
- situation very well.</para>
-
- <para>So now, the best you can do is to pretend there is no
- address range clash :), by bumping the kernel option
- <literal>EISA_SLOTS</literal> to a value of 12. Configure
- and compile a kernel, as described in the <ulink
- url="&url.books.handbook;/kernelconfig.html">Handbook entry on configuring the kernel</ulink>.
- </para>
-
- <para>Of course, this does present you with a chicken-and-egg
- problem when installing on such a machine. In order to work
- around this problem, a special hack is available inside
- <emphasis>UserConfig</emphasis>. Do not use the
- <quote>visual</quote> interface, but the plain command-line
- interface there. Simply type the following command at the
- prompt and install your system as usual:</para>
-
- <programlisting>eisa 12
-quit</programlisting>
-
- <para>While it is recommended you compile and install a custom
- kernel anyway.</para>
-
- <para>Hopefully, future versions will have a proper fix for
- this problem.</para>
-
- <note>
- <para>You cannot use a <literal>dangerously
- dedicated</literal> disk with an HP Netserver. See <link
- linkend="dedicate">this note</link> for more info.
- </para>
- </note>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="ed1-timeout">
- <para>I keep seeing messages like <errorname>ed1:
- timeout</errorname>. What do these messages mean?</para>
- </question>
-
- <answer>
- <para>This is usually caused by an interrupt conflict (e.g.,
- two boards using the same IRQ). Boot with the
- <option>-c</option> option and change the
- <devicename>ed0</devicename>/<devicename>de0</devicename>/...
- entry to match your board.</para>
-
- <para>If you are using the BNC connector on your network card,
- you may also see device timeouts because of bad termination.
- To check this, attach a terminator directly to the NIC (with
- no cable) and see if the error messages go away.</para>
-
- <para>Some NE2000 compatible cards will give this error if
- there is no link on the UTP port or if the cable is
- disconnected.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="bad-3c509">
- <para>Why did my &tm.3com; 3C509 card stop working for no
- apparent reason?</para>
- </question>
-
- <answer>
- <para>This card has a bad habit of losing its configuration
- information. Refresh your card's settings with the DOS
- utility <command>3c5x9.exe</command>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="printer-slow">
- <para>My parallel printer is ridiculously slow. What can I
- do?</para>
- </question>
-
- <answer>
- <para>If the only problem is that the printer is terribly
- slow, try changing your <ulink
- url="&url.books.handbook;/printing-intro-setup.html#PRINTING-PARALLEL-PORT-MODE">printer port mode</ulink>
- as discussed in the <ulink
- url="&url.books.handbook;/printing-intro-setup.html">Printer Setup</ulink>
- section of the Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="signal11">
<para>Why do my programs occasionally die with
<errorname>Signal 11</errorname> errors?</para>
@@ -2990,7 +2184,7 @@ quit</programlisting>
<para>What you should do:</para>
- <para>In the first case you can use a debugger e.g.
+ <para>In the first case you can use a debugger e.g.,
&man.gdb.1; to find the point in the program which is
attempting to access a bogus address and then fix it.</para>
@@ -3012,8 +2206,8 @@ quit</programlisting>
on the processor might have died. In either case you
need to ensure that you have hardware running at what it
is specified to run at, at least while trying to solve
- this problem. i.e. Clock it back to the default
- settings.</para>
+ this problem (in other words, clock it back to the default
+ settings.)</para>
<para>If you are overclocking then note that it is far
cheaper to have a slow system than a fried system that
@@ -3064,8 +2258,7 @@ quit</programlisting>
instructions to send a problem report.</para>
<para>There is an extensive FAQ on this at <ulink
- url="http://www.bitwizard.nl/sig11/">the SIG11 problem FAQ</ulink>.
- </para>
+ url="http://www.bitwizard.nl/sig11/">the SIG11 problem FAQ</ulink>.</para>
</answer>
</qandaentry>
@@ -3090,88 +2283,6 @@ quit</programlisting>
</qandaentry>
<qandaentry>
- <question id="screen-loses-sync">
- <para>Why does the screen go black and lose sync when I
- boot?</para>
- </question>
-
- <answer>
- <para>This is a known problem with the ATI&nbsp;Mach64 video
- card. The problem is that this card uses address
- <literal>2e8</literal>, and the fourth serial port does too.
- Due to a bug (feature?) in the &man.sio.4; driver it will
- touch this port even if you do not have the fourth serial
- port, and <emphasis>even</emphasis> if you disable
- <devicename>sio3</devicename> (the fourth port) which
- normally uses this address.</para>
-
- <para>Until the bug has been fixed, you can use this
- workaround:</para>
-
- <orderedlist>
- <listitem>
- <para>Enter <option>-c</option> at the boot prompt.
- (This will put the kernel into configuration
- mode).</para>
- </listitem>
-
- <listitem>
- <para>Disable <devicename>sio0</devicename>,
- <devicename>sio1</devicename>,
- <devicename>sio2</devicename> and
- <devicename>sio3</devicename> (all of them). This way
- the &man.sio.4; driver does not get activated &mdash; no
- problems.</para>
- </listitem>
-
- <listitem>
- <para>Type exit to continue booting.</para>
- </listitem>
- </orderedlist>
-
- <para>If you want to be able to use your serial ports, you
- will have to build a new kernel with the following
- modification: in
- <filename>/usr/src/sys/dev/sio/sio.c</filename> (or in
- <filename>/usr/src/sys/pc98/cbus/sio.c</filename> for pc98)
- find the one occurrence of the string
- <literal>0x2e8</literal> and remove that string and the
- preceding comma (keep the trailing comma). Now follow the
- normal procedure of building a new kernel.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="reallybigram">
- <para>Why does &os; only use 64&nbsp;MB of RAM when my system
- has 128&nbsp;MB of RAM installed?</para>
- </question>
-
- <answer>
- <para>Due to the manner in which &os; gets the memory size
- from the BIOS, it can only detect 16&nbsp;bits worth of
- Kbytes in size (65535&nbsp;Kbytes = 64&nbsp;MB) (or less...
- some BIOSes peg the memory size to 16&nbsp;MB). If you have
- more than 64&nbsp;MB, &os; will attempt to detect it;
- however, the attempt may fail.</para>
-
- <para>To work around this problem, you need to use the kernel
- option specified below. There is a way to get complete
- memory information from the BIOS, but we do not have room in
- the bootblocks to do it. Someday when lack of room in the
- bootblocks is fixed, we will use the extended BIOS functions
- to get the full memory information... but for now we are
- stuck with the kernel option.</para>
-
- <programlisting>options MAXMEM=<replaceable>n</replaceable></programlisting>
-
- <para>Where <replaceable>n</replaceable> is your memory in
- Kilobytes. For a 128&nbsp;MB machine, you would want to use
- <literal>131072</literal>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="kmem-map-too-small">
<para>My system has more than 1&nbsp;GB of RAM, and I'm
getting panics with <errorname>kmem_map too small</errorname>
@@ -3180,7 +2291,7 @@ quit</programlisting>
<answer>
<para>Normally, &os; determines a number of kernel parameters,
- such as as the maximum number of files that can be open
+ such as the maximum number of files that can be open
concurrently, from the amount of memory installed in the
system. On systems with one gigabyte of RAM or more, this
<quote>auto sizing</quote> mechanism may choose values that
@@ -3212,15 +2323,16 @@ quit</programlisting>
memory for network buffers (specifically, mbuf clusters).
You can increase the amount of VM available for mbuf
clusters by following the instructions in the <ulink
- url="&url.books.handbook;/configtuning-kernel-limits.html#NMBCLUSTERS">Network Limits</ulink>
+ url="&url.books.handbook;/configtuning-kernel-limits.html#nmbclusters">Network Limits</ulink>
section of the Handbook.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="proc-table-full">
- <para>Why do I get the error <errorname>kernel: proc: table is
- full</errorname>?</para>
+ <para>Why do I get the error <errorname>maxproc limit
+ exceeded by uid %i, please see tuning(7) and
+ login.conf(5)</errorname>?</para>
</question>
<answer>
@@ -3237,7 +2349,7 @@ quit</programlisting>
<para>To adjust your <varname>kern.maxusers</varname> value,
see the <ulink
- url="&url.books.handbook;/configtuning-kernel-limits.html#KERN-MAXFILES">File/Process Limits</ulink>
+ url="&url.books.handbook;/configtuning-kernel-limits.html#kern-maxfiles">File/Process Limits</ulink>
section of the Handbook. (While that section refers to open
files, the same limits apply to processes.)</para>
@@ -3247,77 +2359,13 @@ quit</programlisting>
this tunable needs adjustment it needs to be defined in
<filename>/boot/loader.conf</filename>. The tunable will
not get adjusted until the system is rebooted. For more
- information about tuning tunables, you should see the
- &man.loader.conf.5; and &man.sysctl.conf.5; manual pages.
+ information about tuning tunables, see
+ &man.loader.conf.5;.
If these processes are being run by a single user, you will
also need to adjust <varname>kern.maxprocperuid</varname> to
be one less than your new <varname>kern.maxproc</varname>
value. (It must be at least one less because one system
program, &man.init.8;, must always be running.)</para>
-
- <para>To make a sysctl change permanent place the proper value
- in <filename>/etc/sysctl.conf</filename>. More information
- about system tuning with &man.sysctl.8; can be found at the
- <ulink
- url="&url.books.handbook;/configtuning-sysctl.html">Tuning with sysctl</ulink>
- section of the Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="cmap-busy-panic">
- <para>Why do I get an error reading <errorname>CMAP
- busy</errorname> when rebooting with a new kernel?</para>
- </question>
-
- <answer>
- <para>The logic that attempts to detect an out of date
- <filename>/var/db/kvm_*.db</filename> files sometimes fails
- and using a mismatched file can sometimes lead to
- panics.</para>
-
- <para>If this happens, reboot single-user and do:</para>
-
- <screen>&prompt.root; <userinput>rm /var/db/kvm_*.db</userinput></screen>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="brkadrint-illegal-host-access">
- <para>What does the message <errorname>ahc0: brkadrint,
- Illegal Host Access at seqaddr 0x0</errorname> mean?</para>
- </question>
-
- <answer>
- <para>This is a conflict with an Ultrastor SCSI Host
- Adapter.</para>
-
- <para>During the boot process enter the kernel configuration
- menu and disable <devicename>uha0</devicename>, which is
- causing the problem.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="aci0-illegal-cable">
- <para>When I boot my system, I get the error <errorname>ahc0:
- illegal cable configuration</errorname>. My cabling is
- correct. What is going on?</para>
- </question>
-
- <answer>
- <para>Your motherboard lacks the external logic to support
- automatic termination. Switch your SCSI BIOS to specify the
- correct termination for your configuration rather than
- automatic termination. The &man.ahc.4; driver cannot
- determine if the external logic for cable detection (and
- thus auto-termination) is available. The driver simply
- assumes that this support must exist if the configuration
- contained in the serial EEPROM is set to <quote>automatic
- termination</quote>. Without the external cable detection
- logic the driver will often configure termination
- incorrectly, which can compromise the reliability of the
- SCSI bus.</para>
</answer>
</qandaentry>
@@ -3331,8 +2379,7 @@ quit</programlisting>
<answer>
<para>You can find a detailed answer for this question in the
<ulink
- url="&url.books.handbook;/mail-trouble.html#Q26.5.2.">Handbook</ulink>.
- </para>
+ url="&url.books.handbook;/mail-trouble.html#q26.5.2.">Handbook</ulink>.</para>
</answer>
</qandaentry>
@@ -3392,174 +2439,6 @@ quit</programlisting>
</qandaentry>
<qandaentry>
- <question id="pnp-not-found">
- <para>Why is my PnP card not found (or found as
- <literal>unknown</literal>)?</para>
- </question>
-
- <answer>
- <para>The reasons for this behavior are explained by the
- following email, posted to the &a.questions; by &a.peter;, in
- answer to a question about an internal modem that was no
- longer found after an upgrade to
- &os;&nbsp;4.<replaceable>X</replaceable> (the comments in
- <literal>[]</literal> have been added to clarify the
- context).</para>
-
- <note>
- <para>The contents of this quotation has been updated from
- its original text.</para>
- </note>
-
- <blockquote>
- <para>The PNP bios preconfigured it [the modem] and left it
- laying around in port space, so [in
- 3.<replaceable>X</replaceable>] the old-style ISA probes
- <quote>found</quote> it there.</para>
-
- <para>Under 4.0, the ISA code is much more PnP-centric. It
- was possible [in 3.<replaceable>X</replaceable>] for an ISA
- probe to find a <quote>stray</quote> device and then for
- the PNP device ID to match and then fail due to resource
- conflicts. So, it disables the programmable cards first
- so this double probing cannot happen. It also means that
- it needs to know the PnP IDs for supported PnP hardware.
- Making this more user tweakable is on the TODO
- list.</para>
- </blockquote>
-
- <para>To get the device working again requires finding its PnP
- ID and adding it to the list that the ISA probes use to
- identify PnP devices. This is obtained using
- &man.pnpinfo.8; to probe the device, for example this is the
- output from &man.pnpinfo.8; for an internal modem:</para>
-
- <screen>&prompt.root; <userinput>pnpinfo</userinput>
-Checking for Plug-n-Play devices...
-
-Card assigned CSN #1
-Vendor ID PMC2430 (0x3024a341), Serial Number 0xffffffff
-PnP Version 1.0, Vendor Version 0
-Device Description: Pace 56 Voice Internal Plug &amp; Play Modem
-
-Logical Device ID: PMC2430 0x3024a341 #0
- Device supports I/O Range Check
-TAG Start DF
- I/O Range 0x3f8 .. 0x3f8, alignment 0x8, len 0x8
- [16-bit addr]
- IRQ: 4 - only one type (true/edge)</screen>
-
- <para>[more TAG lines elided]</para>
-
- <screen>TAG End DF
-End Tag
-
-Successfully got 31 resources, 1 logical fdevs
--- card select # 0x0001
-
-CSN PMC2430 (0x3024a341), Serial Number 0xffffffff
-
-Logical device #0
-IO: 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8
-IRQ 5 0
-DMA 4 0
-IO range check 0x00 activate 0x01</screen>
-
- <para>The information you require is in the <literal>Vendor
- ID</literal> line at the start of the output. The
- hexadecimal number in parentheses
- (<literal>0x3024a341</literal> in this example) is the PnP
- ID and the string immediately before this
- (<literal>PMC2430</literal>) is a unique ASCII ID.</para>
-
- <para>Alternatively, if &man.pnpinfo.8; does not list the card
- in question, &man.pciconf.8; can be used instead. This is
- part of the output from <command>pciconf -vl</command> for
- an onboard sound chip:</para>
-
- <screen>&prompt.root; <userinput>pciconf -vl</userinput>
-chip1@pci0:31:5: class=0x040100 card=0x00931028 chip=0x24158086 rev=0x02 hdr=0x00
- vendor = 'Intel Corporation'
- device = '82801AA 8xx Chipset AC'97 Audio Controller'
- class = multimedia
- subclass = audio</screen>
-
- <para>Here, you would use the <varname>chip</varname> value,
- <literal>0x24158086</literal>.</para>
-
- <para>This information (<literal>Vendor ID</literal> or
- <varname>chip</varname> value) needs adding to the file
- <filename>/usr/src/sys/dev/sio/sio_isa.c</filename>.</para>
-
- <para>You should first make a backup of
- <filename>sio_isa.c</filename> just in case things go wrong.
- You will also need it to make the patch to submit with your
- PR (you are going to submit a PR, are you not?) then edit
- <filename>sio_isa.c</filename> and search for the
- line:</para>
-
- <programlisting>static struct isa_pnp_id sio_ids[] = {</programlisting>
-
- <para>Then scroll down to find the correct place to add the
- entry for your device. The entries look like this, and are
- sorted on the ASCII Vendor ID string which should be
- included in the comment to the right of the line of code
- along with all (if it will fit) or part of the
- <emphasis>Device Description</emphasis> from the output of
- &man.pnpinfo.8;:</para>
-
- <programlisting>{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
-{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
-{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
-{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
-{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */</programlisting>
-
- <para>Add the hexadecimal Vendor ID for your device in the
- correct place, save the file, rebuild your kernel, and
- reboot. Your device should now be found as an
- <devicename>sio</devicename> device.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="nlist-failed">
- <para>Why do I get the error <errorname>nlist
- failed</errorname> when running, for example,
- <command>top</command> or <command>systat</command>?</para>
- </question>
-
- <answer>
- <para>The problem is that the application you are trying to
- run is looking for a specific kernel symbol, but, for whatever
- reason, cannot find it; this error stems from one of two
- problems:</para>
-
- <itemizedlist>
- <listitem>
- <para>Your kernel and userland are not synchronized (i.e.,
- you built a new kernel but did not do an
- <maketarget>installworld</maketarget>, or vice versa),
- and thus the symbol table is different from what the
- user application thinks it is. If this is the case,
- simply complete the upgrade process (see
- <filename>/usr/src/UPDATING</filename> for the correct
- sequence).</para>
- </listitem>
-
- <listitem>
- <para>You are not using <command>/boot/loader</command> to
- load your kernel, but doing it directly from
- <filename>boot2</filename> (see &man.boot.8;). While
- there is nothing wrong with bypassing
- <command>/boot/loader</command>, it generally does a
- better job of making the kernel symbols available to
- user applications.</para>
- </listitem>
- </itemizedlist>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="connection-delay">
<para>Why does it take so long to connect to my computer via
<command>ssh</command> or <command>telnet</command>?</para>
@@ -3576,7 +2455,7 @@ chip1@pci0:31:5: class=0x040100 card=0x00931028 chip=0x24158086 rev=0x02
address into a hostname. Many servers, including the
<application>Telnet</application> and
<application>SSH</application> servers that come with &os;,
- do this in order to, among other things, store the hostname
+ do this to store the hostname
in a log file for future reference by the
administrator.</para>
@@ -3608,9 +2487,9 @@ chip1@pci0:31:5: class=0x040100 card=0x00931028 chip=0x24158086 rev=0x02
<filename>/etc/resolv.conf</filename>. This will often
cause a delay in <application>SSH</application>, as the
option <literal>UseDNS</literal> is set to
- <literal>yes</literal> by default in the
- <filename>sshd_config</filename> file in
- <filename class="directory">/etc/ssh</filename>. If this is causing the
+ <literal>yes</literal> by default in
+ <filename>/etc/ssh/sshd_config</filename>.
+ If this is causing the
problem, you will either need to fill in the missing
information in <filename>/etc/resolv.conf</filename> or set
<literal>UseDNS</literal> to <literal>no</literal> in
@@ -3620,46 +2499,6 @@ chip1@pci0:31:5: class=0x040100 card=0x00931028 chip=0x24158086 rev=0x02
</qandaentry>
<qandaentry>
- <question id="stray-irq">
- <para>What does <errorname>stray IRQ</errorname> mean?</para>
- </question>
-
- <answer>
- <para>Stray IRQs are indications of hardware IRQ glitches,
- mostly from hardware that removes its interrupt request in
- the middle of the interrupt request acknowledge
- cycle.</para>
-
- <para>One has three options for dealing with this:</para>
-
- <itemizedlist>
- <listitem>
- <para>Live with the warnings. All except the first 5 per
- irq are suppressed anyway.</para>
- </listitem>
-
- <listitem>
- <para>Break the warnings by changing the value of
- <varname>MAX_STRAY_LOG</varname> from
- <literal>5</literal> to <literal>0</literal> in your
- platform's (e.g. &i386;)
- <filename>intr_machdep.c</filename> file and rebuild the
- new kernel and all the warnings will be
- suppressed.</para>
- </listitem>
-
- <listitem>
- <para>Break the warnings by installing parallel port
- hardware that uses IRQ&nbsp;7 and the PPP driver for it
- (this happens on most systems), and install an ide drive
- or other hardware that uses IRQ&nbsp;15 and a suitable
- driver for it.</para>
- </listitem>
- </itemizedlist>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="file-table-full">
<para>Why does <errorname>file: table is full</errorname> show
up repeatedly in &man.dmesg.8;?</para>
@@ -3669,7 +2508,7 @@ chip1@pci0:31:5: class=0x040100 card=0x00931028 chip=0x24158086 rev=0x02
<para>This error message indicates you have exhausted the
number of available file descriptors on your system. Please
see the <ulink
- url="&url.books.handbook;/configtuning-kernel-limits.html#KERN-MAXFILES">kern.maxfiles</ulink>
+ url="&url.books.handbook;/configtuning-kernel-limits.html#kern-maxfiles">kern.maxfiles</ulink>
section of the <ulink
url="&url.books.handbook;/configtuning-kernel-limits.html">Tuning Kernel Limits</ulink>
section of the Handbook for a discussion and
@@ -3678,37 +2517,6 @@ chip1@pci0:31:5: class=0x040100 card=0x00931028 chip=0x24158086 rev=0x02
</qandaentry>
<qandaentry>
- <question id="calcru-negative-runtime">
- <para>Why are <errorname>calcru: negative runtime</errorname>
- or <errorname>calcru: runtime went backwards</errorname>
- messages pounding the console?</para>
- </question>
-
- <answer>
- <para>There is a known problem when enabling &intel; Enhanced
- SpeedStep from the BIOS: it causes the kernel to start printing
- <errorname>calcru</errorname> messages like this:</para>
-
- <screen>calcru: runtime went backwards from 6 usec to 3 usec for pid 37 (pagezero)
-calcru: runtime went backwards from 6 usec to 3 usec for pid 36 (vmdaemon)
-calcru: runtime went backwards from 170 usec to 138 usec for pid 35 (pagedaemon)
-calcru: runtime went backwards from 553 usec to 291 usec for pid 15 (swi6: task queue)
-calcru: runtime went backwards from 15521 usec to 10366 usec for pid 2 (g_event)
-calcru: runtime went backwards from 25 usec to 12 usec for pid 11 (swi1: net)
-calcru: runtime went backwards from 4417 usec to 3960 usec for pid 1 (init)
-calcru: runtime went backwards from 2084385 usec to 1793542 usec for pid 1 (init)
-calcru: runtime went backwards from 408 usec to 204 usec for pid 0 (swapper)</screen>
-
- <para>It is because &intel; SpeedStep (EIST) is incompatible
- with some motherboards.</para>
-
- <para>Workaround: Disable the EIST feature in the BIOS. You
- can still achieve ACPI-based processor frequency throttling
- by using &man.powerd.8;.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="computer-clock-skew">
<para>Why does the clock on my computer keep incorrect time?</para>
</question>
@@ -3750,7 +2558,7 @@ kern.timecounter.hardware: ACPI-fast</screen>
<varname>kern.timecounter.hardware</varname>
&man.sysctl.3;.</para>
- <screen>&prompt.root; <userinput>sysctl -w kern.timecounter.hardware=i8254</userinput>
+ <screen>&prompt.root; <userinput>sysctl kern.timecounter.hardware=i8254</userinput>
kern.timecounter.hardware: TSC -&gt; i8254</screen>
<para>Your computer should now start keeping more accurate
@@ -3765,80 +2573,6 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
</qandaentry>
<qandaentry>
- <question id="null-null">
- <para>Why did my laptop fail to correctly probe PC
- cards?</para>
- </question>
-
- <answer>
- <para>This problem is common on laptops that boot more than
- one operating system. Some non-BSD operating systems leave
- PC card hardware in an inconsistent state. &man.pccardd.8;
- will detect the card as
- <errorname>"(null)""(null)"</errorname> instead of its
- actual model.</para>
-
- <para>You must remove all power from the PC card slot to fully
- reset the hardware. Completely power off the laptop. (Do
- not suspend it, do not let it go into standby; the power
- needs to be completely off.) Wait a few moments, and reboot.
- Your PC card should work now.</para>
-
- <para>Some laptop hardware lies when it claims to be off. If
- the above does not work shut down, remove the battery, wait
- a moment, replace the battery, and reboot.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="boot-read-error">
- <para>Why does &os;'s boot loader display <errorname>Read
- error</errorname> and stop after the BIOS screen?</para>
- </question>
-
- <answer>
- <para>&os;'s boot loader is incorrectly recognizing the hard
- drive's geometry. This must be manually set within
- &man.fdisk.8; when creating or modifying &os;'s
- slice.</para>
-
- <para>The correct drive geometry values can be found within
- the machine's BIOS. Look for the number of cylinders, heads
- and sectors for the particular drive.</para>
-
- <para>Within &man.sysinstall.8;'s fdisk, hit
- <keycap>G</keycap> to set the drive geometry.</para>
-
- <para>A dialog will pop up requesting the number of cylinders,
- heads and sectors. Type the numbers found from the BIOS
- separated by forward slashes. For example, values of 5000
- cylinders, 250 heads, and 60 sectors would be entered as
- <userinput>5000/250/60</userinput>.</para>
-
- <para>Press <keycap>Enter</keycap> to set the values, and hit
- <keycap>W</keycap> to write the new partition table to the
- drive.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="bootmanager-restore">
- <para>Another operating system destroyed my Boot Manager. How
- do I get it back?</para>
- </question>
-
- <answer>
- <para>Enter &man.sysinstall.8; and choose
- <guimenuitem>Configure</guimenuitem>, then
- <guimenuitem>Fdisk</guimenuitem>. Select the disk the Boot
- Manager resided on with the <keycap>Space</keycap> key.
- Press <keycap>W</keycap> to write changes to the drive. A
- prompt will appear asking which boot loader to install.
- Select this, and it will be restored.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="indefinite-wait-buffer">
<para>What does the error <errorname>swap_pager: indefinite
wait buffer:</errorname> mean?</para>
@@ -3858,41 +2592,6 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
</qandaentry>
<qandaentry>
- <question id="udma-icrc">
- <para>What are <errorname>UDMA ICRC</errorname> errors, and
- how do I fix them?</para>
- </question>
-
- <answer>
- <para>The &man.ata.4; driver reports <errorname>UDMA
- ICRC</errorname> errors when a DMA transfer to or from a drive
- is corrupted. The driver will retry the operation a few
- times. Should the retries fail, it will switch from DMA to
- the slower PIO mode of communication with the device.</para>
-
- <para>The problem can be caused by many factors, although
- perhaps the most common cause is faulty or incorrect
- cabling. Check that the ATA cables are undamaged and rated
- for the Ultra&nbsp;DMA mode in use. If you are using
- removable drive trays, they must also be compatible. Be
- sure that all connections are making good contact. Problems
- have also been noticed when an old drive is installed on the
- same ATA channel as an Ultra&nbsp;DMA&nbsp;66 (or faster)
- drive. Lastly, these errors can indicate that the drive is
- failing. Most drive vendors provide testing software for
- their drives, so test your drive, and, if necessary, back up
- your data and replace it.</para>
-
- <para>The &man.atacontrol.8; utility can be used to show and
- select the DMA or PIO modes used for each ATA device. In
- particular, <command>atacontrol mode
- <replaceable>channel</replaceable></command> will show the
- modes in use on a particular ATA channel, where the primary
- channel is numbered 0, and so on.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="lock-order-reversal">
<para>What is a <errorname>lock order
reversal</errorname>?</para>
@@ -3901,8 +2600,7 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<answer>
<para>An answer for this question can be found in the &os;
Glossary, see <ulink
- url="&url.books.handbook;/freebsd-glossary.html#LOR-GLOSSARY">LOR</ulink>.
- </para>
+ url="&url.books.handbook;/freebsd-glossary.html#lor-glossary">LOR</ulink>.</para>
</answer>
</qandaentry>
@@ -3936,6 +2634,9 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
unfortunate timing they could cause undesirable effects
ranging from a minor blip in the system's responsiveness to
a complete system lockup.</para>
+
+ <para>For additional information about locking in &os; see
+ &man.locking.9;.</para>
</answer>
</qandaentry>
@@ -3959,195 +2660,6 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
</qandaset>
</chapter>
- <chapter id="commercial">
- <title>Commercial Applications</title>
-
- <note>
- <para>This section is still very sparse, though we are hoping, of
- course, that companies will add to it! :) The &os; group has no
- financial interest in any of the companies listed here but
- simply lists them as a public service (and feels that commercial
- interest in &os; can have very positive effects on &os;'s
- long-term viability). We encourage commercial software vendors
- to send their entries here for inclusion. See <ulink
- url="&url.base;/commercial/index.html">the Vendors page</ulink>
- for a longer list.</para>
- </note>
-
- <qandaset>
- <qandaentry>
- <question id="officesuite">
- <para>Where can I get an Office Suite for &os;?</para>
- </question>
-
- <answer>
- <para>The open-source <application><ulink
- url="http://www.openoffice.org">OpenOffice.org</ulink></application>
- and <application><ulink
- url="http://www.libreoffice.org">LibreOffice</ulink></application>
- office suites work natively on &os;. The &linux; version of
- <application><ulink
- url="http://www.oracle.com/us/products/applications/open-office/index.html">Oracle Open Office</ulink></application>,
- the value-added closed-source version of OpenOffice.org,
- also works on &os;.</para>
-
- <para>&os; also includes a variety of text editors,
- spreadsheets, and drawing programs in the Ports
- Collection.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="motif">
- <para>Where can I get <application>&motif;</application> for
- &os;?</para>
- </question>
-
- <answer>
- <para>The Open Group has released the source code to
- <application>&motif;</application>. You can
- install the <filename
- role="package">x11-toolkits/open-motif</filename> package,
- or compile it from ports. Refer to <ulink
- url="&url.books.handbook;/ports.html">the ports section of the Handbook</ulink>
- for more information on how to do this.</para>
-
- <note>
- <para>The <application>Open&nbsp;&motif;</application>
- distribution only allows redistribution if it is running
- on an <ulink
- url="http://www.opensource.org/">open source</ulink>
- operating system.</para>
- </note>
-
- <para>In addition, there are commercial distributions of the
- <application>&motif;</application> software available. These,
- however, are not for free, but their license allows them to
- be used in closed-source software. Contact <link
- linkend="apps2go">Apps2go</link> for the least expensive ELF
- <application>&motif;&nbsp;2.1.20</application> distribution
- for &os; (&i386;).<anchor id="apps2go"/></para>
-
- <para>There are two distributions, the <quote>development
- edition</quote> and the <quote>runtime edition</quote> (for
- much less). These distributions includes:</para>
-
- <itemizedlist>
- <listitem>
- <para><application>OSF/&motif; manager</application>,
- <application>xmbind</application>,
- <application>panner</application>,
- <application>wsm</application>.</para>
- </listitem>
-
- <listitem>
- <para>Development kit with uil, mrm, xm, xmcxx, include
- and <application>Imake</application> files.</para>
- </listitem>
-
- <listitem>
- <para>Static and dynamic ELF libraries.</para>
- </listitem>
-
- <listitem>
- <para>Demonstration applets.</para>
- </listitem>
- </itemizedlist>
-
- <para>Be sure to specify that you want the &os; version of
- <application>&motif;</application> when ordering (do not
- forget to mention the architecture you want too)! Versions
- for NetBSD and OpenBSD are also sold by
- <emphasis>Apps2go</emphasis>. This is currently a FTP only
- download.</para>
-
- <variablelist>
- <varlistentry>
- <term>More info</term>
-
- <listitem>
- <para><ulink url="http://www.apps2go.com/"> Apps2go
- WWW page</ulink></para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>or</term>
-
- <listitem>
- <para><email>sales@apps2go.com</email> or
- <email>support@apps2go.com</email></para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>or</term>
-
- <listitem>
- <para>phone (817)&nbsp;431&nbsp;8775 or
- +1&nbsp;817&nbsp;431-8775</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="cde">
- <para>Where can I get <application>CDE</application> for
- &os;?</para>
- </question>
-
- <answer>
- <para><emphasis>Xi Graphics</emphasis> used to sell
- <application>CDE</application> for &os;, but no longer
- do.</para>
-
- <para><ulink
- url="http://www.kde.org/"><application>KDE</application></ulink>
- is an open source X11 desktop which is similar to
- <application>CDE</application> in many respects. You might
- also like the look and feel of <ulink
- url="http://www.xfce.org/"><application>xfce</application></ulink>.
- <application>KDE</application> and
- <application>xfce</application> are both in the <ulink
- url="&url.base;/ports/index.html">ports system</ulink>.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="database-systems">
- <para>Are there any Database systems for &os;?</para>
- </question>
-
- <answer>
- <para>Yes! See the <ulink
- url="&url.base;/commercial/software_bycat.html#CATEGORY_DATABASE">Commercial Vendors</ulink>
- section of &os;'s Web site.</para>
-
- <para>Also see the <ulink
- url="&url.base;/ports/databases.html">Databases</ulink>
- section of the Ports Collection.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="oracle-support">
- <para>Can I run <application>&oracle;</application> on
- &os;?</para>
- </question>
-
- <answer>
- <para>Yes. Instructions on how to set up &linux;
- <application>&oracle;</application> on &os; can be found
- under <ulink
- url="http://www.shadowcom.net/freebsd-oracle9i/">http://www.shadowcom.net/freebsd-oracle9i/</ulink>.</para>
- </answer>
- </qandaentry>
- </qandaset>
- </chapter>
-
<chapter id="applications">
<title>User Applications</title>
@@ -4179,10 +2691,8 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
can be installed and uninstalled again easily without having
to know the gory details of which files it includes.</para>
- <para>Use the <guimenuitem>Packages</guimenuitem> package
- installation menu in &man.sysinstall.8; (under the
- <guimenuitem>Configure</guimenuitem> menu item) or invoke
- the &man.pkg.add.1; command on the specific package files
+ <para>Use
+ &man.pkg.add.1; on the specific package files
you are interested in installing. Package files can usually
be identified by their <filename>.tbz</filename> suffix and
CD-ROM distribution people will have a
@@ -4197,8 +2707,7 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<listitem>
<para><ulink
- url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel3.packages;/">ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel3.packages;</ulink>
- </para>
+ url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel3.packages;/">ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel3.packages;</ulink></para>
</listitem>
</varlistentry>
@@ -4207,8 +2716,7 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<listitem>
<para><ulink
- url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel2.packages;/">ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel2.packages;</ulink>
- </para>
+ url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel2.packages;/">ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel2.packages;</ulink></para>
</listitem>
</varlistentry>
@@ -4217,8 +2725,7 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<listitem>
<para><ulink
- url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel.packages;/">ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel.packages;</ulink>
- </para>
+ url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel.packages;/">ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/&rel.packages;</ulink></para>
</listitem>
</varlistentry>
</variablelist>
@@ -4235,17 +2742,31 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
</qandaentry>
<qandaentry>
- <question id="configure-inn">
- <para>How do I configure INN (Internet News) for my
- machine?</para>
+ <question id="how-do-download-ports-tree">
+ <para>How do I download the Ports tree? Should I be using
+ SVN?</para>
</question>
<answer>
- <para>After installing the <filename
- role="package">news/inn</filename> package or port, an
- excellent place to start are the <ulink
- url="http://www.eyrie.org/~eagle/faqs/inn.html">INN
- FAQ</ulink>.</para>
+ <para>Any of the methods listed here work:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Use portsnap for most use cases.</para>
+ </listitem>
+ <listitem>
+ <para>Use SVN directly if you need custom patches
+ to the ports tree.</para>
+ </listitem>
+ <listitem>
+ <para>Use CTM if you prefer getting patches
+ by email (this is a rarer use case).</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Any other method should be considered a
+ legacy method. If you do not already use them,
+ do not start.</para>
</answer>
</qandaentry>
@@ -4256,8 +2777,7 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<answer>
<para>Yes. Please see <ulink
- url="&url.base;/java/index.html">http://www.FreeBSD.org/java/</ulink>.
- </para>
+ url="&url.base;/java/index.html">http://www.FreeBSD.org/java/</ulink>.</para>
</answer>
</qandaentry>
@@ -4294,38 +2814,12 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
</question>
<answer>
- <para>First, always make sure that you have a completely
+ <para>First, always make sure that you have a complete
up-to-date Ports Collection. Errors that affect building
<filename>INDEX</filename> from an up-to-date copy of the
Ports Collection are high-visibility and are thus almost
always fixed immediately.</para>
- <para>However, if you are up-to-date, perhaps you are seeing
- another problem. <command>make <maketarget>index</maketarget></command>
- has a known bug in dealing with incomplete copies of the
- Ports Collection. It assumes that you have a local copy of
- every single port that every other port that you have a
- local copy of depends on. To explain, if you have a copy of
- <filename>foo/bar</filename> on your disk, and
- <filename>foo/bar</filename> depends on
- <filename>baz/quux</filename>, then you must also have a
- copy of <filename>baz/quux</filename> on your disk, and the
- ports <filename>baz/quux</filename> depends on, and so on.
- Otherwise, <command>make <maketarget>index</maketarget></command>
- has insufficient information to create its dependency
- tree.</para>
-
- <para>This is particularly a problem for &os; users who
- utilize &man.csup.1; to track the Ports
- Collection but choose not to install certain categories by
- specifying them in <filename>refuse</filename>. In theory,
- one should be able to refuse categories, but in practice
- there are too many ports that depend on ports in other
- categories. Until someone comes up with a solution for this
- problem, the general rule is that if you want to build
- <filename>INDEX</filename>, you must have a complete copy of
- the Ports Collection.</para>
-
<para>There are rare cases where <filename>INDEX</filename>
will not build due to odd cases involving
<makevar>WITH_<replaceable>*</replaceable></makevar> or
@@ -4373,7 +2867,7 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
fail to function properly.</para>
<para>For more information, see <ulink
- url="&url.books.handbook;/updating-upgrading-freebsdupdate.html#FREEBSDUPDATE-UPGRADE">the section on upgrades</ulink>
+ url="&url.books.handbook;/updating-upgrading-freebsdupdate.html#freebsdupdate-upgrade">the section on upgrades</ulink>
in the &os; Handbook.</para>
</answer>
</qandaentry>
@@ -4395,36 +2889,35 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<qandaentry>
<question id="minimal-sh">
- <para>Why is <command>/bin/sh</command> so minimal? Why does
- &os; not use <command>bash</command> or another
+ <para>Why is <command>/bin/sh</command> so minimal? Why
+ does &os; not use <command>bash</command> or another
shell?</para>
</question>
<answer>
- <para>Because &posix; says that there shall be such a
- shell.</para>
-
- <para>The more complicated answer: many people need to write
- shell scripts which will be portable across many systems.
- That is why &posix; specifies the shell and utility commands
- in great detail. Most scripts are written in Bourne shell,
- and because several important programming interfaces
- (&man.make.1;, &man.system.3;, &man.popen.3;, and analogues
- in higher-level scripting languages like Perl and Tcl) are
- specified to use the Bourne shell to interpret commands.
- Because the Bourne shell is so often and widely used, it is
- important for it to be quick to start, be deterministic in
- its behavior, and have a small memory footprint.</para>
+ <para>Many people need to write shell scripts which will be
+ portable across many systems. That is why &posix;
+ specifies the shell and utility commands in great detail.
+ Most scripts are written in Bourne shell (&man.sh.1;), and
+ because several important programming interfaces
+ (&man.make.1;, &man.system.3;, &man.popen.3;, and
+ analogues in higher-level scripting languages like Perl
+ and Tcl) are specified to use the Bourne shell to
+ interpret commands. Because the Bourne shell is so often
+ and widely used, it is important for it to be quick to
+ start, be deterministic in its behavior, and have a small
+ memory footprint.</para>
<para>The existing implementation is our best effort at
meeting as many of these requirements simultaneously as we
- can. In order to keep <command>/bin/sh</command> small, we
- have not provided many of the convenience features that
- other shells have. That is why the Ports Collection
- includes more featureful shells like
+ can. To keep <command>/bin/sh</command> small,
+ we have not provided many of the convenience features that
+ other shells have. That is why other more
+ featureful shells like
<command>bash</command>, <command>scsh</command>,
- <command>tcsh</command>, and <command>zsh</command>. (You
- can compare for yourself the memory utilization of all these
+ &man.tcsh.1;, and <command>zsh</command> are available.
+ (You can
+ compare for yourself the memory utilization of all these
shells by looking at the <quote>VSZ</quote> and
<quote>RSS</quote> columns in a <command>ps
<option>-u</option></command> listing.)</para>
@@ -4432,63 +2925,79 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
</qandaentry>
<qandaentry>
- <question id="netscape-slow-startup">
- <para>Why do <application>&netscape;</application> and
- <application>Opera</application> take so long to start?</para>
+ <question id="midi-sound-files">
+ <para>How do I create audio CDs from my MIDI files?</para>
</question>
<answer>
- <para>The usual answer is that DNS on your system is
- misconfigured. Both <application>&netscape;</application>
- and <application>Opera</application> perform DNS checks when
- starting up. The browser will not appear on your desktop
- until the program either gets a response or determines that
- the system has no network connection.</para>
+ <para>To create audio CDs from MIDI files, first install
+ <filename role="package">audio/timidity++</filename> from
+ ports then install manually the GUS patches set by Eric A.
+ Welsh, available at <ulink
+ url="http://alleg.sourceforge.net/digmid.html"></ulink>.
+ After <application>TiMidity++</application> has been installed
+ properly, MIDI files may be converted to WAV files with the
+ following command line:</para>
+
+ <screen>&prompt.user; <userinput>timidity -Ow -s 44100 -o <replaceable>/tmp/juke/01.wav</replaceable> <replaceable>01.mid</replaceable></userinput></screen>
+
+ <para>The WAV files can then be converted to other formats or
+ burned onto audio CDs, as described in the <ulink
+ url="&url.books.handbook;/creating-cds.html">&os; Handbook</ulink>.</para>
</answer>
</qandaentry>
<qandaentry>
- <question id="ports-base-update">
- <para>I updated parts of the Ports Collection using
- <application>CVSup</application>, and now many ports fail to
- build with mysterious error messages! What happened? Is
- the Ports Collection broken in some major way?</para>
+ <question id="officesuite">
+ <para>Where can I get an Office Suite for &os;?</para>
</question>
<answer>
- <para>If you only update parts of the Ports Collection, using
- one of its <application>CVSup</application> subcollections
- and not the <literal>ports-all</literal>
- <application>CVSup</application> collection, you should
- <emphasis>always</emphasis> update the
- <literal>ports-base</literal> subcollection too! The
- reasons are described <ulink
- url="&url.books.handbook;/cvsup.html#CVSUP-COLLEC-PBASE-WARN">in the Handbook</ulink>.
- </para>
+ <para>The open-source <application><ulink
+ url="http://www.openoffice.org">Apache OpenOffice</ulink></application>
+ and <application><ulink
+ url="http://www.libreoffice.org">LibreOffice</ulink></application>
+ office suites work natively on &os;.</para>
+
+ <para>&os; also includes a variety of text editors,
+ spreadsheets, and drawing programs in the Ports
+ Collection.</para>
</answer>
</qandaentry>
<qandaentry>
- <question id="midi-sound-files">
- <para>How do I create audio CDs from my MIDI files?</para>
+ <question id="database-systems">
+ <para>Are there any Database systems for &os;?</para>
</question>
<answer>
- <para>To create audio CDs from MIDI files, first install
- <filename role="package">audio/timidity++</filename> from
- ports then install manually the GUS patches set by Eric A.
- Welsh, available at <ulink
- url="http://alleg.sourceforge.net/digmid.html"></ulink>.
- After <application>TiMidity++</application> has been installed
- properly, MIDI files may be converted to WAV files with the
- following command line:</para>
+ <para>Yes! See the <ulink
+ url="&url.base;/commercial/software_bycat.html#category_database">Commercial Vendors</ulink>
+ section of &os;'s Web site.</para>
- <screen>&prompt.user; <userinput>timidity -Ow -s 44100 -o <replaceable>/tmp/juke/01.wav</replaceable> <replaceable>01.mid</replaceable></userinput></screen>
+ <para>Also see the <ulink
+ url="&url.base;/ports/databases.html">Databases</ulink>
+ section of the Ports Collection.</para>
+ </answer>
+ </qandaentry>
- <para>The WAV files can then be converted to other formats or
- burned onto audio CDs, as described in the <ulink
- url="&url.books.handbook;/creating-cds.html">&os; Handbook</ulink>.
- </para>
+ <qandaentry>
+ <question id="convert-back-from-pkgng">
+ <para>How can I convert from pkgng to the old package
+ tools?</para>
+ </question>
+
+ <answer>
+ <para>Short answer: it is not possible.</para>
+
+ <para>Longer answer: if you have made any changes using
+ <command>pkg</command> converting back is non-trivial and
+ requires lots of manual editing of internal package
+ database files. However, if you have just run
+ <command>pkg2ng</command> then you may remove
+ <filename>/var/db/pkg/local.sqlite</filename>
+ and extract
+ <filename>/var/backups/pkgdb.bak.tbz</filename>.</para>
</answer>
</qandaentry>
</qandaset>
@@ -4506,8 +3015,7 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<answer>
<para>Not at all! Check out the <ulink
- url="&url.books.handbook;/kernelconfig.html">kernel config section of the Handbook</ulink>.
- </para>
+ url="&url.books.handbook;/kernelconfig.html">kernel config section of the Handbook</ulink>.</para>
<note>
<para>The new <filename>kernel</filename> will be installed
@@ -4522,45 +3030,35 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
</qandaentry>
<qandaentry>
- <question id="missing-hw-float">
- <para>My kernel compiles fail because
- <literal>_hw_float</literal> is missing. How do I solve
- this problem?</para>
+ <question id="why-kernel-big">
+ <para>Why is my kernel so big?</para>
</question>
<answer>
- <para>You probably removed <devicename>npx0</devicename> (see
- &man.npx.4;) from your kernel configuration file because you
- do not have a math co-processor. The
- <devicename>npx0</devicename> device is
- <emphasis>MANDATORY</emphasis>. Somewhere inside your
- hardware lies a device that provides hardware floating-point
- support, even if it is no longer a separate device as used
- in the good old 386 days. You <emphasis>must</emphasis>
- include the <devicename>npx0</devicename> device. Even if
- you manage to build a kernel without
- <devicename>npx0</devicename> support, it will not boot
- anyway.</para>
- </answer>
- </qandaentry>
+ <para><literal>GENERIC</literal> kernels shipped with &os;
+ and later are compiled in <emphasis>debug mode</emphasis>.
+ Kernels built in debug mode
+ contain many symbols in separate files that are used for
+ debugging, thus greatly increasing the size of
+ <filename class="directory">/boot/kernel/</filename>.
+ Note that there will be little or no performance loss
+ from running a debug kernel, and it is useful to keep one
+ around in case of a system panic.</para>
- <qandaentry>
- <question id="why-kernel-big">
- <para>Why is my kernel so big (over 10&nbsp;MB)?</para>
- </question>
+ <para>However, if you are running low on disk space, there
+ are different options to reduce the size of <filename
+ class="directory">/boot/kernel/</filename>.</para>
- <answer>
- <para>Chances are, you compiled your kernel in <emphasis>debug
- mode</emphasis>. Kernels built in debug mode contain many
- symbols that are used for debugging, thus greatly increasing
- the size of the kernel. Note that there will be little or
- no performance decrease from running a debug kernel, and it
- is useful to keep one around in case of a system
- panic.</para>
+ <para>If you do not want the symbol files to be installed,
+ make sure you have the following line present in
+ <filename>/etc/src.conf</filename>:</para>
- <para>However, if you are running low on disk space, or you
- simply do not want to run a debug kernel, make sure that
- both of the following are true:</para>
+ <programlisting>WITHOUT_KERNEL_SYMBOLS=yes</programlisting>
+
+ <para>For more information see &man.src.conf.5;.</para>
+
+ <para>If you do not want to build a debug kernel, make
+ sure that both of the following are true:</para>
<itemizedlist>
<listitem>
@@ -4578,36 +3076,31 @@ kern.timecounter.hardware: TSC -&gt; i8254</screen>
<para>Either of the above settings will cause your kernel to
be built in debug mode. As long as you make sure you follow
- the steps above, you can build your kernel normally, and you
- should notice a fairly large size decrease; most kernels
- tend to be around 1.5&nbsp;MB to 2&nbsp;MB.</para>
- </answer>
- </qandaentry>
+ the steps above, you can build your kernel normally.</para>
- <qandaentry>
- <question id="multiport-serial-interrupts">
- <para>Why do I get interrupt conflicts with multi-port serial
- code?</para>
- </question>
+ <para>If you want only the modules you use to be built
+ and installed, make sure you have a line like below in
+ <filename>/etc/make.conf</filename>:</para>
- <answer>
- <para>When I compile a kernel with multi-port serial code, it
- tells me that only the first port is probed and the rest
- skipped due to interrupt conflicts. How do I fix
- this?</para>
+ <programlisting>MODULES_OVERRIDE= <replaceable>accf_http ipfw</replaceable></programlisting>
+
+ <para>Replace <emphasis>accf_httpd ipfw</emphasis> with
+ a list of modules you need. Only these modules will be
+ built. This does not only reduce the size of the kernel
+ directory but also decreases the amount of time needed to
+ build your kernel. For more information see
+ <filename>/usr/share/examples/etc/make.conf</filename>.</para>
- <para>The problem here is that &os; has code built-in to keep
- the kernel from getting trashed due to hardware or software
- conflicts. The way to fix this is to leave out the IRQ
- settings on all but one port. Here is an example:</para>
+ <para>You can also remove unneeded devices from your kernel
+ to further reduce the size. See
+ <xref linkend="make-kernel"/> for more information.</para>
- <programlisting>#
-# Multiport high-speed serial line - 16550 UARTS
-#
-device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr
-device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr
-device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr
-device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr</programlisting>
+ <para>To put any of these options into effect you will have
+ to <ulink url="&url.books.handbook;/kernelconfig-building.html">build and install</ulink>
+ your new kernel.</para>
+
+ <para>Most kernels (<filename>/boot/kernel/kernel</filename>)
+ tend to be around 12&nbsp;MB to 16&nbsp;MB.</para>
</answer>
</qandaentry>
@@ -4630,8 +3123,8 @@ device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr</programlisting>
used to build the currently running system (e.g., you
are compiling &rel.current;-RELEASE on a
&rel2.current;-RELEASE system). If you are attempting
- an upgrade, please read the
- <filename>/usr/src/UPDATING</filename> file, paying
+ an upgrade, please read
+ <filename>/usr/src/UPDATING</filename>, paying
particular attention to the <quote>COMMON ITEMS</quote>
section at the end.</para>
</listitem>
@@ -4673,27 +3166,12 @@ device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr</programlisting>
</question>
<answer>
- <para>Check for the existence of the
- <varname>kern.sched.quantum</varname> sysctl. If you have
- it, you should see something like this:</para>
-
- <screen>&prompt.user; sysctl <replaceable>kern.sched.quantum</replaceable>
-kern.sched.quantum: 99960</screen>
-
- <para>If the <varname>kern.sched.quantum</varname> sysctl
- exists, you are using the 4BSD scheduler (&man.sched.4bsd.4;).
- If not, you will get an error printed by &man.sysctl.8;
- (which you can safely ignore):</para>
-
- <screen>&prompt.user; sysctl <replaceable>kern.sched.quantum</replaceable>
-sysctl: unknown oid 'kern.sched.quantum'</screen>
-
<para>The name of the scheduler currently being used is
directly available as the value of the
<varname>kern.sched.name</varname> sysctl:</para>
<screen>&prompt.user; sysctl <replaceable>kern.sched.name</replaceable>
-kern.sched.name: 4BSD</screen>
+kern.sched.name: ULE</screen>
</answer>
</qandaentry>
@@ -4704,10 +3182,8 @@ kern.sched.name: 4BSD</screen>
<answer>
<para><varname>kern.sched.quantum</varname> is the maximum
- number of ticks a process can run without being preempted. It
- is specific to the 4BSD scheduler, so you can use its
- presence or absence to determine which scheduler is in
- use.</para>
+ number of ticks a process can run without being preempted
+ in the 4BSD scheduler.</para>
</answer>
</qandaentry>
</qandaset>
@@ -4745,10 +3221,9 @@ kern.sched.name: 4BSD</screen>
paragraph to find out how to move the data after doing
this.</para>
- <para>Should you decide not to do a fresh install, you need to
- partition and label the new disk with either
- &man.sysinstall.8;, or &man.fdisk.8; and &man.disklabel.8;.
- You should also install booteasy on both disks with
+ <para>Alternatively, partition and label the new disk with either
+ &man.sade.8; or &man.gpart.8;. If the disks are MBR-formatted,
+ you can also install booteasy on both disks with
&man.boot0cfg.8;, so that you can dual boot to the old or
new system after the copying is done.</para>
@@ -4790,12 +3265,12 @@ kern.sched.name: 4BSD</screen>
</procedure>
<para>For example, if you are going to move root to
- <devicename>/dev/<replaceable>ad1s1a</replaceable></devicename>,
+ <devicename>/dev/<replaceable>ada1s1a</replaceable></devicename>,
with <filename class="directory"><replaceable>/mnt</replaceable></filename> as
the temporary mount point, it is:</para>
- <screen>&prompt.root; <userinput>newfs /dev/<replaceable>ad1s1a</replaceable></userinput>
-&prompt.root; <userinput>mount /dev/<replaceable>ad1s1a</replaceable> <replaceable>/mnt</replaceable></userinput>
+ <screen>&prompt.root; <userinput>newfs /dev/<replaceable>ada1s1a</replaceable></userinput>
+&prompt.root; <userinput>mount /dev/<replaceable>ada1s1a</replaceable> <replaceable>/mnt</replaceable></userinput>
&prompt.root; <userinput>cd <replaceable>/mnt</replaceable></userinput>
&prompt.root; <userinput>dump 0af - / | restore rf -</userinput></screen>
@@ -4806,8 +3281,8 @@ kern.sched.name: 4BSD</screen>
as described above, then move the child partition into the
empty directory that the first move created:</para>
- <screen>&prompt.root; <userinput>newfs /dev/<replaceable>ad1s1a</replaceable></userinput>
-&prompt.root; <userinput>mount /dev/<replaceable>ad1s1a</replaceable> <replaceable>/mnt</replaceable></userinput>
+ <screen>&prompt.root; <userinput>newfs /dev/<replaceable>ada1s1a</replaceable></userinput>
+&prompt.root; <userinput>mount /dev/<replaceable>ada1s1a</replaceable> <replaceable>/mnt</replaceable></userinput>
&prompt.root; <userinput>cd <replaceable>/mnt</replaceable></userinput>
&prompt.root; <userinput>dump 0af - / | restore rf -</userinput>
&prompt.root; <userinput>cd var</userinput>
@@ -4819,11 +3294,11 @@ kern.sched.name: 4BSD</screen>
partition on the appropriate directory in the temporary
mount point, then move the old single partition:</para>
- <screen>&prompt.root; <userinput>newfs /dev/<replaceable>ad1s1a</replaceable></userinput>
-&prompt.root; <userinput>newfs /dev/<replaceable>ad1s1d</replaceable></userinput>
-&prompt.root; <userinput>mount /dev/<replaceable>ad1s1a</replaceable> <replaceable>/mnt</replaceable></userinput>
+ <screen>&prompt.root; <userinput>newfs /dev/<replaceable>ada1s1a</replaceable></userinput>
+&prompt.root; <userinput>newfs /dev/<replaceable>ada1s1d</replaceable></userinput>
+&prompt.root; <userinput>mount /dev/<replaceable>ada1s1a</replaceable> <replaceable>/mnt</replaceable></userinput>
&prompt.root; <userinput>mkdir <replaceable>/mnt</replaceable>/var</userinput>
-&prompt.root; <userinput>mount /dev/<replaceable>ad1s1d</replaceable> <replaceable>/mnt</replaceable>/var</userinput>
+&prompt.root; <userinput>mount /dev/<replaceable>ada1s1d</replaceable> <replaceable>/mnt</replaceable>/var</userinput>
&prompt.root; <userinput>cd <replaceable>/mnt</replaceable></userinput>
&prompt.root; <userinput>dump 0af - / | restore rf -</userinput></screen>
@@ -4835,134 +3310,28 @@ kern.sched.name: 4BSD</screen>
</qandaentry>
<qandaentry>
- <question id="dangerously-dedicated">
- <para>Will a <quote>dangerously dedicated</quote> disk
- endanger my health?</para>
- </question>
-
- <answer>
- <para><anchor id="dedicate"/>The installation procedure allows
- you to chose two different methods in partitioning your hard
- disk(s). The default way makes it compatible with other
- operating systems on the same machine, by using
- &man.fdisk.8; table entries (called <quote>slices</quote> in
- &os;), with a &os; slice that employs partitions of its own.
- Optionally, one can chose to install a boot-selector to
- switch between the possible operating systems on the
- disk(s). The alternative uses the entire disk for &os;, and
- makes no attempt to be compatible with other operating
- systems.</para>
-
- <para>So why it is called <quote>dangerous</quote>? A disk in
- this mode does not contain what normal PC utilities would
- consider a valid &man.fdisk.8; table. Depending on how well
- they have been designed, they might complain at you once
- they are getting in contact with such a disk, or even worse,
- they might damage the BSD bootstrap without even asking or
- notifying you. In addition, the <quote>dangerously
- dedicated</quote> disk's layout is known to confuse many
- BIOSes, including those from AWARD (e.g. as found in HP
- Netserver and Micronics systems as well as many others) and
- Symbios/NCR (for the popular 53C8xx range of SCSI
- controllers). This is not a complete list, there are more.
- Symptoms of this confusion include the <errorname>read
- error</errorname> message printed by the &os; bootstrap when
- it cannot find itself, as well as system lockups when
- booting.</para>
-
- <para>Why have this mode at all then? It only saves a few
- kbytes of disk space, and it can cause real problems for a new
- installation. <quote>Dangerously dedicated</quote> mode's
- origins lie in a desire to avoid one of the most common
- problems plaguing new &os; installers &mdash; matching the
- BIOS <quote>geometry</quote> numbers for a disk to the disk
- itself.</para>
-
- <para><quote>Geometry</quote> is an outdated concept, but one
- still at the heart of the PC's BIOS and its interaction with
- disks. When the &os; installer creates slices, it has to
- record the location of these slices on the disk in a fashion
- that corresponds with the way the BIOS expects to find them.
- If it gets it wrong, you will not be able to boot.</para>
-
- <para><quote>Dangerously dedicated</quote> mode tries to work
- around this by making the problem simpler. In some cases,
- it gets it right. But it is meant to be used as a
- last-ditch alternative &mdash; there are better ways to
- solve the problem 99 times out of 100.</para>
-
- <para>So, how do you avoid the need for <quote>DD</quote> mode
- when you are installing? Start by making a note of the
- geometry that your BIOS claims to be using for your disks.
- You can arrange to have the kernel print this as it boots by
- specifying <option>-v</option> at the
- <literal>boot:</literal> prompt, or using
- <command>boot -v</command> in the loader. Just before the
- installer starts, the kernel will print a list of BIOS
- geometries. Do not panic &mdash; wait for the installer to
- start and then use scrollback to read the numbers.
- Typically the BIOS disk units will be in the same order that
- &os; lists your disks, first IDE, then SCSI.</para>
-
- <para>When you are slicing up your disk, check that the disk
- geometry displayed in the FDISK screen is correct (ie. it
- matches the BIOS numbers); if it is wrong, use the
- <keycap>G</keycap> key to fix it. You may have to do this
- if there is absolutely nothing on the disk, or if the disk
- has been moved from another system. Note that this is only
- an issue with the disk that you are going to boot from; &os;
- will sort itself out just fine with any other disks you may
- have.</para>
-
- <para>Once you have got the BIOS and &os; agreeing about the
- geometry of the disk, your problems are almost guaranteed to
- be over, and with no need for <quote>DD</quote> mode at all.
- If, however, you are still greeted with the dreaded
- <errorname>read error</errorname> message when you try to
- boot, it is time to cross your fingers and go for it &mdash; there
- is nothing left to lose.</para>
-
- <para>To return a <quote>dangerously dedicated</quote> disk
- for normal PC use, there are basically two options. The
- first is, you write enough NULL bytes over the MBR to make
- any subsequent installation believe this to be a blank disk.
- You can do this for example with the following
- command:</para>
-
- <screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/<replaceable>rda0</replaceable> count=15</userinput></screen>
-
- <para>Alternatively, the undocumented DOS
- <quote>feature</quote></para>
-
- <screen><prompt>C:\&gt;</prompt> <userinput>fdisk /mbr</userinput></screen>
-
- <para>will to install a new master boot record as well, thus
- clobbering the BSD bootstrap.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="safe-softupdates">
<para>Which partitions can safely use Soft Updates? I have
heard that Soft Updates on <filename class="directory">/</filename> can cause
- problems.</para>
+ problems. What about Journaled Soft Updates?</para>
</question>
<answer>
<para>Short answer: you can usually use Soft Updates safely on
all partitions.</para>
- <para>Long answer: There used to be some concern over using
- Soft Updates on the root partition. Soft Updates has two
- characteristics that caused this. First, a Soft Updates
+ <para>Long answer: Soft Updates has two
+ characteristics that may be undesirable on certain
+ paritions. First, a Soft Updates
partition has a small chance of losing data during a system
crash. (The partition will not be corrupted; the data will
- simply be lost.) Also, Soft Updates can cause temporary
+ simply be lost.) Second, Soft Updates can cause temporary
space shortages.</para>
<para>When using Soft Updates, the kernel can take up to
- thirty seconds to actually write changes to the physical
- disk. If you delete a large file, the file still resides on
+ thirty seconds to write changes to the physical
+ disk. When a large file is deleted the file still
+ resides on
disk until the kernel actually performs the deletion. This
can cause a very simple race condition. Suppose you delete
one large file and immediately create another large file.
@@ -4978,20 +3347,14 @@ kern.sched.name: 4BSD</screen>
<para>If a system should crash after the kernel accepts a
chunk of data for writing to disk, but before that data is
- actually written out, data could be lost or corrupted. This
- risk is extremely small, but generally manageable. Use of
- IDE write caching greatly increases this risk; it is
- strongly recommended that you disable IDE write caching when
- using Soft Updates.</para>
+ actually written out, data could be lost. This
+ risk is extremely small, but generally manageable.</para>
<para>These issues affect all partitions using Soft Updates.
So, what does this mean for the root partition?</para>
<para>Vital information on the root partition changes very
- rarely. Files such as
- <filename>/boot/kernel/kernel</filename> and the contents of
- <filename class="directory">/etc</filename> only change during system
- maintenance, or when users change their passwords. If the
+ rarely. If the
system crashed during the thirty-second window after such a
change is made, it is possible that data could be lost.
This risk is negligible for most applications, but you
@@ -5007,6 +3370,10 @@ kern.sched.name: 4BSD</screen>
problems. Symlinking <filename class="directory">/tmp</filename> to
<filename class="directory">/var/tmp</filename> will solve this
problem.</para>
+
+ <para>Finally, &man.dump.8; does not work in live mode (-L)
+ on a filesystem, with Journaled Soft Updates
+ (<acronym>SU+J</acronym>).</para>
</answer>
</qandaentry>
@@ -5095,11 +3462,10 @@ use "disklabel -r" to install initial label</screen>
<term>NTFS</term>
<listitem>
- <para>&os; includes a read-only NTFS driver. For more
- information, see &man.mount.ntfs.8;. A port of <ulink
- url="http://www.tuxera.com/community/"><application>ntfs-3g</application></ulink>
- supports write operations on NTFS (see <filename
- role="package">sysutils/fusefs-ntfs</filename>).</para>
+ <para>FUSE based NTFS support is available as a port
+ (<filename role="package">sysutils/fusefs-ntfs</filename>).
+ For more information see <ulink
+ url="http://www.tuxera.com/community/ntfs-3g-manual/"><application>ntfs-3g</application></ulink>.</para>
</listitem>
</varlistentry>
@@ -5175,7 +3541,7 @@ use "disklabel -r" to install initial label</screen>
DOS/&windowsnt; partition. Assuming you name that file
something like <filename>c:\bootsect.bsd</filename>
(inspired by <filename>c:\bootsect.dos</filename>), you can
- then edit the <filename>c:\boot.ini</filename> file to come
+ then edit <filename>c:\boot.ini</filename> to come
up with something like this:</para>
<programlisting>[boot loader]
@@ -5280,12 +3646,11 @@ C:\="DOS"</programlisting>
following to your configuration file
<filename>/boot/grub/menu.lst</filename> (or
<filename>/boot/grub/grub.conf</filename> in some systems,
- e.g. Red Hat Linux and its derivatives).</para>
+ e.g., Red Hat Linux and its derivatives).</para>
<programlisting>title &os; 6.1
root <replaceable>(hd0,a)</replaceable>
- kernel /boot/loader
- </programlisting>
+ kernel /boot/loader</programlisting>
<para>Where <replaceable>hd0,a</replaceable> points to your
root partition on the first disk. If you need to specify
@@ -5335,69 +3700,38 @@ C:\="DOS"</programlisting>
</question>
<answer>
- <para>Whether it is a removable drive like a &iomegazip; or an
- EZ drive (or even a floppy, if you want to use it that way),
- or a new hard disk, once it is installed and recognized by
- the system, and you have your cartridge/floppy/whatever
- slotted in, things are pretty much the same for all
- devices.</para>
-
- <para>(this section is based on <ulink
- url="http://www.vmunix.com/mark/FreeBSD/ZIP-FAQ.html">Mark Mayo's ZIP FAQ</ulink>)
- </para>
+ <para>If the drive already has a
+ file system on it, you can use a command like this:</para>
- <para>If it is a ZIP drive or a floppy, you have already got a
- DOS file system on it, you can use a command like this:</para>
+ <screen>&prompt.root; <userinput>mount -t msdosfs /dev/da0s1 /mnt</userinput></screen>
- <screen>&prompt.root; <userinput>mount -t msdosfs /dev/fd0c /floppy</userinput></screen>
+ <para>If the drive will only be used with &os;
+ systems it is better idea to
+ stick a BSD file system on it, like UFS or ZFS.
+ You will get long filename
+ support, at least a 2X improvement in performance,
+ and a lot more stability. If the drive will be
+ used by other operating systems a more portable
+ choice, such as msdosfs, is better.</para>
- <para>if it is a floppy, or this:</para>
+ <screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da0 count=2</userinput>
+&prompt.root; <userinput>gpart create -s GPT /dev/da0</userinput>
+&prompt.root; <userinput>gpart add -t freebsd-ufs /dev/da0</userinput></screen>
- <screen>&prompt.root; <userinput>mount -t msdosfs /dev/da2s4 /zip</userinput></screen>
+ <para>Finally, create a new file system:</para>
- <para>for a ZIP disk with the factory configuration.</para>
-
- <para>For other disks, see how they are laid out using
- &man.fdisk.8; or &man.sysinstall.8;.</para>
-
- <para>The rest of the examples will be for a ZIP drive on
- <devicename>da2</devicename>, the third SCSI disk.</para>
-
- <para>Unless it is a floppy, or a removable you plan on
- sharing with other people, it is probably a better idea to
- stick a BSD file system on it. You will get long filename
- support, at least a 2X improvement in performance, and a lot
- more stability. First, you need to redo the DOS-level
- partitions/file systems. You can either use &man.fdisk.8;
- or &man.sysinstall.8;, or for a small drive that you do not
- want to bother with multiple operating system support on,
- just blow away the whole FAT partition table (slices) and
- just use the BSD partitioning:</para>
-
- <screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda2 count=2</userinput>
-&prompt.root; <userinput>disklabel -Brw da2 auto</userinput></screen>
-
- <para>You can use &man.disklabel.8; or &man.sysinstall.8; to
- create multiple BSD partitions. You will certainly want to
- do this if you are adding swap space on a fixed disk, but it
- is probably irrelevant on a removable drive like a
- ZIP.</para>
-
- <para>Finally, create a new file system, this one is on our
- ZIP drive using the whole disk:</para>
-
- <screen>&prompt.root; <userinput>newfs /dev/rda2c</userinput></screen>
+ <screen>&prompt.root; <userinput>newfs /dev/da0p1</userinput></screen>
<para>and mount it:</para>
- <screen>&prompt.root; <userinput>mount /dev/da2c /zip</userinput></screen>
+ <screen>&prompt.root; <userinput>mount /dev/da0s1 /mnt</userinput></screen>
- <para>and it is probably a good idea to add a line like this
+ <para>It is a good idea to add a line
to <filename>/etc/fstab</filename> (see &man.fstab.5;) so
- you can just type <command>mount /zip</command> in the
+ you can just type <command>mount /mnt</command> in the
future:</para>
- <programlisting>/dev/da2c /zip ffs rw,noauto 0 0</programlisting>
+ <programlisting>/dev/da0p1 /mnt ufs rw,noauto 0 0</programlisting>
</answer>
</qandaentry>
@@ -5412,8 +3746,7 @@ C:\="DOS"</programlisting>
that you want to mount. This is described in the <ulink
url="&url.books.handbook;/creating-cds.html"> Handbook section on optical media</ulink>,
specifically the section <ulink
- url="&url.books.handbook;/creating-cds.html#MOUNTING-CD">Using Data CDs</ulink>.
- </para>
+ url="&url.books.handbook;/creating-cds.html#mounting-cd">Using Data CDs</ulink>.</para>
</answer>
</qandaentry>
@@ -5427,7 +3760,7 @@ C:\="DOS"</programlisting>
<para>This generally means that there is no CD-ROM in the
CD-ROM drive, or the drive is not visible on the bus.
Please see the <ulink
- url="&url.books.handbook;/creating-cds.html#MOUNTING-CD">Using Data CDs</ulink>
+ url="&url.books.handbook;/creating-cds.html#mounting-cd">Using Data CDs</ulink>
section of the Handbook for a detailed discussion of this
issue.</para>
</answer>
@@ -5446,8 +3779,7 @@ C:\="DOS"</programlisting>
<ulink
url="&url.books.handbook;/creating-cds.html">creating and using CD-ROMs</ulink>,
specifically the section on <ulink
- url="&url.books.handbook;/creating-cds.html#MOUNTING-CD">Using Data CD-ROMs</ulink>.
- </para>
+ url="&url.books.handbook;/creating-cds.html#mounting-cd">Using Data CD-ROMs</ulink>.</para>
</answer>
</qandaentry>
@@ -5463,8 +3795,7 @@ C:\="DOS"</programlisting>
the <ulink
url="&url.books.handbook;/creating-cds.html">Handbook chapter on creating CD-ROMs</ulink>,
particularly the section on <ulink
- url="&url.books.handbook;/creating-cds.html#RAWDATA-CD">burning raw data CDs</ulink>.
- </para>
+ url="&url.books.handbook;/creating-cds.html#rawdata-cd">burning raw data CDs</ulink>.</para>
</answer>
</qandaentry>
@@ -5475,7 +3806,7 @@ C:\="DOS"</programlisting>
<answer>
<para>This is discussed in the Handbook section on <ulink
- url="&url.books.handbook;/creating-cds.html#IMAGING-CD">duplicating data CDs</ulink>.
+ url="&url.books.handbook;/creating-cds.html#imaging-cd">duplicating data CDs</ulink>.
For more on working with CD-ROMs, see the <ulink
url="&url.books.handbook;/creating-cds.html">Creating CDs Section</ulink>
in the Storage chapter in the Handbook.</para>
@@ -5516,85 +3847,39 @@ C:\="DOS"</programlisting>
<qandaentry>
<question id="user-floppymount">
- <para>How do I let ordinary users mount floppies, CD-ROMs and
- other removable media?</para>
+ <para>How do I let ordinary users mount CD-ROMs, DVDs,
+ USB drives, and other removable media?</para>
</question>
<answer>
- <para>Ordinary users can be permitted to mount devices. Here
- is how:</para>
-
- <procedure>
- <step>
- <para>As <username>root</username> set the sysctl variable
- <varname>vfs.usermount</varname> to
- <literal>1</literal>.</para>
+ <para>As <username>root</username> set the sysctl variable
+ <varname>vfs.usermount</varname> to
+ <literal>1</literal>.</para>
- <screen>&prompt.root; <userinput>sysctl -w vfs.usermount=1</userinput></screen>
- </step>
-
- <step>
- <para>As <username>root</username> assign the appropriate
- permissions to the block device associated with the
- removable media.</para>
-
- <para>For example, to allow users to mount the first
- floppy drive, use:</para>
-
- <screen>&prompt.root; <userinput>chmod 666 /dev/fd0</userinput></screen>
+ <screen>&prompt.root; <userinput>sysctl vfs.usermount=1</userinput></screen>
- <para>To allow users in the group
- <groupname>operator</groupname> to mount the CD-ROM
- drive, use:</para>
-
- <screen>&prompt.root; <userinput>chgrp operator /dev/acd0c</userinput>
-&prompt.root; <userinput>chmod 640 /dev/acd0c</userinput></screen>
- </step>
-
- <step>
- <para>You will need to alter
- <filename>/etc/devfs.conf</filename> to make these
- changes permanent across reboots.</para>
-
- <para>As <username>root</username>, add the necessary
- lines to <filename>/etc/devfs.conf</filename>. For
- example, to allow users to mount the first floppy drive
- add:</para>
-
- <programlisting># Allow all users to mount the floppy disk.
-own /dev/fd0 root:operator
-perm /dev/fd0 0666</programlisting>
-
- <para>To allow users in the group
- <groupname>operator</groupname> to mount the CD-ROM drive
- add:</para>
-
- <programlisting># Allow members of the group operator to mount CD-ROMs.
-own /dev/acd0 root:operator
-perm /dev/acd0 0660</programlisting>
- </step>
+ <para>To make this persist across reboots, add the line
+ <literal><varname>vfs.usermount</varname>=1</literal> to
+ <filename>/etc/sysctl.conf</filename> so that
+ it is reset at system boot time.</para>
- <step>
- <para>Finally, add the line
- <literal><varname>vfs.usermount</varname>=1</literal> to
- the file <filename>/etc/sysctl.conf</filename> so that
- it is reset at system boot time.</para>
- </step>
- </procedure>
+ <para>Users can only mount devices they have read
+ permissions to. To allow users to mount a device
+ permissions must be set in
+ <filename>/etc/devfs.conf</filename>.</para>
- <para>All users can now mount the floppy
- <devicename>/dev/fd0</devicename> onto a directory that they
- own:</para>
+ <para>For example, to allow users to mount the first USB
+ drive add:</para>
- <screen>&prompt.user; <userinput>mkdir <replaceable>~/my-mount-point</replaceable></userinput>
-&prompt.user; <userinput>mount -t msdosfs /dev/fd0 <replaceable>~/my-mount-point</replaceable></userinput></screen>
+ <programlisting># Allow all users to mount a USB drive.
+ own /dev/da0 root:operator
+ perm /dev/da00 0666</programlisting>
- <para>Users in group <groupname>operator</groupname> can now
- mount the CD-ROM <devicename>/dev/acd0c</devicename> onto a
- directory that they own:</para>
+ <para>All users can now mount devices they could read
+ onto a directory that they own:</para>
<screen>&prompt.user; <userinput>mkdir <replaceable>~/my-mount-point</replaceable></userinput>
-&prompt.user; <userinput>mount -t cd9660 /dev/acd0c <replaceable>~/my-mount-point</replaceable></userinput></screen>
+&prompt.user; <userinput>mount -t msdosfs /dev/da0<replaceable>~/my-mount-point</replaceable></userinput></screen>
<para>Unmounting the device is simple:</para>
@@ -5717,11 +4002,164 @@ perm /dev/acd0 0660</programlisting>
<literal>Avail</literal> columns, usually by a factor of
8%.</para>
- <para>For more details, look up the <option>-m</option> option
+ <para>For more details, look up <option>-m</option>
in &man.tunefs.8;.</para>
</answer>
</qandaentry>
</qandaset>
+
+ <sect1 id="all-about-zfs">
+ <title>ZFS</title>
+
+ <qandaset>
+ <qandaentry>
+ <question id="how-much-ram-for-zfs">
+ <para>What is the minimum amount of RAM one should have to
+ run ZFS?</para>
+ </question>
+
+ <answer>
+ <para>A minimum of 4GB of RAM is required for comfortable
+ usage, but individual workloads can vary widely.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="what-is-zil">
+ <para>What is the ZIL and when does it get used?</para>
+ </question>
+
+ <answer>
+ <para>The <acronym>ZIL</acronym> ((<acronym>ZFS</acronym>
+ intent log) is a write log used to implement posix write
+ commitment semantics across crashes. Normally writes
+ are bundled up into transaction groups
+ and written to disk when filled (<quote>Transaction Group
+ Commit</quote>). However syscalls like &man.fsync.2;
+ require a commitment that the data is written to stable
+ storage before returning.
+ The ZIL is needed for writes that have been acknowledged
+ as written but which are not yet on disk as part of a
+ transaction. The transaction groups are timestamped.
+ In the event of a crash the last valid timestamp is
+ found and missing data is merged in from the ZIL.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="need-ssd-for-zil">
+ <para>Do I need a SSD for ZIL?</para>
+ </question>
+
+ <answer>
+ <para>By default, ZFS stores the ZIL in the pool with all
+ the data. If your application has a heavy write load,
+ storing the ZIL in a separate device that has very fast
+ synchronous, sequential write performance can improve
+ overall system. For other workloads, a SSD is unlikely
+ to make much of an improvement.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="what-is-l2arc">
+ <para>What is the L2ARC?</para>
+ </question>
+
+ <answer>
+ <para>The <acronym>L2ARC</acronym> is a read cache stored
+ on a fast device such as an <acronym>SSD</acronym>.
+ This cache is not persisent across
+ reboots. Note that RAM is used as the first layer
+ of cache and the L2ARC is only needed if there is
+ insufficient RAM.</para>
+
+ <para>L2ARC needs space in the ARC to index it. So,
+ perversely, a working set that fits perfectly in the
+ ARC will not fit perfectly any more if a L2ARC is used
+ because part of the ARC is holding the L2ARC index,
+ pushing part of the working set into the
+ L2ARC which is slower than RAM.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="should-enable-dedup">
+ <para>Is enabling deduplication advisable?</para>
+ </question>
+
+ <answer>
+ <para>Generally speaking, no.</para>
+
+ <para>Deduplication takes up a significant amount
+ of RAM and may slow down read and write
+ disk access times. Unless one is storing data that is
+ very heavily duplicated (such as virtual machine images,
+ or user backups) it is possible that deduplication will
+ do more harm than good. Another consideration is the
+ inability to revert deduplication status. If data is
+ written when deduplication is enabled, disabling dedup
+ will not cause those blocks which were deduplicated to
+ be replicated until they are next modified.</para>
+
+ <para>Deduplication can also lead to some unexpected
+ situations. In particular deleting files may become much
+ slower.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="zpool-fully-full">
+ <para>I can not delete or create files on my ZFS pool.
+ How can I fix this?</para>
+ </question>
+
+ <answer>
+ <para>This could happen because the pool is 100% full.
+ ZFS requires space on the disk to write
+ transaction metadata. To restore the pool
+ to a usable state, truncate a file you want to
+ delete.</para>
+
+ <screen>&prompt.user; <userinput>truncate -s 0 <replaceable>unimportant-file</replaceable></userinput></screen>
+
+ <para>File truncation works because a new transaction is
+ not started, new spare blocks are created instead.</para>
+
+ <note>
+ <para>On systems with additional ZFS dataset tuning,
+ such as deduplication, the space may not be immediately
+ available</para>
+ </note>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="zfs-ssd-trim">
+ <para>Does ZFS support TRIM for Solid State Drives?</para>
+ </question>
+
+ <answer>
+ <para>ZFS TRIM support was added to &os;&nbsp;10-CURRENT
+ with revision r<svnref>240868</svnref>. ZFS TRIM
+ support is not yet available on the -STABLE
+ branches.</para>
+
+ <para>ZFS TRIM is enabled by default, and can be turned
+ off by adding this line to
+ <filename>/etc/sysctl.conf</filename>:</para>
+
+ <programlisting>vfs.zfs.trim_disable=1</programlisting>
+
+ <note>
+ <para>ZFS TRIM may not work with all configurations,
+ such as a ZFS filesystem on a GELI-backed
+ device.</para>
+ </note>
+ </answer>
+ </qandaentry>
+ </qandaset>
+ </sect1>
</chapter>
<chapter id="admin">
@@ -5776,8 +4214,8 @@ perm /dev/acd0 0660</programlisting>
<qandaentry>
<question id="root-not-found-cron-errors">
<para>Why do I keep getting messages like <errorname>root: not
- found</errorname> after editing my
- <filename>crontab</filename> file?</para>
+ found</errorname> after editing
+ <filename>/etc/crontab</filename></para>
</question>
<answer>
@@ -5830,7 +4268,7 @@ perm /dev/acd0 0660</programlisting>
</question>
<answer>
- <para>This is a security feature. In order to
+ <para>This is a security feature. To
<command>su</command> to <username>root</username> (or any
other account with superuser privileges), you must be in the
<groupname>wheel</groupname> group. If this feature were
@@ -5843,7 +4281,14 @@ perm /dev/acd0 0660</programlisting>
<para>To allow someone to <command>su</command> to
<username>root</username>, simply put them in the
- <groupname>wheel</groupname> group.</para>
+ <groupname>wheel</groupname> group. Use &man.pw.8;
+ for this purpose.</para>
+
+ <screen>&prompt.root; <userinput>pw groupmod wheel -m <replaceable>lisa</replaceable></userinput></screen>
+
+ <para>The above example will add user
+ <username>lisa</username> to the group
+ <groupname>wheel</groupname>.</para>
</answer>
</qandaentry>
@@ -5912,34 +4357,7 @@ perm /dev/acd0 0660</programlisting>
<para>Please see the Handbook section on <ulink
url="&url.books.handbook;/using-localization.html">using localization</ulink>,
specifically the section on <ulink
- url="&url.books.handbook;/using-localization.html#SETTING-CONSOLE">console setup</ulink>.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="pnp-resources">
- <para>Why do I get messages like: <errorname>unknown:
- &lt;PNP0303&gt; can't assign resources</errorname> on
- boot?</para>
- </question>
-
- <answer>
- <para>The following is an excerpt from a post to the
- &a.current;.</para>
-
- <blockquote>
- <attribution>&a.wollman;, 24 April 2001</attribution>
-
- <para>The <quote>can't assign resources</quote> messages
- indicate that the devices are legacy ISA devices for which
- a non-PnP-aware driver is compiled into the kernel. These
- include devices such as keyboard controllers, the
- programmable interrupt controller chip, and several other
- bits of standard infrastructure. The resources cannot be
- assigned because there is already a driver using those
- addresses.</para>
- </blockquote>
+ url="&url.books.handbook;/using-localization.html#setting-console">console setup</ulink>.</para>
</answer>
</qandaentry>
@@ -5948,10 +4366,6 @@ perm /dev/acd0 0660</programlisting>
<para>Why can I not get user quotas to work properly?</para>
</question>
-<!-- XXX This may be the worst answer in the entire
- document.
--->
-
<answer>
<orderedlist>
<listitem>
@@ -6090,9 +4504,13 @@ options SYSVMSG # enable for messaging</programlisting>
marked as <literal>insecure</literal> in
<filename>/etc/ttys</filename>. In this case it will be
required to boot from a &os; installation disk, choose
- the <guimenuitem>Fixit</guimenuitem> shell from
- &man.sysinstall.8; and issue the commands mentioned
- above.</para>
+ the <guimenuitem>Live CD</guimenuitem> or
+ <guimenuitem>Shell</guimenuitem> at the beginning of the install
+ process and issue the commands mentioned above. You will need to
+ mount the specific partition in this case and then chroot to it,
+ i.e. replace <command>mount -urw /</command> by
+ <command>mount /dev/ada0p1 /mnt; chroot /mnt</command> for
+ a system on <replaceable>ada0p1</replaceable>.</para>
</note>
<note>
@@ -6132,12 +4550,6 @@ options SYSVMSG # enable for messaging</programlisting>
does not exist if you compile your kernel with the
<literal>SC_DISABLE_REBOOT</literal> option.</para>
</note>
-
- <para>If you use the &man.pcvt.4; console driver, use the
- following kernel configuration line instead and rebuild the
- kernel:</para>
-
- <programlisting>options PCVT_CTRL_ALT_DEL</programlisting>
</answer>
</qandaentry>
@@ -6184,22 +4596,6 @@ options SYSVMSG # enable for messaging</programlisting>
</qandaentry>
<qandaentry>
- <question id="root-acl">
- <para>Why is &man.su.1; bugging me about not being in
- <username>root</username>'s ACL?</para>
- </question>
-
- <answer>
- <para>The error comes from the
- <application>Kerberos</application> distributed authentication
- system. The problem is not fatal but annoying. You can
- either run su with the <option>-K</option> option, or
- uninstall <application>Kerberos</application> as described
- in the next question.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="uninstall-kerberos">
<para>How do I uninstall
<application>Kerberos</application>?</para>
@@ -6231,19 +4627,7 @@ options SYSVMSG # enable for messaging</programlisting>
<para>If you have a lot of <command>telnet</command>,
<command>ssh</command>, X, or <command>screen</command>
users, you might run out of pseudoterminals. By default,
- &os;&nbsp;6.2 and earlier support 256 pseudoterminals, while
- &os;&nbsp;6.3 and later support 512 pseudoterminals.</para>
-
- <tip>
- <para>If needed, more pseudoterminals can be added.
- However, this requires patching the standard C library,
- the kernel, and <filename>/etc/ttys</filename>. For
- example, <ulink
- url="http://www.freebsd.org/~jhb/patches/pty_1152.patch"></ulink>
- expands the number of pseudoterminals to 1152. Note that
- the patch will only apply cleanly to &os;&nbsp;6.3 or
- later.</para>
- </tip>
+ &os; supports 512 pseudoterminals.</para>
</answer>
</qandaentry>
@@ -6439,9 +4823,7 @@ options SYSVMSG # enable for messaging</programlisting>
<makevar>ENABLE_SUID_SSH</makevar> to
<literal>true</literal> in
<filename>/etc/make.conf</filename> then rebuild and
- install &man.ssh.1; (or run
- <command>make <maketarget>world</maketarget></command>).
- </para>
+ reinstall &man.ssh.1;.</para>
</listitem>
<listitem>
@@ -6449,12 +4831,7 @@ options SYSVMSG # enable for messaging</programlisting>
<filename>/usr/bin/ssh</filename> to
<literal>4555</literal> by running
<command>chmod 4555 /usr/bin/ssh</command> as
- <username>root</username>. Then add
- <literal><makevar>ENABLE_SUID_SSH</makevar>= true</literal>
- to <filename>/etc/make.conf</filename> so
- the change takes effect the next time
- <command>make <maketarget>world</maketarget></command>
- is run.</para>
+ <username>root</username>.</para>
</listitem>
</itemizedlist>
</answer>
@@ -6503,7 +4880,8 @@ options SYSVMSG # enable for messaging</programlisting>
<literal>cache</literal> state if the page is known to
be clean (unmodified), but that transition is a matter
of policy, depending upon the algorithm choice of the VM
- system maintainer.</para></listitem>
+ system maintainer.</para>
+ </listitem>
<listitem>
<para><literal>Free</literal>: pages without data content,
@@ -6580,9 +4958,34 @@ options SYSVMSG # enable for messaging</programlisting>
<para>Although it is not recommended to delete this directory, to
do so you will need to unset the <literal>schg</literal> flag
first. See the &man.chflags.1; manual page for more information
- (and bear in mind the answer to <link linkend="unsetting-schg">
- the question on unsetting the schg flag</link>).
- </para>
+ (and bear in mind the answer to
+ <link linkend="unsetting-schg">the question on unsetting the schg flag</link>).</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="newsyslog-expectations">
+ <para>I just changed
+ <filename>/etc/newsyslog.conf</filename>. How can I check
+ if it does what I expect?</para>
+ </question>
+
+ <answer>
+ <para>To see what &man.newsyslog.8; will do use the
+ following:</para>
+
+ <screen>&prompt.user; <userinput>newsyslog -nrvv</userinput></screen>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="timezone">
+ <para>My time is wrong, how can I change the
+ timezone?</para>
+ </question>
+
+ <answer>
+ <para>Use &man.tzsetup.8;.</para>
</answer>
</qandaentry>
</qandaset>
@@ -6617,25 +5020,29 @@ options SYSVMSG # enable for messaging</programlisting>
<qandaentry>
<question id="running-X">
- <para>I want to run X, how do I go about it?</para>
+ <para>I want to run &xorg;, how do I go about it?</para>
</question>
<answer>
- <para>If you would like to add X to an existing installation,
- you should use either the <filename
- role="package">x11/xorg</filename> meta-port, which will
- build and install all the necessary components, or install
- &xorg; from &os; packages:</para>
+ <para>To install &xorg; do one of the following:</para>
+
+ <para>Use the <filename role="package">x11/xorg</filename>
+ meta-port, which builds and installs every &xorg;
+ component.</para>
+
+ <para>Use <filename
+ role="package">x11/xorg-minimal</filename>, which builds
+ and installs only the necessary &xorg; components.</para>
+
+ <para>Install &xorg; from &os; packages:</para>
<screen><userinput>&prompt.root; pkg_add -r xorg</userinput></screen>
- <para>It is also possible to install &xorg; from
- &man.sysinstall.8; by choosing
- <guimenuitem>Configure</guimenuitem>, then
- <guimenuitem>Distributions</guimenuitem>, then
- <guimenuitem>The X.Org Distribution</guimenuitem>.</para>
+ <para>or on systems using <application>pkg</application>:</para>
+
+ <screen><userinput>&prompt.root; pkg install xorg</userinput></screen>
- <para>After the installation of &xorg; was successful, follow
+ <para>After the installation of &xorg;, follow
the instructions from the <ulink
url="&url.books.handbook;/x-config.html">X11 Configuration</ulink> section of
the &os; Handbook.</para>
@@ -6644,9 +5051,9 @@ options SYSVMSG # enable for messaging</programlisting>
<qandaentry>
<question id="running-X-securelevels">
- <para>I <emphasis>tried</emphasis> to run X, but I get an
- <errorname>KDENABIO failed (Operation not
- permitted)</errorname> error when I type
+ <para>I <emphasis>tried</emphasis> to run X, but I get a
+ <errorname>No devices detected.</errorname> error when I
+ type
<command>startx</command>. What do I do now?</para>
</question>
@@ -6657,10 +5064,11 @@ options SYSVMSG # enable for messaging</programlisting>
requires write access to &man.io.4;. For more information,
see at the &man.init.8; manual page.</para>
- <para>So the question is what else you should do instead, and
- you basically have two choices: set your
+ <para>There are two solutions to the problem:
+ Set your
<literal>securelevel</literal> back down to zero (usually
- from <filename>/etc/rc.conf</filename>), or run &man.xdm.1;
+ in <filename>/etc/rc.conf</filename>), or run &man.xdm.1;
+ (or an alternative display manager)
at boot time (before the <literal>securelevel</literal> is
raised).</para>
@@ -6677,12 +5085,12 @@ options SYSVMSG # enable for messaging</programlisting>
<answer>
<para>If you are using &man.syscons.4; (the default console
driver), you can configure &os; to support a mouse pointer on
- each virtual screen. In order to avoid conflicting with X,
+ each virtual screen. To avoid conflicting with X,
&man.syscons.4; supports a virtual device called
<devicename>/dev/sysmouse</devicename>. All mouse events
received from the real mouse device are written to the
- &man.sysmouse.4; device via &man.moused.8;. If you wish to
- use your mouse on one or more virtual consoles,
+ &man.sysmouse.4; device via &man.moused.8;. To use your
+ mouse on one or more virtual consoles,
<emphasis>and</emphasis> use X, see <xref
linkend="moused" remap="another section"/> and set up
&man.moused.8;.</para>
@@ -6718,7 +5126,7 @@ options SYSVMSG # enable for messaging</programlisting>
with the following command (as
<username>root</username>):</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/devfs restart</userinput></screen>
+ <screen>&prompt.root; <userinput>service devfs restart</userinput></screen>
</answer>
</qandaentry>
@@ -6763,6 +5171,45 @@ EndSection</programlisting>
</answer>
</qandaentry>
+ <qandaentry>
+ <question id="x-and-synaptic">
+ <para>My laptop has a Synaptics touchpad. Can I use
+ it in X?</para>
+ </question>
+
+ <answer>
+ <para>Yes, you will have to configure a few things to
+ make it work.</para>
+
+ <para>If you plan to use the Xorg synaptics driver you
+ <emphasis>must</emphasis> remove moused_enable from
+ <filename>rc.conf</filename>. Xorg can not use
+ the synaptics mouse if the moused already sits on
+ <filename>/dev/psm0</filename>.</para>
+
+ <para>To enable synaptics in the &man.psm.4; driver you need
+ to add the following into
+ <filename>/boot/loader.conf</filename>:</para>
+
+ <programlisting>hw.psm.synaptics_support="1"</programlisting>
+
+ <para>You also need the following into
+ <filename>xorg.conf</filename>:</para>
+
+ <programlisting>Section "InputDevice"
+Identifier "Touchpad0"
+Driver "synaptics"
+Option "Protocol" "psm"
+Option "Device" "/dev/psm0"
+EndSection</programlisting>
+
+ <para>And be sure to add the following into the
+ <quote>ServerLayout</quote> section:</para>
+
+ <programlisting>InputDevice "Touchpad0" "SendCoreEvents"</programlisting>
+ </answer>
+ </qandaentry>
+
<qandaentry>
<question id="no-remote-x11">
<para>How do I use remote X displays?</para>
@@ -6801,13 +5248,12 @@ EndSection</programlisting>
are running or to read your mail while waiting for an FTP
transfer to finish. Just do <keycombo
action="simul"><keycap>Alt</keycap><keycap>F2</keycap></keycombo>
- (hold down the <keycap>Alt</keycap> key and press the
- <keycap>F2</keycap> key), and you will find a login prompt
+ (hold down <keycap>Alt</keycap> and press
+ <keycap>F2</keycap>), and you will find a login prompt
waiting for you on the second <quote>virtual
console</quote>! When you want to go back to the original
session, do <keycombo
- action="simul"><keycap>Alt</keycap><keycap>F1</keycap></keycombo>.
- </para>
+ action="simul"><keycap>Alt</keycap><keycap>F1</keycap></keycombo>.</para>
<para>The default &os; installation has eight virtual consoles
enabled. <keycombo
@@ -6877,7 +5323,7 @@ ttyvb "/usr/libexec/getty Pc" cons25 off secure</programlisting>
<para>It is imperative that you completely shut down X Window
if it is running, before running this command. If you do not,
your system will probably appear to hang or lock up after
- executing the <command>kill</command> command.</para>
+ executing <command>kill</command>.</para>
</answer>
</qandaentry>
@@ -6921,7 +5367,7 @@ ttyvb "/usr/libexec/getty Pc" cons25 off secure</programlisting>
&man.xdm.1;. One school starts <command>xdm</command> from
<filename>/etc/ttys</filename> (see &man.ttys.5;) using the
supplied example, while the other simply runs
- <command>xdm</command> from from
+ <command>xdm</command> from
<filename>rc.local</filename> (see &man.rc.8;) or from an
<filename>X</filename> script in
<filename class="directory">/usr/local/etc/rc.d</filename>. Both are equally
@@ -6937,8 +5383,8 @@ ttyvb "/usr/libexec/getty Pc" cons25 off secure</programlisting>
server.</para>
<para>If loaded from &man.rc.8;, <command>xdm</command> should
- be started without any arguments (i.e., as a daemon). The
- <command>xdm</command> command must start
+ be started without any arguments (i.e., as a daemon).
+ <command>xdm</command> must start
<emphasis>after</emphasis> &man.getty.8; runs, or else
<command>getty</command> and <command>xdm</command> will
conflict, locking out the console. The best way around this
@@ -6949,9 +5395,8 @@ ttyvb "/usr/libexec/getty Pc" cons25 off secure</programlisting>
<filename>/etc/ttys</filename>, there still is a chance of
conflict between <command>xdm</command> and &man.getty.8;.
One way to avoid this is to add the <literal>vt</literal>
- number in the
- <filename>/usr/local/lib/X11/xdm/Xservers</filename>
- file:</para>
+ number in
+ <filename>/usr/local/lib/X11/xdm/Xservers</filename></para>
<programlisting>:0 local /usr/local/bin/X vt4</programlisting>
@@ -6997,46 +5442,6 @@ ttyvb "/usr/libexec/getty Pc" cons25 off secure</programlisting>
</qandaentry>
<qandaentry>
- <question id="xfree86-root">
- <para>Before, I was able to run &xorg; as a regular user.
- Why does it now say that I must be
- <username>root</username>?</para>
- </question>
-
- <answer>
- <para>All X servers need to be run as
- <username>root</username> in order to get direct access to
- your video hardware.</para>
-
- <para>There are two ways to be able to use &xorg;
- as a regular user. The first is to use
- <command>xdm</command> or another display manager (e.g.,
- <command>kdm</command>); the second is to use the
- <command>Xwrapper</command>.</para>
-
- <para><command>xdm</command> is a daemon that handles
- graphical logins. It is usually started at boot time, and is
- responsible for authenticating users and starting their
- sessions; it is essentially the graphical counterpart of
- &man.getty.8; and &man.login.1;. For more information on
- <command>xdm</command> see <ulink
- url="http://www.x.org/wiki/UserDocumentation">the &xorg; documentation</ulink>,
- and the <link
- linkend="xdm-boot">the FAQ entry</link> on it.</para>
-
- <para><command>Xwrapper</command> is the X server wrapper; it
- is a small utility to enable one to manually run an X server
- while maintaining reasonable safety. It performs some
- sanity checks on the command line arguments given, and if
- they pass, runs the appropriate X server. If you do not
- want to run a display manager for whatever reason, this is
- for you. If you have installed the complete Ports
- Collection, you can find the port in <filename
- role="package">x11/wrapper</filename>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="ps2-x">
<para>Why does my PS/2 mouse misbehave under X?</para>
</question>
@@ -7071,44 +5476,13 @@ UserConfig&gt; <userinput>quit</userinput></screen>
</qandaentry>
<qandaentry>
- <question id="ps2-mousesystems">
- <para>Why does my PS/2 mouse from MouseSystems not
- work?</para>
- </question>
-
- <answer>
- <para>There have been some reports that certain model of PS/2
- mouse from MouseSystems works only if it is put into the
- <quote>high resolution</quote> mode. Otherwise, the mouse
- cursor may jump to the upper-left corner of the screen every
- so often.</para>
-
- <para>Specify the flags <literal>0x04</literal> to the PS/2
- mouse driver to put the mouse into the high resolution mode.
- Enter <emphasis>UserConfig</emphasis> by giving the
- <option>-c</option> option at the boot prompt:</para>
-
- <screen>boot: <userinput>-c</userinput></screen>
-
- <para>Then, in the <emphasis>UserConfig</emphasis> command
- line, type:</para>
-
- <screen>UserConfig&gt; <userinput>flags psm0 0x04</userinput>
-UserConfig&gt; <userinput>quit</userinput></screen>
-
- <para>See the previous section for another possible cause of
- mouse problems.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="mouse-button-reverse">
<para>How do I reverse the mouse buttons?</para>
</question>
<answer>
<para>Run the command <command>xmodmap -e "pointer = 3 2 1"</command>
- from your <filename>.xinitrc</filename> or
+ from <filename>.xinitrc</filename> or
<filename>.xsession</filename>.</para>
</answer>
</qandaentry>
@@ -7122,7 +5496,7 @@ UserConfig&gt; <userinput>quit</userinput></screen>
<answer>
<para>The detailed answer for this question can be found in
the <ulink
- url="&url.books.handbook;/boot-blocks.html#BOOT-SPLASH">Boot Time Splash Screens</ulink>
+ url="&url.books.handbook;/boot-blocks.html#boot-splash">Boot Time Splash Screens</ulink>
section of the &os; Handbook.</para>
</answer>
</qandaentry>
@@ -7151,8 +5525,8 @@ UserConfig&gt; <userinput>quit</userinput></screen>
<listitem>
<para><keycode>116</keycode> &mdash;
- <keycap>Windows</keycap> key, to the right of the
- <keycap>AltGr</keycap> key</para>
+ <keycap>Windows</keycap> key, to the right of
+ <keycap>AltGr</keycap></para>
</listitem>
<listitem>
@@ -7167,9 +5541,6 @@ UserConfig&gt; <userinput>quit</userinput></screen>
<screen>&prompt.root; <userinput>xmodmap -e "keycode 115 = comma"</userinput></screen>
- <para>You will probably have to re-start your window manager
- to see the result.</para>
-
<para>To have the <keycap>Windows</keycap> key-mappings
enabled automatically every time you start X either put the
<command>xmodmap</command> commands in your
@@ -7252,24 +5623,17 @@ Key F15 A A Menu Workplace Nop</programlisting>
</listitem>
</itemizedlist>
- <para>In fact, nVidia provides detailed information on which
- card is supported by which driver. This information is
- available directly on their web site: <ulink
- url="http://www.nvidia.com/object/IO_32667.html"></ulink>.
- </para>
+ <para>nVidia provides detailed information on which
+ card is supported by which driver
+ on their web site: <ulink
+ url="http://www.nvidia.com/object/IO_32667.html"></ulink>.</para>
- <para>For Matrox&nbsp;G200/G400, you should check the
+ <para>For Matrox&nbsp;G200/G400, check the
<filename role="package">x11-servers/mga_hal</filename>
port.</para>
- <para>For ATI&nbsp;Rage&nbsp;128 and Radeon, see the
- &man.ati.4x;, &man.r128.4x; and &man.radeon.4x; manual
- pages.</para>
-
- <para>For 3dfx Voodoo&nbsp;3, 4, 5, and Banshee cards, there
- is a <filename
- role="package">x11-servers/driglide</filename>
- port.</para>
+ <para>For ATI&nbsp;Rage&nbsp;128 and Radeon see
+ &man.ati.4x;, &man.r128.4x; and &man.radeon.4x;.</para>
</answer>
</qandaentry>
</qandaset>
@@ -7282,21 +5646,20 @@ Key F15 A A Menu Workplace Nop</programlisting>
<qandaentry>
<question id="diskless-booting">
<para>Where can I get information on <quote>diskless
- booting</quote>?</para>
- </question>
+ booting</quote>?</para>
+ </question>
- <answer>
- <para><quote>Diskless booting</quote> means that the &os;
- box is booted over a network, and reads the necessary
- files from a server instead of its hard disk. For full
+ <answer>
+ <para><quote>Diskless booting</quote> means that the &os;
+ box is booted over a network, and reads the necessary
+ files from a server instead of its hard disk. For full
details, please read <ulink
- url="&url.books.handbook;/network-diskless.html">the Handbook entry on diskless booting</ulink>
- </para>
- </answer>
- </qandaentry>
+ url="&url.books.handbook;/network-diskless.html">the Handbook entry on diskless booting</ulink>.</para>
+ </answer>
+ </qandaentry>
- <qandaentry>
- <question id="router">
+ <qandaentry>
+ <question id="router">
<para>Can a &os; box be used as a dedicated network
router?</para>
</question>
@@ -7305,8 +5668,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
<para>Yes. Please see the Handbook entry on <ulink
url="&url.books.handbook;/advanced-networking.html">advanced networking</ulink>,
specifically the section on <ulink
- url="&url.books.handbook;/network-routing.html">routing and gateways</ulink>.
- </para>
+ url="&url.books.handbook;/network-routing.html">routing and gateways</ulink>.</para>
</answer>
</qandaentry>
@@ -7325,18 +5687,15 @@ Key F15 A A Menu Workplace Nop</programlisting>
case of the previous question and works perfectly
well.</para>
- <para>If you are using dialup to connect to the Internet
- user-mode &man.ppp.8; contains a <option>-nat</option>
- option. If you run &man.ppp.8; with the
- <option>-nat</option> option, set
+ <para>Dialup users must use <option>-nat</option>
+ and set
<literal>gateway_enable</literal> to
<emphasis>YES</emphasis> in
- <filename>/etc/rc.conf</filename>, and configure your
- &windows; machine correctly, this should work fine. For
+ <filename>/etc/rc.conf</filename>.
+ For
more information, please see the &man.ppp.8; manual page or
the <ulink
- url="&url.books.handbook;/userppp.html">Handbook entry on user PPP</ulink>.
- </para>
+ url="&url.books.handbook;/userppp.html">Handbook entry on user PPP</ulink>.</para>
<para>If you are using kernel-mode PPP or have an Ethernet
connection to the Internet, you need to use &man.natd.8;.
@@ -7348,28 +5707,16 @@ Key F15 A A Menu Workplace Nop</programlisting>
<qandaentry>
<question id="slip-ppp-support">
- <para>Does &os; support SLIP and PPP?</para>
+ <para>Does &os; support PPP?</para>
</question>
<answer>
- <para>Yes. See the manual pages for &man.slattach.8;,
- &man.sliplogin.8;, &man.ppp.8;, and &man.pppd.8;.
- &man.ppp.8; and &man.pppd.8; provide support for both
- incoming and outgoing connections, while &man.sliplogin.8;
- deals exclusively with incoming connections, and
- &man.slattach.8; deals exclusively with outgoing
- connections.</para>
+ <para>Yes. &man.ppp.8; provides support for both
+ incoming and outgoing connections.</para>
- <para>For more information on how to use these, please see the
+ <para>For more information on how to use this, please see the
<ulink
- url="&url.books.handbook;/ppp-and-slip.html">Handbook chapter on PPP and SLIP</ulink>.
- </para>
-
- <para>If you only have access to the Internet through a
- <quote>shell account</quote>, you may want to have a look at
- the <filename role="package">net/slirp</filename> package.
- It can provide you with (limited) access to services such as
- ftp and http direct from your local machine.</para>
+ url="&url.books.handbook;/ppp-and-slip.html">Handbook chapter on PPP</ulink>.</para>
</answer>
</qandaentry>
@@ -7390,19 +5737,6 @@ Key F15 A A Menu Workplace Nop</programlisting>
</qandaentry>
<qandaentry>
- <question id="parallel-connect">
- <para>How do I connect two &os; systems over a parallel line
- using PLIP?</para>
- </question>
-
- <answer>
- <para>Please see the <ulink
- url="&url.books.handbook;/network-plip.html">PLIP section</ulink>
- of the Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="ethernet-aliases">
<para>How can I set up Ethernet aliases?</para>
</question>
@@ -7421,8 +5755,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
<screen>&prompt.root; <userinput>ifconfig <replaceable>ed0</replaceable> alias <replaceable>172.16.141.5</replaceable> netmask 0xffffff00</userinput></screen>
<para>You can read more about this in the &os; <ulink
- url="&url.books.handbook;/configtuning-virtual-hosts.html">Handbook</ulink>.
- </para>
+ url="&url.books.handbook;/configtuning-virtual-hosts.html">Handbook</ulink>.</para>
</answer>
</qandaentry>
@@ -7445,22 +5778,6 @@ Key F15 A A Menu Workplace Nop</programlisting>
</qandaentry>
<qandaentry>
- <question id="nfs">
- <para>Why am I having trouble with NFS and &os;?</para>
- </question>
-
- <answer>
- <para>Certain PC network cards are better than others (to put
- it mildly) and can sometimes cause problems with network
- intensive applications like NFS.</para>
-
- <para>See <ulink
- url="&url.books.handbook;/network-nfs.html">the Handbook entry on NFS</ulink>
- for more information on this topic.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="nfs-linux">
<para>Why can I not NFS-mount from a &linux; box?</para>
</question>
@@ -7475,21 +5792,6 @@ Key F15 A A Menu Workplace Nop</programlisting>
</qandaentry>
<qandaentry>
- <question id="nfs-sun">
- <para>Why can I not NFS-mount from a &sun; box?</para>
- </question>
-
- <answer>
- <para>&sun; workstations running
- &sunos;&nbsp;4.<replaceable>X</replaceable> only accept
- mount requests from a privileged port; try the following
- command:</para>
-
- <screen>&prompt.root; <userinput>mount -o -P <replaceable>sunbox:/blah</replaceable> <replaceable>/mnt</replaceable></userinput></screen>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="exports-errors">
<para>Why does <command>mountd</command> keep telling me it
<errorname>can't change attributes</errorname> and that I
@@ -7503,28 +5805,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
review &man.exports.5; and the <ulink
url="&url.books.handbook;/network-nfs.html">NFS</ulink>
entry in the Handbook, especially the section on <ulink
- url="&url.books.handbook;/network-nfs.html#CONFIGURING-NFS">configuring NFS</ulink>.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="ppp-nextstep">
- <para>Why am I having problems talking PPP to NeXTStep
- machines?</para>
- </question>
-
- <answer>
- <para>Try disabling the TCP extensions in
- <filename>/etc/rc.conf</filename> (see &man.rc.conf.5;) by
- changing the following variable to
- <literal>NO</literal>:</para>
-
- <programlisting>tcp_extensions=NO</programlisting>
-
- <para>Xylogic's Annex boxes are also broken in this regard and
- you must use the above change to connect through
- them.</para>
+ url="&url.books.handbook;/network-nfs.html#configuring-nfs">configuring NFS</ulink>.</para>
</answer>
</qandaentry>
@@ -7568,8 +5849,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
<answer>
<para>See the answer in the &os; <ulink
- url="&url.books.handbook;/mail-trouble.html">Handbook</ulink>.
- </para>
+ url="&url.books.handbook;/mail-trouble.html">Handbook</ulink>.</para>
</answer>
</qandaentry>
@@ -7597,8 +5877,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
<para>For further information on configuring a &os; firewall,
see the <ulink
- url="&url.books.handbook;/firewalls.html">Handbook chapter</ulink>.
- </para>
+ url="&url.books.handbook;/firewalls.html">Handbook chapter</ulink>.</para>
</answer>
</qandaentry>
@@ -7746,7 +6025,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
like this, where <literal>300</literal> is the limit in
packets per second:</para>
- <screen>&prompt.root; <userinput>sysctl -w net.inet.icmp.icmplim=300</userinput></screen>
+ <screen>&prompt.root; <userinput>sysctl net.inet.icmp.icmplim=300</userinput></screen>
<para>If you do not want to see messages about this in your
log files, but you still want the kernel to do response
@@ -7754,7 +6033,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
<varname>net.inet.icmp.icmplim_output</varname> sysctl
variable to disable the output like this:</para>
- <screen>&prompt.root; <userinput>sysctl -w net.inet.icmp.icmplim_output=0</userinput></screen>
+ <screen>&prompt.root; <userinput>sysctl net.inet.icmp.icmplim_output=0</userinput></screen>
<para>Finally, if you want to disable response limiting, you
can set the <varname>net.inet.icmp.icmplim</varname> sysctl
@@ -7805,8 +6084,8 @@ Key F15 A A Menu Workplace Nop</programlisting>
<qandaentry>
<question id="sandbox">
<para>What is a sandbox?</para>
- </question><answer>
-
+ </question>
+ <answer>
<para><quote>Sandbox</quote> is a security term. It can mean
two things:</para>
@@ -7848,7 +6127,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
<para>The most common way to accomplish this is to build a
simulated environment in a subdirectory and then run the
- processes in that directory chroot'd (i.e. <filename
+ processes in that directory chroot'd (i.e., <filename
class="directory">/</filename> for that process is this
directory, not the real <filename
class="directory">/</filename> of the system).</para>
@@ -7890,13 +6169,12 @@ Key F15 A A Menu Workplace Nop</programlisting>
</question>
<answer>
- <para>The securelevel is a security mechanism implemented in
- the kernel. Basically, when the securelevel is positive, the
+ <para><literal>securelevel</literal> is a security
+ mechanism implemented in the kernel. When the securelevel
+ is positive, the
kernel restricts certain tasks; not even the superuser
- (i.e., <username>root</username>) is allowed to do them. At
- the time of this writing, the securelevel mechanism is
- capable of, among other things, limiting the ability
- to:</para>
+ (i.e., <username>root</username>) is allowed to do them.
+ The securelevel mechanism limits the ability to:</para>
<itemizedlist>
<listitem>
@@ -7923,17 +6201,15 @@ Key F15 A A Menu Workplace Nop</programlisting>
<para>To check the status of the securelevel on a running
system, simply execute the following command:</para>
- <screen>&prompt.root; <userinput>sysctl kern.securelevel</userinput></screen>
+ <screen>&prompt.root; <userinput>sysctl -n kern.securelevel</userinput></screen>
- <para>The output will contain the name of the &man.sysctl.8;
- variable (in this case, <varname>kern.securelevel</varname>)
- and a number. The latter is the current value of the
+ <para>The output contains the current value of the
securelevel. If it is positive (i.e., greater than 0), at
least some of the securelevel's protections are
enabled.</para>
- <para>You cannot lower the securelevel of a running system;
- being able to do that would defeat its purpose. If you need
+ <para>The securelevel of a running system can not be
+ lowered as this would defeat its purpose. If you need
to do a task that requires that the securelevel be
non-positive (e.g., an <maketarget>installworld</maketarget>
or changing the date), you will have to change the
@@ -7970,12 +6246,8 @@ Key F15 A A Menu Workplace Nop</programlisting>
mailing lists, particularly the &a.security;. Please
search the archives <ulink
url="&url.base;/search/index.html">here</ulink> for an
- extensive discussion. Some people are hopeful that
- securelevel will soon go away in favor of a more
- fine-grained mechanism, but things are still hazy in this
- respect.</para>
-
- <para>Consider yourself warned.</para>
+ extensive discussion. A more fine-grained mechanism
+ is preffered.</para>
</warning>
</answer>
</qandaentry>
@@ -8065,22 +6337,6 @@ Key F15 A A Menu Workplace Nop</programlisting>
it.</para>
</answer>
</qandaentry>
-
- <qandaentry>
- <question id="suidperl">
- <para>Why is <command>suidperl</command> not working
- properly?</para>
- </question>
-
- <answer>
- <para>For security reasons, <command>suidperl</command> is not
- installed by default. If you want
- <command>suidperl</command> to be built during upgrades from
- source, edit <filename>/etc/make.conf</filename> and add
- <literal><varname>ENABLE_SUIDPERL</varname>=true</literal>
- before you build <command>perl</command>.</para>
- </answer>
- </qandaentry>
</qandaset>
</chapter>
@@ -8097,7 +6353,7 @@ Key F15 A A Menu Workplace Nop</programlisting>
<answer>
<para>You should first read the &man.ppp.8; manual page and
the <ulink
- url="&url.books.handbook;/ppp-and-slip.html#USERPPP">PPP section of the handbook</ulink>.
+ url="&url.books.handbook;/ppp-and-slip.html#userppp">PPP section of the handbook</ulink>.
Enable logging with the following command:</para>
<programlisting>set log Phase Chat Connect Carrier lcp ipcp ccp command</programlisting>
@@ -8165,11 +6421,11 @@ default 10.0.0.2 UGSc 0 0 tun0
10.0.0.2 10.0.0.1 UH 0 0 tun0</programlisting>
<para>This is assuming that you have used the addresses from
- the handbook, the manual page, or from the
- <filename>ppp.conf.sample</filename> file. If you do not
+ the handbook, the manual page, or from
+ <filename>ppp.conf.sample</filename>. If you do not
have a default route, it may be because you forgot to add
- the <literal>HISADDR</literal> line to the
- <filename>ppp.conf</filename> file.</para>
+ the <literal>HISADDR</literal> line to
+ <filename>ppp.conf</filename>.</para>
<para>Another reason for the default route line being missing
is that you have mistakenly set up a default router in your
@@ -8180,7 +6436,7 @@ default 10.0.0.2 UGSc 0 0 tun0
<programlisting>delete ALL</programlisting>
<para>If this is the case, go back to the <ulink
- url="&url.books.handbook;/userppp.html#USERPPP-FINAL">Final System Configuration</ulink>
+ url="&url.books.handbook;/userppp.html#userppp-final">Final System Configuration</ulink>
section of the handbook.</para>
</answer>
</qandaentry>
@@ -8193,8 +6449,7 @@ default 10.0.0.2 UGSc 0 0 tun0
<answer>
<para>This error is usually due that the following section is
- missing in your <filename>/etc/ppp/ppp.linkup</filename>
- file:</para>
+ missing in your <filename>/etc/ppp/ppp.linkup</filename>:</para>
<programlisting>MYADDR:
delete ALL
@@ -8211,7 +6466,7 @@ default 10.0.0.2 UGSc 0 0 tun0
add 0 0 HISADDR</programlisting>
<para>Refer to the <ulink
- url="&url.books.handbook;/userppp.html#USERPPP-DYNAMICIP">PPP and Dynamic IP addresses</ulink>
+ url="&url.books.handbook;/userppp.html#userppp-dynamicip">PPP and Dynamic IP addresses</ulink>
section of the handbook for further details.</para>
</answer>
</qandaentry>
@@ -8232,7 +6487,7 @@ add 0 0 HISADDR</programlisting>
seconds of inactivity before the connection is closed. If
<replaceable>NNN</replaceable> is zero, the connection is
never closed due to a timeout. It is possible to put this
- command in the <filename>ppp.conf</filename> file, or to
+ command in <filename>ppp.conf</filename>, or to
type it at the prompt in interactive mode. It is also
possible to adjust it on the fly while the line is active by
connecting to <application>ppp</application>'s server socket
@@ -8249,13 +6504,12 @@ add 0 0 HISADDR</programlisting>
<answer>
<para>If you have Link Quality Reporting (LQR) configured, it
is possible that too many LQR packets are lost between your
- machine and the peer. The &man.ppp.8; program deduces that
- the line must therefore be bad, and disconnects. Prior to
- &os; version 2.2.5, LQR was enabled by default. It is now
- disabled by default. LQR can be disabled with the following
- line:</para>
+ machine and the peer. &man.ppp.8; deduces that
+ the line must therefore be bad, and disconnects.
+ LQR is disabled by default and can be enabled with the
+ following line:</para>
- <programlisting>disable lqr</programlisting>
+ <programlisting>enable lqr</programlisting>
</answer>
</qandaentry>
@@ -8271,16 +6525,8 @@ add 0 0 HISADDR</programlisting>
thinks (incorrectly) that it lost carrier.</para>
<para>There is a setting on most modems for determining how
- tolerant it should be to temporary losses of carrier. On a
- &usrobotics;&nbsp;&sportster; for example, this is measured
- by the <literal>S10</literal> register in tenths of a
- second. To make your modem more forgiving, you could add
- the following send-expect sequence to your dial
- string:</para>
-
- <programlisting>set dial "...... ATS10=10 OK ......"</programlisting>
-
- <para>Refer to your modem manual for details.</para>
+ tolerant it should be to temporary losses of carrier.
+ Refer to the modem manual for details.</para>
</answer>
</qandaentry>
@@ -8341,7 +6587,7 @@ add 0 0 HISADDR</programlisting>
<para>There is very little you can do about this. Most ISPs
will refuse to help if you are not running a &microsoft; OS.
You can <literal>enable lqr</literal> in your
- <filename>ppp.conf</filename> file, allowing &man.ppp.8; to
+ <filename>ppp.conf</filename>, allowing &man.ppp.8; to
detect the remote failure and hang up, but this detection is
relatively slow and therefore not that useful. You may want
to avoid telling your ISP that you are running
@@ -8370,8 +6616,7 @@ deny pred1 deflate deflate24 protocomp acfcomp shortseq vj</programlisting>
<para>If your ISP is helpful, they should be able to enable
logging on their end, then when the next link drop occurs,
they may be able to tell you why their side is having a
- problem. Feel free to send the details to &a.brian;, or
- even to ask your ISP to contact him directly.</para>
+ problem.</para>
</answer>
</qandaentry>
@@ -8407,34 +6652,6 @@ deny pred1 deflate deflate24 protocomp acfcomp shortseq vj</programlisting>
<quote>detach</quote> from the running process by the
<command>quit</command> command of
<application>gdb</application>.</para>
-
- <para>Finally, send the log of your
- <application>gdb</application> session to &a.brian;.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="ppp-loginok-thennothing">
- <para>Why does nothing happen after the <quote>Login
- OK!</quote> message?</para>
- </question>
-
- <answer>
- <para>Prior to &os; version 2.2.5, once the link was
- established, &man.ppp.8; would wait for the peer to initiate
- the Line Control Protocol (LCP). Many ISPs will not
- initiate negotiations and expect the client to do so. To
- force &man.ppp.8; to initiate the LCP, use the following
- line:</para>
-
- <programlisting>set openmode active</programlisting>
-
- <note>
- <para>It usually does no harm if both sides initiate
- negotiation, so openmode is now active by default.
- However, the next section explains when it
- <emphasis>does</emphasis> do some harm.</para>
- </note>
</answer>
</qandaentry>
@@ -8485,8 +6702,8 @@ deny pred1 deflate deflate24 protocomp acfcomp shortseq vj</programlisting>
to see a hangup from the server.</para>
<para>This can be avoided by allowing the peer to start
- negotiating with the following line in your
- <filename>ppp.conf</filename> file:</para>
+ negotiating with the following line in
+ <filename>ppp.conf</filename>:</para>
<programlisting>set openmode passive</programlisting>
@@ -8592,8 +6809,8 @@ deny pred1 deflate deflate24 protocomp acfcomp shortseq vj</programlisting>
appear to have frozen. This is because &man.ppp.8; is
waiting for the command to complete.</para>
- <para>If you wish to execute commands like this, use the
- <command>!bg</command> command instead. This will execute
+ <para>To execute commands like this, use
+ <command>!bg</command> instead. This will execute
the given command in the background, and &man.ppp.8; can
continue to service the link.</para>
</answer>
@@ -8670,10 +6887,10 @@ set dfilter 3 permit 0/0 0/0</programlisting>
<para>This will make <application>sendmail</application> queue
everything until the queue is run (usually, sendmail is
- invoked with <option>-bd -q30m</option>, telling it to run
+ run with <option>-bd -q30m</option>, telling it to run
the queue every 30 minutes) or until a <command>sendmail
<option>-q</option></command> is done (perhaps from your
- <filename>ppp.linkup</filename> file).</para>
+ <filename>ppp.linkup</filename>).</para>
</answer>
</qandaentry>
@@ -8705,7 +6922,7 @@ CCP: Received Terminate Ack (1) state = Req-Sent (6)</programlisting>
</question>
<answer>
- <para>In order to log all lines of your modem
+ <para>To log all lines of your modem
<quote>conversation</quote>, you must enable the
following:</para>
@@ -8742,12 +6959,12 @@ CCP: Received Terminate Ack (1) state = Req-Sent (6)</programlisting>
line in your config files so that it can interpret strings
such as <literal>set phone "123 456 789"</literal> correctly
and realize that the number is actually only
- <emphasis>one</emphasis> argument. In order to specify a
+ <emphasis>one</emphasis> argument. To specify a
<literal>&quot;</literal> character, you must escape it
using a backslash (<literal>\</literal>).</para>
<para>When the chat interpreter parses each argument, it
- re-interprets the argument in order to find any special
+ re-interprets the argument to find any special
escape sequences such as <literal>\P</literal> or
<literal>\T</literal> (see the manual page). As a result of
this double-parsing, you must remember to use the correct
@@ -8789,8 +7006,8 @@ ATDT1234567</programlisting>
<answer>
<para>The <application>ppp</application> utility (or any other
program for that matter) should never dump core. Because
- &man.ppp.8; runs with an effective user&nbsp;ID of
- <literal>0</literal>, the operating system will not write
+ &man.ppp.8; runs setuid (with an effective user&nbsp;ID of
+ <literal>0</literal>), the operating system will not write
core image of &man.ppp.8; to disk before terminating it.
If, however &man.ppp.8; is actually terminating due to a
segmentation violation or some other signal that normally
@@ -8799,7 +7016,7 @@ ATDT1234567</programlisting>
section), then you should install the system sources and do
the following:</para>
- <screen>&prompt.root; <userinput><command>cd</command> <filename class="directory">/usr/src/usr.sbin/ppp</filename></userinput>
+ <screen>&prompt.root; <userinput><command>cd</command> <filename class="directory">/usr/src/usr.sbin/ppp</filename></userinput>
&prompt.root; <userinput><command>echo</command> <makevar>STRIP</makevar>= &gt;&gt; <filename>/etc/make.conf</filename></userinput>
&prompt.root; <userinput><command>echo</command> <makevar>CFLAGS</makevar>+=<option>-g</option> &gt;&gt; <filename>/etc/make.conf</filename></userinput>
&prompt.root; <userinput><command>make</command> <maketarget>install</maketarget> <maketarget>clean</maketarget></userinput></screen>
@@ -8973,8 +7190,8 @@ ATDT1234567</programlisting>
<listitem>
<para>Use a proxy. The application may support
- <literal>socks5</literal> for example, or (as in the
- <command>cvsup</command> case) may have a
+ <literal>socks5</literal> for example, or
+ may have a
<quote>passive</quote> option that avoids ever
requesting that the peer open connections back to the
local machine.</para>
@@ -8995,8 +7212,7 @@ ATDT1234567</programlisting>
</question>
<answer>
- <para>FCS stands for <literal>F</literal>rame
- <literal>C</literal>heck <literal>S</literal>equence. Each
+ <para>FCS stands for Frame Check Sequence. Each
PPP packet has a checksum attached to ensure that the data
being received is the data being sent. If the FCS of an
incoming packet is incorrect, the packet is dropped and the
@@ -9028,8 +7244,8 @@ ATDT1234567</programlisting>
if the incoming data is actually a login or shell prompt.
If you have a shell prompt at the remote end, it is possible
to terminate &man.ppp.8; without dropping the line by using
- the <command>close lcp</command> command (a following
- <command>term</command> command) will reconnect you to the
+ <command>close lcp</command> (a following
+ <command>term</command>) will reconnect you to the
shell on the remote machine.</para>
<para>If nothing in your log file indicates why the link might
@@ -9049,10 +7265,9 @@ ATDT1234567</programlisting>
<para>If all else fails, send as much information as you can,
including your config files, how you are starting
&man.ppp.8;, the relevant parts of your log file and the
- output of the <command>netstat -rn</command> command (before
- and after connecting) to the &a.questions; or the <ulink
- url="news:comp.unix.bsd.freebsd.misc">comp.unix.bsd.freebsd.misc</ulink>
- news group, and someone should point you in the right
+ output of <command>netstat -rn</command> (before
+ and after connecting) to the &a.questions;
+ and someone should point you in the right
direction.</para>
</answer>
</qandaentry>
@@ -9063,13 +7278,48 @@ ATDT1234567</programlisting>
<title>Serial Communications</title>
<para>This section answers common questions about serial
- communications with &os;. PPP and SLIP are covered in the <link
+ communications with &os;. PPP is covered in the <link
linkend="networking">Networking</link> section.</para>
<qandaset>
<qandaentry>
+ <question id="multiport-serial-support">
+ <para>Which multi-port serial cards are supported by
+ &os;?</para>
+ </question>
+
+ <answer>
+ <para>There is a list of these in the <ulink
+ url="&url.books.handbook;/serial.html">Serial Communications</ulink>
+ chapter of the handbook.</para>
+
+ <para>Most multi-port PCI cards that are based on 16550 or
+ clones are supported with no extra effort.</para>
+
+ <para>Some unnamed clone cards have also been known to work,
+ especially those that claim to be AST compatible.</para>
+
+ <para>Check &man.uart.4; and &man.sio.4; to get more
+ information on configuring such cards.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="serial-console-prompt">
+ <para>How do I get the boot: prompt to show on the serial
+ console?</para>
+ </question>
+
+ <answer>
+ <para>See <ulink
+ url="&url.books.handbook;/serialconsole-setup.html">this section of the handbook</ulink>.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
<question id="found-serial">
- <para>How do I tell if &os; found my serial ports?</para>
+ <para>How do I tell if &os; found my serial ports or modem
+ cards?</para>
</question>
<answer>
@@ -9109,16 +7359,6 @@ sio1: type 16550A</programlisting>
</qandaentry>
<qandaentry>
- <question id="found-modem">
- <para>How do I tell if &os; found my modem cards?</para>
- </question>
-
- <answer>
- <para>Refer to the answer to the previous question.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="access-serial-ports">
<para>How do I access the serial ports on &os;?</para>
</question>
@@ -9198,18 +7438,6 @@ hint.sio.7.irq="12"</programlisting>
</qandaentry>
<qandaentry>
- <question id="multiport-serial-share-irq">
- <para>Can &os; handle multiport serial cards sharing
- IRQs?</para>
- </question>
-
- <answer>
- <para>Not yet. You will have to use a different IRQ for each
- card.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="default-serial-params">
<para>Can I set the default serial parameters for a
port?</para>
@@ -9217,7 +7445,7 @@ hint.sio.7.irq="12"</programlisting>
<answer>
<para>See the <ulink
- url="&url.books.handbook;/serial.html#SERIAL-HW-CONFIG">Serial Communications</ulink>
+ url="&url.books.handbook;/serial.html#serial-hw-config">Serial Communications</ulink>
section in the &os; Handbook.</para>
</answer>
</qandaentry>
@@ -9268,150 +7496,6 @@ hint.sio.7.irq="12"</programlisting>
&prompt.root; <userinput>chmod 4511 /usr/bin/tip</userinput></screen>
</answer>
</qandaentry>
-
- <qandaentry>
- <question id="hayes-unsupported">
- <para>My stock Hayes modem is not supported &mdash; what can I
- do?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#HAYES-UNSUPPORTED">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="direct-at">
- <para>How am I expected to enter these AT commands?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#DIRECT-AT">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="gt-failure">
- <para>Why does the <literal>@</literal> sign for the
- <literal>pn</literal> capability not
- work?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#GT-FAILURE">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="dial-command-line">
- <para>How can I dial a phone number on the command
- line?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#DIAL-COMMAND-LINE">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="set-bps">
- <para>Do I have to type in the bps rate every time I do
- that?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#SET-BPS">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="terminal-server">
- <para>How can I more easily access a number of hosts through a
- terminal server?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#TERMINAL-SERVER">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="tip-multiline">
- <para>Can tip try more than one line for each site?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#TIP-MULTILINE">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="multi-controlp">
- <para>Why do I have to hit <keycombo
- action="simul"><keycap>Ctrl</keycap><keycap>P</keycap></keycombo>
- twice to send <keycombo
- action="simul"><keycap>Ctrl</keycap><keycap>P</keycap></keycombo>
- once?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#MULTI-CONTROLP">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="uppercase">
- <para>Why is everything I type suddenly in UPPER CASE?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#UPPERCASE">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="tip-filetransfer">
- <para>How can I do file transfers with
- <command>tip</command>?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#TIP-FILETRANSFER">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="zmodem-tip">
- <para>How can I run zmodem with
- <command>tip</command>?</para>
- </question>
-
- <answer>
- <para>See <ulink
- url="&url.books.handbook;/dialout.html#ZMODEM-TIP">this answer</ulink>
- in the &os; Handbook.</para>
- </answer>
- </qandaentry>
</qandaset>
</chapter>
@@ -9421,18 +7505,16 @@ hint.sio.7.irq="12"</programlisting>
<qandaset>
<qandaentry>
<question id="more-swap">
- <para>&os; uses far more swap space than &linux;. Why?</para>
+ <para>&os; a lot of swap space even when the computer has
+ free memory left. Why?</para>
</question>
<answer>
- <para>&os; only appears to use more swap than &linux;. In
- actual fact, it does not. The main difference between &os;
- and &linux; in this regard is that &os; will proactively
+ <para>&os; will proactively
move entirely idle, unused pages of main memory into swap in
order to make more main memory available for active use.
- &linux; tends to only move pages to swap as a last resort.
- The perceived heavier use of swap is balanced by the more
- efficient use of main memory.</para>
+ This heavy use of swap is balanced by using the extra free
+ memory for cacheing.</para>
<para>Note that while &os; is proactive in this regard, it
does not arbitrarily decide to swap pages when the system is
@@ -9485,12 +7567,12 @@ hint.sio.7.irq="12"</programlisting>
<para>When changing modes of the file hierarchies rooted in the
files instead of the files themselves,
you have to use either <option>-H</option> or
- <option>-L</option> together with the <option>-R</option>
- option to make this work. See the &man.chmod.1; and
- &man.symlink.7; manual pages for more info.</para>
+ <option>-L</option> together with <option>-R</option>
+ to make this work. See &man.chmod.1; and
+ &man.symlink.7; for more information.</para>
<warning>
- <para>The <option>-R</option> option does a
+ <para><option>-R</option> does a
<emphasis>recursive</emphasis> &man.chmod.1;. Be careful
about specifying directories or symlinks to directories to
&man.chmod.1;. If you want to change the permissions of a
@@ -9651,28 +7733,6 @@ hint.sio.7.irq="12"</programlisting>
</qandaentry>
<qandaentry>
- <question id="sup-define">
- <para>What is <command>sup</command>, and how do I use
- it?</para>
- </question>
-
- <answer>
- <para><ulink
- url="http://www.FreeBSD.org/cgi/ports.cgi?^sup">SUP</ulink>
- stands for Software Update Protocol, and was developed by
- CMU for keeping their development trees in sync. It was
- used to keep remote sites in sync with the Project's central
- development sources.</para>
-
- <para>SUP is not bandwidth friendly, and has been retired.
- The current recommended method to keep your sources up to
- date is <ulink
- url="&url.books.handbook;/synching.html#CVSUP">CVSup</ulink>
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="daemon-name">
<para>What is the cute little red guy's name?</para>
</question>
@@ -9684,8 +7744,7 @@ hint.sio.7.irq="12"</programlisting>
pronounced <quote>BSD</quote>.</para>
<para>You can learn more about the BSD daemon on his <ulink
- url="http://www.mckusick.com/beastie/index.html">home page</ulink>.
- </para>
+ url="http://www.mckusick.com/beastie/index.html">home page</ulink>.</para>
</answer>
</qandaentry>
@@ -9705,8 +7764,7 @@ hint.sio.7.irq="12"</programlisting>
given. If you want to use him commercially, you must
contact &a.mckusick;. More details are available on the
<ulink
- url="http://www.mckusick.com/beastie/index.html">BSD Daemon's home page</ulink>.
- </para>
+ url="http://www.mckusick.com/beastie/index.html">BSD Daemon's home page</ulink>.</para>
</answer>
</qandaentry>
@@ -9730,8 +7788,7 @@ hint.sio.7.irq="12"</programlisting>
<answer>
<para>Please see the <ulink
- url="&url.books.handbook;/freebsd-glossary.html">&os; Glossary</ulink>.
- </para>
+ url="&url.books.handbook;/freebsd-glossary.html">&os; Glossary</ulink>.</para>
</answer>
</qandaentry>
@@ -9843,11 +7900,13 @@ hint.sio.7.irq="12"</programlisting>
<quote>scratch and sniff</quote> GUI. It is a funny old
business we are in!</para>
- <para>Seriously, both &os; and &linux; use the
+ <para>Seriously, &os; uses the
<acronym>HLT</acronym> (halt) instruction when the system is
idle thus lowering its energy consumption and therefore the
- heat it generates. Also if you have APM (advanced power
- management) configured, then &os; can also put the CPU into
+ heat it generates. Also if you have
+ <acronym>ACPI</acronym> (Advanced
+ Configuration and Power Interface)
+ configured, then &os; can also put the CPU into
a low power mode.</para>
</answer>
</qandaentry>
@@ -9917,7 +7976,7 @@ hint.sio.7.irq="12"</programlisting>
<para>Five to complain about buildworld being broken;</para>
<para>Thirty-one to answer that it works for them, and they
- must have cvsupped at a bad time;</para>
+ must have updated at a bad time;</para>
<para>One to post a patch for a new lightbulb to
-hackers;</para>
@@ -10062,6 +8121,19 @@ hint.sio.7.irq="12"</programlisting>
annoyed by it as well.</para>
</answer>
</qandaentry>
+
+ <qandaentry>
+ <question id="punk-my-friend">
+ <para>My colleague sits at the computer too much, how
+ can I prank her?</para>
+ </question>
+
+ <answer>
+ <para>Install <filename role="port">games/sl</filename> and wait
+ for her to mistype <userinput>sl</userinput> for
+ <command>ls</command>.</para>
+ </answer>
+ </qandaentry>
</qandaset>
</chapter>
@@ -10075,20 +8147,12 @@ hint.sio.7.irq="12"</programlisting>
</question>
<answer>
- <para>At this time, there is only one book on &os;-specific OS
- internals, namely <quote>The Design and Implementation of
- the &os; Operating System</quote> by Marshall Kirk McKusick
- and George V. Neville-Neil, ISBN 0-201-70245-2, which
- focuses on version 5.<replaceable>X</replaceable> of
- &os;.</para>
+ <para>See the
+ <ulink
+ url="&url.books.arch-handbook;">&os; Architecture Handbook</ulink>.</para>
<para>Additionally, much general &unix; knowledge is directly
applicable to &os;.</para>
-
- <para>For a list of relevant books, please check the
- Handbook's <ulink
- url="&url.books.handbook;/bibliography-osinternals.html">Operating System Internals Bibliography</ulink>.
- </para>
</answer>
</qandaentry>
@@ -10158,70 +8222,6 @@ hint.sio.7.irq="12"</programlisting>
</qandaentry>
<qandaentry>
- <question id="custrel">
- <para>How do I make my own custom release?</para>
- </question>
-
- <answer>
- <para>Please see the <ulink
- url="&url.articles.releng;/article.html">Release Engineering</ulink>
- article.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="makeworld-clobbers">
- <para>Why does
- <command>make <maketarget>world</maketarget></command>
- clobber my existing installed binaries?</para>
- </question>
-
- <answer>
- <para>Yes, this is the general idea; as its name might
- suggest,
- <command>make <maketarget>world</maketarget></command>
- rebuilds every system binary from scratch, so you can be
- certain of having a clean and consistent environment at the
- end (which is why it takes so long).</para>
-
- <para>If the environment variable <envar>DESTDIR</envar>
- is defined while running
- <command>make <maketarget>world</maketarget></command> or
- <command>make <maketarget>install</maketarget></command>,
- the newly-created binaries will be deposited in a directory
- tree identical to the installed one, rooted at
- <literal>${DESTDIR}</literal>. Some random combination of
- shared libraries modifications and program rebuilds can
- cause this to fail in
- <command>make <maketarget>world</maketarget></command>
- however.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="cvsup-round-robin">
- <para>Why isn't <hostid role="fqdn">cvsup.FreeBSD.org</hostid>
- a round robin DNS entry to share the load amongst the various
- <application>CVSup</application> servers?</para>
- </question>
-
- <answer>
- <para>While <application>CVSup</application> mirrors update
- from the master <application>CVSup</application> server
- hourly, this update might happen at any time during the
- hour. This means that some servers have newer code than
- others, even though all servers have code that is less than
- an hour old. If <hostid
- role="fqdn">cvsup.FreeBSD.org</hostid> was a round robin
- DNS entry that simply redirected users to a random
- <application>CVSup</application> server, running
- <application>CVSup</application> twice in a row could
- download code older than the code already on the
- system.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="ctm">
<para>Can I follow <emphasis>-CURRENT</emphasis> with limited
Internet access?</para>
@@ -10230,8 +8230,7 @@ hint.sio.7.irq="12"</programlisting>
<answer>
<para>Yes, you can do this <emphasis>without</emphasis>
downloading the whole source tree by using the <ulink
- url="&url.books.handbook;/synching.html#CTM">CTM facility</ulink>.
- </para>
+ url="&url.books.handbook;/synching.html#ctm">CTM facility</ulink>.</para>
</answer>
</qandaentry>
@@ -10251,128 +8250,6 @@ hint.sio.7.irq="12"</programlisting>
</qandaentry>
<qandaentry>
- <question id="pnp-initialize">
- <para>How are Plug&nbsp;N&nbsp;Play ISA cards detected and
- initialized?</para>
- </question>
-
- <answer>
- <para>By: Frank Durda IV
- <email>uhclem@nemesis.lonestar.org</email></para>
-
- <para>In a nutshell, there a few I/O ports that all of the PnP
- boards respond to when the host asks if anyone is out there.
- So when the PnP probe routine starts, it asks if there are
- any PnP boards present, and all the PnP boards respond with
- their model # to a I/O read of the same port, so the probe
- routine gets a wired-OR <quote>yes</quote> to that question.
- At least one bit will be on in that reply. Then the probe
- code is able to cause boards with board model IDs (assigned
- by &microsoft;/&intel;) lower than <literal>X</literal> to
- go <quote>off-line</quote>. It then looks to see if any
- boards are still responding to the query. If the answer was
- <literal>0</literal>, then there are no boards with IDs
- above <literal>X</literal>. Probe will then ask for boards
- below <literal>X</literal>. Finally, probe requests boards
- greater than
- <literal>X&nbsp;-&nbsp;(limit&nbsp;/&nbsp;4)</literal> to go
- off-line. It then repeats this query. By repeating this
- semi-binary search of IDs-in-range enough times, the probing
- code will eventually identify all PnP boards present in a
- given machine with a number of iterations that is much lower
- than what 2<superscript>64</superscript> would take.</para>
-
- <para>The IDs are two 32-bit fields (hence
- 2<superscript>64</superscript>) + 8-bit checksum. The first
- 32&nbsp;bits are a vendor identifier. They never come out
- and say it, but it appears to be assumed that different
- types of boards from the same vendor could have different
- 32-bit vendor IDs. The idea of needing 32&nbsp;bits just
- for unique manufacturers is a bit excessive.</para>
-
- <para>The lower 32&nbsp;bits are a serial #, or something else
- that makes this one board unique. The vendor must never
- produce a second board that has the same lower 32&nbsp;bits
- unless the upper 32&nbsp;bits are also different. So you
- can have multiple boards of the same type in the machine and
- the full 64&nbsp;bits will still be unique.</para>
-
- <para>The 32-bit groups can never be all zero. This
- allows the wired-OR to show non-zero bits during the initial
- binary search.</para>
-
- <para>Once the system has identified all the board IDs
- present, it will reactivate each board, one at a time (via the
- same I/O ports), and find out what resources the given board
- needs, what interrupt choices are available, etc. A scan is
- made over all the boards to collect this information.</para>
-
- <para>This info is then combined with info from any ECU files
- on the hard disk or wired into the MLB BIOS. The ECU and
- BIOS PnP support for hardware on the MLB is usually
- synthetic, and the peripherals do not really do genuine PnP.
- However by examining the BIOS info plus the ECU info, the
- probe routines can cause the devices that are PnP to avoid
- those devices the probe code cannot relocate.</para>
-
- <para>Then the PnP devices are visited once more and given
- their I/O, DMA, IRQ and Memory-map address assignments. The
- devices will then appear at those locations and remain there
- until the next reboot, although there is nothing that says
- you cannot move them around whenever you want.</para>
-
- <para>There is a lot of oversimplification above, but you
- should get the general idea.</para>
-
- <para>&microsoft; took over some of the primary printer status
- ports to do PnP, on the logic that no boards decoded those
- addresses for the opposing I/O cycles. I found a genuine
- IBM printer board that did decode writes of the status port
- during the early PnP proposal review period, but &microsoft;
- said <quote>tough</quote>. So they do a write to the
- printer status port for setting addresses, plus that use
- that address + <literal>0x800</literal>, and a third I/O
- port for reading that can be located anywhere between
- <literal>0x200</literal> and <literal>0x3ff</literal>.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="alternate-directory-layout">
- <para>What about alternative layout policies for
- directories?</para>
- </question>
-
- <answer>
- <para>In answer to the question of alternative layout policies
- for directories, the scheme that is currently in use is
- unchanged from what I wrote in 1983. I wrote that policy
- for the original fast file system, and never revisited it.
- It works well at keeping cylinder groups from filling up.
- As several of you have noted, it works poorly for find.
- Most file systems are created from archives that were
- created by a depth first search (aka ftw). These
- directories end up being striped across the cylinder groups
- thus creating a worst possible scenario for future depth
- first searches. If one knew the total number of directories
- to be created, the solution would be to create
- <literal>(total&nbsp;/&nbsp;fs_ncg)</literal> per cylinder
- group before moving on. Obviously, one would have to create
- some heuristic to guess at this number. Even using a small
- fixed number like say 10 would make an order of magnitude
- improvement. To differentiate restores from normal
- operation (when the current algorithm is probably more
- sensible), you could use the clustering of up to 10 if they
- were all done within a ten second window. Anyway, my
- conclusion is that this is an area ripe for
- experimentation.</para>
-
- <para>&a.mckusick;, September 1998</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
<question id="kernel-panic-troubleshooting">
<para>How can I make the most of the data I see when my kernel
panics?</para>
@@ -10541,10 +8418,10 @@ panic: page fault</programlisting>
capture all of them. Using the unstripped kernel image with
all the debug symbols should show the exact line of kernel
source code where the panic occurred. Usually you have to
- read the stack trace from the bottom up in order to trace
+ read the stack trace from the bottom up to trace
the exact sequence of events that lead to the crash. You
can also use &man.kgdb.1; to print out the contents of
- various variables or structures in order to examine the
+ various variables or structures to examine the
system state at the time of the crash.</para>
<tip>
@@ -10579,7 +8456,7 @@ panic: page fault</programlisting>
defined in an executable visible to the dynamic linker.
Consequently <function>dlsym()</function> searches on
handles obtained from calls to <function>dlopen(NULL,
- flags)</function> will fail to find such symbols.</para>
+ flags)</function> will fail to find such symbols.</para>
<para>If you want to search, using
<function>dlsym()</function>, for symbols present in the
@@ -10598,7 +8475,7 @@ panic: page fault</programlisting>
<answer>
<para>By default, the kernel address space is 1&nbsp;GB
(2&nbsp;GB for PAE) for i386. If you run a
- network-intensive server (e.g. a large FTP or HTTP server),
+ network-intensive server (e.g., a FTP or HTTP server),
or you want to use ZFS, you might find that is not
enough.</para>
@@ -10627,7 +8504,7 @@ panic: page fault</programlisting>
Repeatedly.</para>
<para>We wish to thank every one of the people responsible, and we
- encourage you to to <ulink
+ encourage you to <ulink
url="&url.articles.contributing;/article.html">join them</ulink>
in making this FAQ even better.</para>
</chapter>
diff --git a/en_US.ISO8859-1/books/fdp-primer/Makefile b/en_US.ISO8859-1/books/fdp-primer/Makefile
index 7e7f024e08..60eaeea096 100644
--- a/en_US.ISO8859-1/books/fdp-primer/Makefile
+++ b/en_US.ISO8859-1/books/fdp-primer/Makefile
@@ -14,11 +14,11 @@ INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
#
-# SRCS lists the individual SGML files that make up the document. Changes
+# SRCS lists the individual XML files that make up the document. Changes
# to any of these files will force a rebuild
#
-# SGML content
+# XML content
SRCS= book.xml
SRCS+= overview/chapter.xml
SRCS+= psgml-mode/chapter.xml
diff --git a/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml b/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml
index b272a6f880..ba151b3cc8 100644
--- a/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml
+++ b/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml
@@ -113,12 +113,12 @@
example is preferred.</para>
<informalexample>
- <para>Use the command <command>cvsup</command> to update
+ <para>Use the command <command>svn</command> to update
your sources.</para>
</informalexample>
<informalexample>
- <para>Use <command>cvsup</command> to update your
+ <para>Use <command>svn</command> to update your
sources.</para>
</informalexample>
diff --git a/en_US.ISO8859-1/books/handbook/Makefile b/en_US.ISO8859-1/books/handbook/Makefile
index 6f822d303f..5f31dca821 100644
--- a/en_US.ISO8859-1/books/handbook/Makefile
+++ b/en_US.ISO8859-1/books/handbook/Makefile
@@ -243,11 +243,11 @@ IMAGES_LIB+= callouts/14.png
IMAGES_LIB+= callouts/15.png
#
-# SRCS lists the individual SGML files that make up the document. Changes
+# SRCS lists the individual XML files that make up the document. Changes
# to any of these files will force a rebuild
#
-# SGML content
+# XML content
SRCS+= audit/chapter.xml
SRCS+= book.xml
SRCS+= bsdinstall/chapter.xml
@@ -296,8 +296,8 @@ SYMLINKS= ${DESTDIR} index.html handbook.html
# Turn on all the chapters.
CHAPTERS?= ${SRCS:M*chapter.xml}
-SGMLFLAGS+= ${CHAPTERS:S/\/chapter.xml//:S/^/-i chap./}
-SGMLFLAGS+= -i chap.freebsd-glossary
+XMLFLAGS+= ${CHAPTERS:S/\/chapter.xml//:S/^/-i chap./}
+XMLFLAGS+= -i chap.freebsd-glossary
pgpkeyring: pgpkeys/chapter.xml
${JADE} -V nochunks ${OTHERFLAGS} ${JADEOPTS} -d ${DSLPGP} -t sgml ${XMLDECL} ${MASTERDOC}
diff --git a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
index 57bf23600b..143646add5 100644
--- a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
@@ -45,10 +45,6 @@
</listitem>
<listitem>
- <para>How to connect two computers via PLIP.</para>
- </listitem>
-
- <listitem>
<para>How to set up IPv6 on a FreeBSD machine.</para>
</listitem>
@@ -355,7 +351,7 @@ host2.example.com link#1 UC 0 0
<para>Remember, since the PPP interface is using an address on
the ISP's local network for your side of the connection,
routes for any other machines on the ISP's local network will
- be automatically generated. Hence, you will already know how
+ be automatically generated. Hence, you will already know how
to reach the <hostid>T1-GW</hostid> machine, so there is no
need for the intermediate step of sending traffic to the ISP
server.</para>
@@ -390,8 +386,8 @@ host2.example.com link#1 UC 0 0
</tgroup>
</informaltable>
- <para>You can easily define the default route via the
- <filename>/etc/rc.conf</filename> file. In our example, on
+ <para>The default route can be easily defined in
+ <filename>/etc/rc.conf</filename>. In our example, on
the <hostid>Local2</hostid> machine, we added the following
line in <filename>/etc/rc.conf</filename>:</para>
@@ -403,7 +399,7 @@ host2.example.com link#1 UC 0 0
<screen>&prompt.root; <userinput>route add default 10.20.30.1</userinput></screen>
<para>For more information on manual manipulation of network
- routing tables, consult &man.route.8; manual page.</para>
+ routing tables, consult the &man.route.8; manual page.</para>
</sect2>
<sect2 id="network-dual-homed-hosts">
@@ -573,9 +569,8 @@ default 10.0.0.1 UGS 0 49378 xl0
<para>The above example is perfect for configuring a static
route on a running system. However, one problem is that the
routing information will not persist if you reboot your &os;
- machine. The way to handle the addition of a static route
- is to put it in your <filename>/etc/rc.conf</filename>
- file:</para>
+ machine. Additional static routes can be
+ entered in <filename>/etc/rc.conf</filename>:</para>
<programlisting># Add Internal Net 2 as a static route
static_routes="internalnet2"
@@ -834,8 +829,8 @@ route_net2="-net 192.168.1.0/24 192.168.1.1"</programlisting>
<para>The first thing you need is a wireless device. The most
commonly used devices are those that use parts made by
Atheros. These devices are supported by the &man.ath.4;
- driver and require the following line to be added to the
- <filename>/boot/loader.conf</filename> file:</para>
+ driver and require the following line to be added to
+ <filename>/boot/loader.conf</filename>:</para>
<programlisting>if_ath_load="YES"</programlisting>
@@ -879,7 +874,7 @@ route_net2="-net 192.168.1.0/24 192.168.1.1"</programlisting>
<literal>wlan_scan_sta</literal> modules; the &man.wlan.4;
module is automatically loaded with the wireless device
driver, the remaining modules must be loaded at boot time
- via the <filename>/boot/loader.conf</filename> file:</para>
+ in <filename>/boot/loader.conf</filename>:</para>
<programlisting>wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"</programlisting>
@@ -1207,7 +1202,7 @@ ifconfig_wlan0="DHCP"</programlisting>
<para>At this point, you are ready to bring up the
wireless interface:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/netif start</userinput></screen>
+ <screen>&prompt.root; <userinput>service netif start</userinput></screen>
<para>Once the interface is running, use
<command>ifconfig</command> to see the status of the
@@ -1324,7 +1319,7 @@ ifconfig_wlan0="WPA DHCP"</programlisting>
<para>Then we can bring up the interface:</para>
- <screen>&prompt.root; <userinput><filename>/etc/rc.d/netif</filename> start</userinput>
+ <screen>&prompt.root; <userinput><filename>service netif</filename> start</userinput>
Starting wpa_supplicant.
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
@@ -1514,10 +1509,9 @@ wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
<programlisting>wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"</programlisting>
- <para>The next step is to bring up the interface with the
- help of the <filename>rc.d</filename> facility:</para>
+ <para>The next step is to bring up the interface:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/netif start</userinput>
+ <screen>&prompt.root; <userinput>service netif start</userinput>
Starting wpa_supplicant.
DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 7
DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 15
@@ -1608,7 +1602,7 @@ ifconfig_wlan0="WPA DHCP"</programlisting>
<para>The next step is to bring up the interface:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/netif start</userinput>
+ <screen>&prompt.root; <userinput>service netif start</userinput>
Starting wpa_supplicant.
DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 7
DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 15
@@ -1720,7 +1714,7 @@ ifconfig_wlan0="WPA DHCP"</programlisting>
<para>Then we can bring up the interface:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/netif start</userinput>
+ <screen>&prompt.root; <userinput>service netif start</userinput>
Starting wpa_supplicant.
DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 7
DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 15
@@ -2091,7 +2085,7 @@ wpa_pairwise=CCMP TKIP <co id="co-ap-wpapsk-pwise"/></programlisting>
<para>The next step is to start
<application>hostapd</application>:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/hostapd forcestart</userinput></screen>
+ <screen>&prompt.root; <userinput>service hostapd forcestart</userinput></screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable></userinput>
wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 2290
@@ -2331,13 +2325,13 @@ ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3,
wMaxPacketSize=49, nframes=6, buffer size=294</screen>
- <para>The <filename>/etc/rc.d/bluetooth</filename> script
+ <para>&man.service.8;
is used to start and stop the Bluetooth stack. It is a good
idea to stop the stack before unplugging the device, but it is
not (usually) fatal. When starting the stack, you will
receive output similar to the following:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/bluetooth start ubt0</userinput>
+ <screen>&prompt.root; <userinput>service bluetooth start ubt0</userinput>
BD_ADDR: 00:02:72:00:d4:1a
Features: 0xff 0xff 0xf 00 00 00 00 00
&lt;3-Slot&gt; &lt;5-Slot&gt; &lt;Encryption&gt; &lt;Slot offset&gt;
@@ -2353,6 +2347,7 @@ Number of SCO packets: 8</screen>
<sect2>
<title>Host Controller Interface (HCI)</title>
+
<indexterm><primary>HCI</primary></indexterm>
<para>Host Controller Interface (HCI) provides a command
@@ -2687,7 +2682,7 @@ Bluetooth Profile Descriptor List:
<para>Then the <application>sdpd</application> daemon can be
started with:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/sdpd start</userinput></screen>
+ <screen>&prompt.root; <userinput>service sdpd start</userinput></screen>
<para>The local server application that wants to provide
Bluetooth service to the remote clients will register service
@@ -2776,7 +2771,7 @@ Bluetooth Profile Descriptor List:
<title>OBEX Object Push (OPUSH) Profile</title>
<indexterm><primary>OBEX</primary></indexterm>
- <para>OBEX is a widely used protocol for simple file transfers between
+ <para>OBEX is a widely used protocol for simple file transfers
between mobile devices. Its main use is in infrared
communication, where it is used for generic file transfers
between notebooks or PDAs, and for sending business cards or
@@ -2862,7 +2857,7 @@ rfcomm_sppd[94692]: Starting on /dev/ttyp6...</screen>
There is a HCI option to disable role switching on the local
side:</para>
- <screen>&prompt.root; <userinput>hccontrol -n ubt0hci write_node_role_switch 0</userinput></screen>
+ <screen>&prompt.root; <userinput>hccontrol -n ubt0hci write_node_role_switch 0</userinput></screen>
</sect3>
<sect3>
@@ -3480,7 +3475,7 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2</screen>
with the IP Address of
<replaceable>10.0.0.3/24</replaceable>:</para>
- <screen>&prompt.root; <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig <replaceable>fxp1</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> create </userinput>
&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> up laggproto lacp laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.3/24</replaceable></userinput></screen>
@@ -3546,7 +3541,7 @@ ifconfig_<literal>lagg<replaceable>0</replaceable></literal>="laggproto lacp lag
and assign an IP Address of
<replaceable>10.0.0.15/24</replaceable>:</para>
- <screen>&prompt.root; <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig <replaceable>fxp1</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> create</userinput>
&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> up laggproto failover laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.15/24</replaceable></userinput></screen>
@@ -3555,7 +3550,7 @@ ifconfig_<literal>lagg<replaceable>0</replaceable></literal>="laggproto lacp lag
differences will be the <acronym>MAC</acronym> address and
the device names:</para>
- <screen>&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal></userinput>
+ <screen>&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal></userinput>
lagg0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=8&lt;VLAN_MTU&gt;
ether 00:05:5d:71:8d:b8
@@ -3610,7 +3605,7 @@ ifconfig_<literal>lagg<replaceable>0</replaceable></literal>="laggproto failover
obtain the <acronym>MAC</acronym> address from the wired
interface:</para>
- <screen>&prompt.root; <userinput>ifconfig <replaceable>bge0</replaceable></userinput>
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>bge0</replaceable></userinput>
bge0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=19b&lt;RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4&gt;
ether 00:21:70:da:ae:37
@@ -3626,19 +3621,19 @@ bge0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
Now, we change the underlying wireless interface,
<replaceable>iwn0</replaceable>:</para>
- <screen>&prompt.root; <userinput>ifconfig <replaceable>iwn0</replaceable> ether <replaceable>00:21:70:da:ae:37</replaceable></userinput></screen>
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>iwn0</replaceable> ether <replaceable>00:21:70:da:ae:37</replaceable></userinput></screen>
- <para>Bring up the wireless interface but don't set up any IP
+ <para>Bring the wireless interface up, but do not set an IP
address on it:</para>
- <screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>iwn0</replaceable> ssid <replaceable>my_router</replaceable> up</userinput></screen>
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>wlan0</replaceable> create wlandev <replaceable>iwn0</replaceable> ssid <replaceable>my_router</replaceable> up</userinput></screen>
<para>Bring the <replaceable>bge0</replaceable> interface up.
Create the &man.lagg.4; interface with
<replaceable>bge0</replaceable> as master, and failover to
<replaceable>wlan0</replaceable> if necessary:</para>
- <screen>&prompt.root; <userinput>ifconfig <replaceable>bge0</replaceable> up</userinput>
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>bge0</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> create</userinput>
&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> up laggproto failover laggport <replaceable>bge0</replaceable> laggport <replaceable>wlan0</replaceable></userinput></screen>
@@ -3646,7 +3641,7 @@ bge0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
differences will be the <acronym>MAC</acronym> address and
the device names:</para>
- <screen>&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal></userinput>
+ <screen>&prompt.root; <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal></userinput>
lagg0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=8&lt;VLAN_MTU&gt;
ether 00:21:70:da:ae:37
@@ -4169,7 +4164,7 @@ margaux:ha=0123456789ab:tc=.def100</programlisting>
<filename>/etc/rc.conf</filename> file for this command
to execute correctly:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/inetd restart</userinput></screen>
+ <screen>&prompt.root; <userinput>service inetd restart</userinput></screen>
</step>
</procedure>
@@ -4208,7 +4203,7 @@ margaux:ha=0123456789ab:tc=.def100</programlisting>
<filename>/etc/rc.conf</filename> at the first step, you
probably want to reboot instead.</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/mountd restart</userinput></screen>
+ <screen>&prompt.root; <userinput>service mountd restart</userinput></screen>
</step>
</procedure>
</sect3>
@@ -4442,7 +4437,7 @@ cd /usr/src/etc; make distribution</programlisting>
<step>
<para>Restart the NFS server:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/nfsd restart</userinput></screen>
+ <screen>&prompt.root; <userinput>service nfsd restart</userinput></screen>
</step>
<step>
@@ -4460,7 +4455,7 @@ cd /usr/src/etc; make distribution</programlisting>
<step>
<para>Restart inetd:</para>
- <screen>&prompt.root; <userinput>/etc/rc.d/inetd restart</userinput></screen>
+ <screen>&prompt.root; <userinput>service inetd restart</userinput></screen>
</step>
<step>
@@ -4647,7 +4642,7 @@ myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro
severs can be on separate machines.</para>
<figure>
- <title>PXE Booting process with NFS root mount</title>
+ <title>PXE Booting Process with NFS Root Mount</title>
<mediaobjectco>
<imageobjectco>
@@ -4865,7 +4860,7 @@ Received 264951 bytes in 0.1 seconds</screen>
<para>The main advantage of using a TA to connect to an Internet
Provider is that you can do Dynamic PPP. As IP address space
becomes more and more scarce, most providers are not willing
- to provide you with a static IP anymore. Most stand-alone
+ to provide you with a static IP any more. Most stand-alone
routers are not able to accommodate dynamic IP
allocation.</para>
@@ -4921,9 +4916,10 @@ Received 264951 bytes in 0.1 seconds</screen>
stand-alone router, and with a simple 386 FreeBSD box driving
it, probably more flexible.</para>
- <para>The choice of synchronous card/TA v.s. stand-alone router
- is largely a religious issue. There has been some discussion
- of this in the mailing lists. We suggest you search the
+ <para>The choice of synchronous card/TA versus stand-alone
+ router is largely a religious issue. There has been some
+ discussion of this in the mailing lists. We suggest you
+ search the
<ulink url="&url.base;/search/index.html">archives</ulink> for
the complete discussion.</para>
</sect2>
@@ -5420,209 +5416,6 @@ redirect_port tcp 192.168.0.3:80 80</programlisting>
</sect2>
</sect1>
- <sect1 id="network-plip">
- <title>Parallel Line IP (PLIP)</title>
-
- <indexterm><primary>PLIP</primary></indexterm>
- <indexterm>
- <primary>Parallel Line IP</primary>
- <see>PLIP</see>
- </indexterm>
-
- <para>PLIP lets us run TCP/IP between parallel ports. It is
- useful on machines without network cards, or to install on
- laptops. In this section, we will discuss:</para>
-
- <itemizedlist>
- <listitem>
- <para>Creating a parallel (laplink) cable.</para>
- </listitem>
-
- <listitem>
- <para>Connecting two computers with PLIP.</para>
- </listitem>
- </itemizedlist>
-
- <sect2 id="network-create-parallel-cable">
- <title>Creating a Parallel Cable</title>
-
- <para>You can purchase a parallel cable at most computer supply
- stores. If you cannot do that, or you just want to know how
- it is done, the following table shows how to make one out of a
- normal parallel printer cable.</para>
-
- <table frame="none">
- <title>Wiring a Parallel Cable for Networking</title>
-
- <tgroup cols="5">
- <thead>
- <row>
- <entry>A-name</entry>
- <entry>A-End</entry>
- <entry>B-End</entry>
- <entry>Descr.</entry>
- <entry>Post/Bit</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><literallayout>DATA0
--ERROR</literallayout></entry>
- <entry><literallayout>2
-15</literallayout></entry>
- <entry><literallayout>15
-2</literallayout></entry>
- <entry>Data</entry>
- <entry><literallayout>0/0x01
-1/0x08</literallayout></entry>
- </row>
-
- <row>
- <entry><literallayout>DATA1
-+SLCT</literallayout></entry>
- <entry><literallayout>3
-13</literallayout></entry>
- <entry><literallayout>13
-3</literallayout></entry>
- <entry>Data</entry>
- <entry><literallayout>0/0x02
-1/0x10</literallayout></entry>
- </row>
-
- <row>
- <entry><literallayout>DATA2
-+PE</literallayout></entry>
- <entry><literallayout>4
-12</literallayout></entry>
- <entry><literallayout>12
-4</literallayout></entry>
- <entry>Data</entry>
- <entry><literallayout>0/0x04
-1/0x20</literallayout></entry>
- </row>
-
- <row>
- <entry><literallayout>DATA3
--ACK</literallayout></entry>
- <entry><literallayout>5
-10</literallayout></entry>
- <entry><literallayout>10
-5</literallayout></entry>
- <entry>Strobe</entry>
- <entry><literallayout>0/0x08
-1/0x40</literallayout></entry>
- </row>
-
- <row>
- <entry><literallayout>DATA4
-BUSY</literallayout></entry>
- <entry><literallayout>6
-11</literallayout></entry>
- <entry><literallayout>11
-6</literallayout></entry>
- <entry>Data</entry>
- <entry><literallayout>0/0x10
-1/0x80</literallayout></entry>
- </row>
-
- <row>
- <entry>GND</entry>
- <entry>18-25</entry>
- <entry>18-25</entry>
- <entry>GND</entry>
- <entry>-</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
-
- <sect2 id="network-plip-setup">
- <title>Setting Up PLIP</title>
-
- <para>First, you have to get a laplink cable. Then, confirm
- that both computers have a kernel with &man.lpt.4; driver
- support:</para>
-
- <screen>&prompt.root; <userinput>grep lp /var/run/dmesg.boot</userinput>
-lpt0: &lt;Printer&gt; on ppbus0
-lpt0: Interrupt-driven port</screen>
-
- <para>The parallel port must be an interrupt driven port, you
- should have lines similar to the following in your in the
- <filename>/boot/device.hints</filename> file:</para>
-
- <programlisting>hint.ppc.0.at="isa"
-hint.ppc.0.irq="7"</programlisting>
-
- <para>Then check if the kernel configuration file has a
- <literal>device plip</literal> line or if the
- <filename>plip.ko</filename> kernel module is loaded. In both
- cases the parallel networking interface should appear when you
- use the &man.ifconfig.8; command to display it:</para>
-
- <screen>&prompt.root; <userinput>ifconfig plip0</userinput>
-plip0: flags=8810&lt;POINTOPOINT,SIMPLEX,MULTICAST&gt; mtu 1500</screen>
-
- <para>Plug the laplink cable into the parallel interface on
- both computers.</para>
-
- <para>Configure the network interface parameters on both sites
- as <username>root</username>. For example, if you want to
- connect the host <hostid>host1</hostid> with another machine
- <hostid>host2</hostid>:</para>
-
- <programlisting> host1 &lt;-----&gt; host2
-IP Address 10.0.0.1 10.0.0.2</programlisting>
-
- <para>Configure the interface on <hostid>host1</hostid> by
- doing:</para>
-
- <screen>&prompt.root; <userinput>ifconfig plip0 10.0.0.1 10.0.0.2</userinput></screen>
-
- <para>Configure the interface on <hostid>host2</hostid> by
- doing:</para>
-
- <screen>&prompt.root; <userinput>ifconfig plip0 10.0.0.2 10.0.0.1</userinput></screen>
-
- <para>You now should have a working connection. Please read the
- manual pages &man.lp.4; and &man.lpt.4; for more
- details.</para>
-
- <para>You should also add both hosts to
- <filename>/etc/hosts</filename>:</para>
-
- <programlisting>127.0.0.1 localhost.my.domain localhost
-10.0.0.1 host1.my.domain host1
-10.0.0.2 host2.my.domain host2</programlisting>
-
- <para>To confirm the connection works, go to each host and ping
- the other. For example, on <hostid>host1</hostid>:</para>
-
- <screen>&prompt.root; <userinput>ifconfig plip0</userinput>
-plip0: flags=8851&lt;UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
- inet 10.0.0.1 --&gt; 10.0.0.2 netmask 0xff000000
-&prompt.root; <userinput>netstat -r</userinput>
-Routing tables
-
-Internet:
-Destination Gateway Flags Refs Use Netif Expire
-host2 host1 UH 0 0 plip0
-&prompt.root; <userinput>ping -c 4 host2</userinput>
-PING host2 (10.0.0.2): 56 data bytes
-64 bytes from 10.0.0.2: icmp_seq=0 ttl=255 time=2.774 ms
-64 bytes from 10.0.0.2: icmp_seq=1 ttl=255 time=2.530 ms
-64 bytes from 10.0.0.2: icmp_seq=2 ttl=255 time=2.556 ms
-64 bytes from 10.0.0.2: icmp_seq=3 ttl=255 time=2.714 ms
-
---- host2 ping statistics ---
-4 packets transmitted, 4 packets received, 0% packet loss
-round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
-
- </sect2>
- </sect1>
-
<sect1 id="network-ipv6">
<sect1info>
<authorgroup>
@@ -5665,7 +5458,7 @@ round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
<itemizedlist>
<listitem>
<para>Running out of addresses. Today this is not so much of
- a concern anymore since RFC1918 private address space
+ a concern any more, since RFC1918 private address space
(<hostid role="ipaddr">10.0.0.0/8</hostid>,
<hostid role="ipaddr">172.16.0.0/12</hostid>, and
<hostid role="ipaddr">192.168.0.0/16</hostid>) and Network
@@ -5871,7 +5664,7 @@ round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
<para>Often an address will have long substrings of all zeros
therefore one such substring per address can be abbreviated by
<quote>::</quote>. Also up to three leading <quote>0</quote>s
- per hexquad can be omitted. For example
+ per hexquad can be omitted. For example
<hostid role="ip6addr">fe80::1</hostid> corresponds to the
canonical form <hostid
role="ip6addr">fe80:0000:0000:0000:0000:0000:0000:0001</hostid>.</para>
@@ -5984,7 +5777,8 @@ round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
<para>To statically assign an IP address such as <hostid
role="ip6addr">2001:471:1f11:251:290:27ff:fee0:2093</hostid>,
to your <devicename>fxp0</devicename> interface, add the
- following for &os;&nbsp;9.<replaceable>x</replaceable>:</para>
+ following for
+ &os;&nbsp;9.<replaceable>x</replaceable>:</para>
<programlisting>ifconfig_fxp0_ipv6="inet6 2001:471:1f11:251:290:27ff:fee0:2093 prefixlen <replaceable>64</replaceable>"</programlisting>
@@ -6037,6 +5831,7 @@ round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
earlier, add:</para>
<programlisting>ipv6_ifconfig_gif0="<replaceable>MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR</replaceable>"</programlisting>
+
<para>Then all you have to do is set the default route for
IPv6. This is the other side of the IPv6 tunnel:</para>
@@ -6378,7 +6173,7 @@ route_hostD="192.168.173.4 hatm0 0 102 llc/snap ubr"</programlisting>
status of preemption suppression. Preemption can be
suppressed if link on an interface is down. A value of
<literal>0</literal>, means that preemption is not
- suppressed. Every problem increments this
+ suppressed. Every problem increments this
<acronym>OID</acronym>.</entry>
</row>
</tbody>
diff --git a/en_US.ISO8859-1/books/handbook/audit/chapter.xml b/en_US.ISO8859-1/books/handbook/audit/chapter.xml
index f8ed65c041..ae55c41d2a 100644
--- a/en_US.ISO8859-1/books/handbook/audit/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/audit/chapter.xml
@@ -44,18 +44,19 @@ requirements. -->
changes, and file and network access. These log records can be
invaluable for live system monitoring, intrusion detection, and
postmortem analysis. &os; implements &sun;'s published
- <acronym>BSM</acronym> API and file format, and is interoperable with
- both &sun;'s &solaris; and &apple;'s &macos; X audit implementations.</para>
+ <acronym>BSM</acronym> API and file format, and is interoperable
+ with both &sun;'s &solaris; and &apple;'s &macos; X audit
+ implementations.</para>
- <para>This chapter focuses on the installation and configuration of
- Event Auditing. It explains audit policies, and provides an example
- audit configuration.</para>
+ <para>This chapter focuses on the installation and configuration
+ of Event Auditing. It explains audit policies, and provides an
+ example audit configuration.</para>
<para>After reading this chapter, you will know:</para>
<itemizedlist>
<listitem>
- <para>What Event Auditing is and how it works.</para>
+ <para>What Event Auditing is and how it works.</para>
</listitem>
<listitem>
@@ -64,8 +65,8 @@ requirements. -->
</listitem>
<listitem>
- <para>How to review the audit trail using the audit reduction and
- review tools.</para>
+ <para>How to review the audit trail using the audit reduction
+ and review tools.</para>
</listitem>
</itemizedlist>
@@ -90,59 +91,60 @@ requirements. -->
</itemizedlist>
<warning>
- <para>The audit facility has some known limitations which include
- that not all security-relevant system events are currently auditable,
- and that some login mechanisms, such as X11-based display managers
- and third party daemons, do not properly configure auditing for user
- login sessions.</para>
-
- <para>The security event auditing facility is able to generate very
- detailed logs of system activity: on a busy system, trail file
- data can be very large when configured for high detail, exceeding
- gigabytes a week in some configurations. Administrators should take
- into account disk space requirements associated with high volume
- audit configurations. For example, it may be desirable to dedicate
- a file system to the <filename>/var/audit</filename> tree so that
- other file systems are not affected if the audit file system becomes
+ <para>The audit facility has some known limitations which
+ include that not all security-relevant system events are
+ currently auditable, and that some login mechanisms, such as
+ X11-based display managers and third party daemons, do not
+ properly configure auditing for user login sessions.</para>
+
+ <para>The security event auditing facility is able to generate
+ very detailed logs of system activity: on a busy system, trail
+ file data can be very large when configured for high detail,
+ exceeding gigabytes a week in some configurations.
+ Administrators should take into account disk space
+ requirements associated with high volume audit configurations.
+ For example, it may be desirable to dedicate a file system to
+ the <filename>/var/audit</filename> tree so that other file
+ systems are not affected if the audit file system becomes
full.</para>
</warning>
-
</sect1>
<sect1 id="audit-inline-glossary">
<title>Key Terms in This Chapter</title>
- <para>Before reading this chapter, a few key audit-related terms must be
- explained:</para>
+ <para>Before reading this chapter, a few key audit-related terms
+ must be explained:</para>
<itemizedlist>
<listitem>
- <para><emphasis>event</emphasis>: An auditable event is any event
- that can be logged using the audit subsystem.
+ <para><emphasis>event</emphasis>: An auditable event is any
+ event that can be logged using the audit subsystem.
Examples of security-relevant events include the creation of
- a file, the building of a network connection, or a user logging in.
- Events are either <quote>attributable</quote>,
+ a file, the building of a network connection, or a user
+ logging in. Events are either <quote>attributable</quote>,
meaning that they can be traced to an authenticated user, or
- <quote>non-attributable</quote> if they cannot be.
- Examples of non-attributable events are any events that occur
- before authentication in the login process, such as bad password
+ <quote>non-attributable</quote> if they cannot be. Examples
+ of non-attributable events are any events that occur before
+ authentication in the login process, such as bad password
attempts.</para>
</listitem>
<listitem>
- <para><emphasis>class</emphasis>: Event classes are named sets of
- related events, and are used in selection expressions. Commonly
- used classes of events include <quote>file creation</quote> (fc),
- <quote>exec</quote> (ex) and <quote>login_logout</quote>
- (lo).</para>
+ <para><emphasis>class</emphasis>: Event classes are named sets
+ of related events, and are used in selection expressions.
+ Commonly used classes of events include
+ <quote>file creation</quote> (fc), <quote>exec</quote> (ex)
+ and <quote>login_logout</quote> (lo).</para>
</listitem>
<listitem>
- <para><emphasis>record</emphasis>: A record is an audit log entry
- describing a security event. Records contain a record event type,
- information on the subject (user) performing the action,
- date and time information, information on any objects or
- arguments, and a success or failure condition.</para>
+ <para><emphasis>record</emphasis>: A record is an audit log
+ entry describing a security event. Records contain a record
+ event type, information on the subject (user) performing the
+ action, date and time information, information on any
+ objects or arguments, and a success or failure
+ condition.</para>
</listitem>
<listitem>
@@ -156,30 +158,31 @@ requirements. -->
<listitem>
<para><emphasis>selection expression</emphasis>: A selection
- expression is a string containing a list of prefixes and audit
- event class names used to match events.</para>
+ expression is a string containing a list of prefixes and
+ audit event class names used to match events.</para>
</listitem>
<listitem>
- <para><emphasis>preselection</emphasis>: The process by which the
- system identifies which events are of interest to the administrator
- in order to avoid generating audit records describing events that
- are not of interest. The preselection configuration
- uses a series of selection expressions to identify which classes
- of events to audit for which users, as well as global settings
- that apply to both authenticated and unauthenticated
- processes.</para>
+ <para><emphasis>preselection</emphasis>: The process by which
+ the system identifies which events are of interest to the
+ administrator in order to avoid generating audit records
+ describing events that are not of interest. The
+ preselection configuration uses a series of selection
+ expressions to identify which classes of events to audit for
+ which users, as well as global settings that apply to both
+ authenticated and unauthenticated processes.</para>
</listitem>
<listitem>
- <para><emphasis>reduction</emphasis>: The process by which records
- from existing audit trails are selected for preservation, printing,
- or analysis. Likewise, the process by which undesired audit
- records are removed from the audit trail. Using reduction,
- administrators can implement policies for the preservation of audit
- data. For example, detailed audit trails might be kept for one
- month, but after that, trails might be reduced in order to preserve
- only login information for archival purposes.</para>
+ <para><emphasis>reduction</emphasis>: The process by which
+ records from existing audit trails are selected for
+ preservation, printing, or analysis. Likewise, the process
+ by which undesired audit records are removed from the audit
+ trail. Using reduction, administrators can implement
+ policies for the preservation of audit data. For example,
+ detailed audit trails might be kept for one month, but after
+ that, trails might be reduced in order to preserve only
+ login information for archival purposes.</para>
</listitem>
</itemizedlist>
</sect1>
@@ -187,11 +190,11 @@ requirements. -->
<sect1 id="audit-install">
<title>Installing Audit Support</title>
- <para>User space support for Event Auditing is installed as part of the
- base &os; operating system. Kernel support for
- Event Auditing is compiled in by default, but support for this
- feature must be explicitly compiled into the custom kernel by adding
- the following line to the kernel configuration file:</para>
+ <para>User space support for Event Auditing is installed as part
+ of the base &os; operating system. Kernel support for Event
+ Auditing is compiled in by default, but support for this feature
+ must be explicitly compiled into the custom kernel by adding the
+ following line to the kernel configuration file:</para>
<programlisting>options AUDIT</programlisting>
@@ -199,24 +202,25 @@ requirements. -->
the kernel via the normal process explained in
<xref linkend="kernelconfig"/>.</para>
- <para>Once an audit-enabled kernel is built, installed, and the system
- has been rebooted, enable the audit daemon by adding the following line
- to &man.rc.conf.5;:</para>
+ <para>Once an audit-enabled kernel is built, installed, and the
+ system has been rebooted, enable the audit daemon by adding the
+ following line to &man.rc.conf.5;:</para>
<programlisting>auditd_enable="YES"</programlisting>
- <para>Audit support must then be started by a reboot, or by manually
- starting the audit daemon:</para>
+ <para>Audit support must then be started by a reboot, or by
+ manually starting the audit daemon:</para>
- <programlisting>/etc/rc.d/auditd start</programlisting>
+ <programlisting>service auditd start</programlisting>
</sect1>
<sect1 id="audit-config">
<title>Audit Configuration</title>
<para>All configuration files for security audit are found in
- <filename class="directory">/etc/security</filename>. The following
- files must be present before the audit daemon is started:</para>
+ <filename class="directory">/etc/security</filename>. The
+ following files must be present before the audit daemon is
+ started:</para>
<itemizedlist>
<listitem>
@@ -233,8 +237,8 @@ requirements. -->
<listitem>
<para><filename>audit_event</filename> - Textual names and
- descriptions of system audit events, as well as a list of which
- classes each event is in.</para>
+ descriptions of system audit events, as well as a list of
+ which classes each event is in.</para>
</listitem>
<listitem>
@@ -244,10 +248,11 @@ requirements. -->
</listitem>
<listitem>
- <para><filename>audit_warn</filename> - A customizable shell script
- used by <application>auditd</application> to generate warning messages in exceptional
- situations, such as when space for audit records is running low or
- when the audit trail file has been rotated.</para>
+ <para><filename>audit_warn</filename> - A customizable shell
+ script used by <application>auditd</application> to generate
+ warning messages in exceptional situations, such as when
+ space for audit records is running low or when the audit
+ trail file has been rotated.</para>
</listitem>
</itemizedlist>
@@ -260,70 +265,76 @@ requirements. -->
<sect2>
<title>Event Selection Expressions</title>
- <para>Selection expressions are used in a number of places in the
- audit configuration to determine which events should be audited.
- Expressions contain a list of event classes to match, each with
- a prefix indicating whether matching records should be accepted
- or ignored, and optionally to indicate if the entry is intended
- to match successful or failed operations. Selection expressions
- are evaluated from left to right, and two expressions are
- combined by appending one onto the other.</para>
+ <para>Selection expressions are used in a number of places in
+ the audit configuration to determine which events should be
+ audited. Expressions contain a list of event classes to match,
+ each with a prefix indicating whether matching records should
+ be accepted or ignored, and optionally to indicate if the
+ entry is intended to match successful or failed operations.
+ Selection expressions are evaluated from left to right, and
+ two expressions are combined by appending one onto the
+ other.</para>
- <para>The following list contains the default audit event classes
- present in <filename>audit_class</filename>:</para>
+ <para>The following list contains the default audit event
+ classes present in <filename>audit_class</filename>:</para>
<itemizedlist>
<listitem>
- <para><literal>all</literal> - <emphasis>all</emphasis> - Match all
- event classes.</para>
+ <para><literal>all</literal> - <emphasis>all</emphasis> -
+ Match all event classes.</para>
</listitem>
<listitem>
- <para><literal>ad</literal> - <emphasis>administrative</emphasis>
- - Administrative actions performed on the system as a
- whole.</para>
+ <para><literal>ad</literal> -
+ <emphasis>administrative</emphasis> - Administrative
+ actions performed on the system as a whole.</para>
</listitem>
<listitem>
- <para><literal>ap</literal> - <emphasis>application</emphasis> -
- Application defined action.</para>
+ <para><literal>ap</literal> -
+ <emphasis>application</emphasis> - Application defined
+ action.</para>
</listitem>
<listitem>
- <para><literal>cl</literal> - <emphasis>file close</emphasis> -
- Audit calls to the <function>close</function> system
- call.</para>
+ <para><literal>cl</literal> -
+ <emphasis>file close</emphasis> - Audit calls to the
+ <function>close</function> system call.</para>
</listitem>
<listitem>
- <para><literal>ex</literal> - <emphasis>exec</emphasis> - Audit
- program execution. Auditing of command line arguments and
- environmental variables is controlled via &man.audit.control.5;
- using the <literal>argv</literal> and <literal>envv</literal>
- parameters to the <literal>policy</literal> setting.</para>
+ <para><literal>ex</literal> - <emphasis>exec</emphasis> -
+ Audit program execution. Auditing of command line
+ arguments and environmental variables is controlled via
+ &man.audit.control.5; using the <literal>argv</literal>
+ and <literal>envv</literal> parameters to the
+ <literal>policy</literal> setting.</para>
</listitem>
<listitem>
- <para><literal>fa</literal> - <emphasis>file attribute access</emphasis>
- - Audit the access of object attributes such as
- &man.stat.1;, &man.pathconf.2; and similar events.</para>
+ <para><literal>fa</literal> -
+ <emphasis>file attribute access</emphasis> - Audit the
+ access of object attributes such as &man.stat.1;,
+ &man.pathconf.2; and similar events.</para>
</listitem>
<listitem>
- <para><literal>fc</literal> - <emphasis>file create</emphasis>
- - Audit events where a file is created as a result.</para>
+ <para><literal>fc</literal> -
+ <emphasis>file create</emphasis> - Audit events where a
+ file is created as a result.</para>
</listitem>
<listitem>
- <para><literal>fd</literal> - <emphasis>file delete</emphasis>
- - Audit events where file deletion occurs.</para>
+ <para><literal>fd</literal> -
+ <emphasis>file delete</emphasis> - Audit events where file
+ deletion occurs.</para>
</listitem>
<listitem>
- <para><literal>fm</literal> - <emphasis>file attribute modify</emphasis>
- - Audit events where file attribute modification occurs,
- such as &man.chown.8;, &man.chflags.1;, &man.flock.2;,
- etc.</para>
+ <para><literal>fm</literal> -
+ <emphasis>file attribute modify</emphasis> - Audit events
+ where file attribute modification occurs, such as
+ &man.chown.8;, &man.chflags.1;, &man.flock.2;, etc.</para>
</listitem>
<listitem>
@@ -333,36 +344,40 @@ requirements. -->
</listitem>
<listitem>
- <para><literal>fw</literal> - <emphasis>file write</emphasis> -
- Audit events in which data is written, files are written
- or modified, etc.</para>
+ <para><literal>fw</literal> -
+ <emphasis>file write</emphasis> - Audit events in which
+ data is written, files are written or modified,
+ etc.</para>
</listitem>
<listitem>
- <para><literal>io</literal> - <emphasis>ioctl</emphasis> - Audit
- use of the &man.ioctl.2; system call.</para>
+ <para><literal>io</literal> - <emphasis>ioctl</emphasis> -
+ Audit use of the &man.ioctl.2; system call.</para>
</listitem>
<listitem>
- <para><literal>ip</literal> - <emphasis>ipc</emphasis> - Audit
- various forms of Inter-Process Communication, including POSIX
- pipes and System V <acronym>IPC</acronym> operations.</para>
+ <para><literal>ip</literal> - <emphasis>ipc</emphasis> -
+ Audit various forms of Inter-Process Communication,
+ including POSIX pipes and System V <acronym>IPC</acronym>
+ operations.</para>
</listitem>
<listitem>
- <para><literal>lo</literal> - <emphasis>login_logout</emphasis> -
- Audit &man.login.1; and &man.logout.1; events occurring
- on the system.</para>
+ <para><literal>lo</literal> -
+ <emphasis>login_logout</emphasis> - Audit &man.login.1;
+ and &man.logout.1; events occurring on the system.</para>
</listitem>
<listitem>
- <para><literal>na</literal> - <emphasis>non attributable</emphasis> -
- Audit non-attributable events.</para>
+ <para><literal>na</literal> -
+ <emphasis>non attributable</emphasis> - Audit
+ non-attributable events.</para>
</listitem>
<listitem>
- <para><literal>no</literal> - <emphasis>invalid class</emphasis> -
- Match no audit events.</para>
+ <para><literal>no</literal> -
+ <emphasis>invalid class</emphasis> - Match no audit
+ events.</para>
</listitem>
<listitem>
@@ -384,19 +399,19 @@ requirements. -->
</itemizedlist>
- <para>These audit event classes may be customized by modifying the
- <filename>audit_class</filename> and
+ <para>These audit event classes may be customized by modifying
+ the <filename>audit_class</filename> and
<filename>audit_event</filename> configuration files.</para>
<para>Each audit class in the list is combined with a prefix
- indicating whether successful/failed operations are matched, and
- whether the entry is adding or removing matching for the class
- and type.</para>
+ indicating whether successful/failed operations are matched,
+ and whether the entry is adding or removing matching for the
+ class and type.</para>
<itemizedlist>
<listitem>
- <para>(none) Audit both successful and failed instances of the
- event.</para>
+ <para>(none) Audit both successful and failed instances of
+ the event.</para>
</listitem>
<listitem>
@@ -410,45 +425,44 @@ requirements. -->
</listitem>
<listitem>
- <para><literal>^</literal> Audit neither successful nor failed
- events in this class.</para>
+ <para><literal>^</literal> Audit neither successful nor
+ failed events in this class.</para>
</listitem>
<listitem>
- <para><literal>^+</literal> Do not audit successful events in this
- class.</para>
+ <para><literal>^+</literal> Do not audit successful events
+ in this class.</para>
</listitem>
<listitem>
- <para><literal>^-</literal> Do not audit failed events in this
- class.</para>
+ <para><literal>^-</literal> Do not audit failed events in
+ this class.</para>
</listitem>
-
</itemizedlist>
- <para>The following example selection string selects both successful
- and failed login/logout events, but only successful execution
- events:</para>
+ <para>The following example selection string selects both
+ successful and failed login/logout events, but only successful
+ execution events:</para>
<programlisting>lo,+ex</programlisting>
-
</sect2>
<sect2>
<title>Configuration Files</title>
- <para>In most cases, administrators will need to modify only two files
- when configuring the audit system: <filename>audit_control</filename>
- and <filename>audit_user</filename>. The first controls system-wide
- audit properties and policies; the second may be used to fine-tune
- auditing by user.</para>
+ <para>In most cases, administrators will need to modify only two
+ files when configuring the audit system:
+ <filename>audit_control</filename> and
+ <filename>audit_user</filename>. The first controls
+ system-wide audit properties and policies; the second may be
+ used to fine-tune auditing by user.</para>
<sect3 id="audit-auditcontrol">
- <title>The <filename>audit_control</filename> File</title>
+ <title>The <filename>audit_control</filename> File</title>
- <para>The <filename>audit_control</filename> file specifies a number
- of defaults for the audit subsystem. Viewing the contents of this
- file, we see the following:</para>
+ <para>The <filename>audit_control</filename> file specifies a
+ number of defaults for the audit subsystem. Viewing the
+ contents of this file, we see the following:</para>
<programlisting>dir:/var/audit
flags:lo
@@ -457,71 +471,73 @@ naflags:lo
policy:cnt
filesz:0</programlisting>
- <para>The <option>dir</option> option is used to set one or more
- directories where audit logs will be stored. If more than one
- directory entry appears, they will be used in order as they fill.
- It is common to configure audit so that audit logs are stored on
- a dedicated file system, in order to prevent interference between
- the audit subsystem and other subsystems if the file system fills.
- </para>
+ <para>The <option>dir</option> option is used to set one or
+ more directories where audit logs will be stored. If more
+ than one directory entry appears, they will be used in order
+ as they fill. It is common to configure audit so that audit
+ logs are stored on a dedicated file system, in order to
+ prevent interference between the audit subsystem and other
+ subsystems if the file system fills.</para>
- <para>The <option>flags</option> field sets the system-wide default
- preselection mask for attributable events. In the example above,
- successful and failed login and logout events are audited for all
- users.</para>
+ <para>The <option>flags</option> field sets the system-wide
+ default preselection mask for attributable events. In the
+ example above, successful and failed login and logout events
+ are audited for all users.</para>
<para>The <option>minfree</option> option defines the minimum
- percentage of free space for the file system where the audit trail
- is stored. When this threshold is exceeded, a warning will be
- generated. The above example sets the minimum free space to
- twenty percent.</para>
-
- <para>The <option>naflags</option> option specifies audit classes to
- be audited for non-attributed events, such as the login process
- and system daemons.</para>
-
- <para>The <option>policy</option> option specifies a comma-separated
- list of policy flags controlling various aspects of audit
- behavior. The default <literal>cnt</literal> flag indicates that
- the system should continue running despite an auditing failure
- (this flag is highly recommended). Another commonly used flag is
- <literal>argv</literal>, which causes command line arguments to
- the &man.execve.2; system call to be audited as part of command
- execution.</para>
-
- <para>The <option>filesz</option> option specifies the maximum size
- in bytes to allow an audit trail file to grow to before
+ percentage of free space for the file system where the audit
+ trail is stored. When this threshold is exceeded, a warning
+ will be generated. The above example sets the minimum free
+ space to twenty percent.</para>
+
+ <para>The <option>naflags</option> option specifies audit
+ classes to be audited for non-attributed events, such as the
+ login process and system daemons.</para>
+
+ <para>The <option>policy</option> option specifies a
+ comma-separated list of policy flags controlling various
+ aspects of audit behavior. The default
+ <literal>cnt</literal> flag indicates that the system should
+ continue running despite an auditing failure (this flag is
+ highly recommended). Another commonly used flag is
+ <literal>argv</literal>, which causes command line arguments
+ to the &man.execve.2; system call to be audited as part of
+ command execution.</para>
+
+ <para>The <option>filesz</option> option specifies the maximum
+ size in bytes to allow an audit trail file to grow to before
automatically terminating and rotating the trail file. The
- default, 0, disables automatic log rotation. If the requested
- file size is non-zero and below the minimum 512k, it will be
- ignored and a log message will be generated.</para>
+ default, 0, disables automatic log rotation. If the
+ requested file size is non-zero and below the minimum 512k,
+ it will be ignored and a log message will be
+ generated.</para>
</sect3>
<sect3 id="audit-audituser">
<title>The <filename>audit_user</filename> File</title>
<para>The <filename>audit_user</filename> file permits the
- administrator to specify further audit requirements for specific
- users.
- Each line configures auditing for a user via two fields: the
- first is the <literal>alwaysaudit</literal> field, which specifies
- a set of events that should always be audited for the user, and
+ administrator to specify further audit requirements for
+ specific users. Each line configures auditing for a user
+ via two fields: the first is the
+ <literal>alwaysaudit</literal> field, which specifies a set
+ of events that should always be audited for the user, and
the second is the <literal>neveraudit</literal> field, which
- specifies a set of events that should never be audited for the
- user.</para>
-
- <para>The following example <filename>audit_user</filename> file
- audits login/logout events and successful command execution for
- the <username>root</username> user, and audits file creation and successful command
- execution for the <username>www</username> user.
- If used with the example <filename>audit_control</filename> file
- above, the <literal>lo</literal> entry for <username>root</username>
- is redundant, and login/logout events will also be audited for the
- <username>www</username> user.</para>
+ specifies a set of events that should never be audited for
+ the user.</para>
+
+ <para>The following example <filename>audit_user</filename>
+ file audits login/logout events and successful command
+ execution for the <username>root</username> user, and audits
+ file creation and successful command execution for the
+ <username>www</username> user. If used with the example
+ <filename>audit_control</filename> file above, the
+ <literal>lo</literal> entry for <username>root</username> is
+ redundant, and login/logout events will also be audited for
+ the <username>www</username> user.</para>
<programlisting>root:lo,+ex:no
www:fc,+ex:no</programlisting>
-
</sect3>
</sect2>
</sect1>
@@ -532,29 +548,32 @@ www:fc,+ex:no</programlisting>
<sect2>
<title>Viewing Audit Trails</title>
- <para>Audit trails are stored in the BSM binary format, so tools must
- be used to modify or convert to text. The &man.praudit.1;
- command converts trail files to a simple text format; the
- &man.auditreduce.1; command may be used to reduce the
- audit trail file for analysis, archiving, or printing purposes.
- <command>auditreduce</command> supports a variety of selection
- parameters, including event type, event class, user, date or time of
- the event, and the file path or object acted on.</para>
+ <para>Audit trails are stored in the BSM binary format, so tools
+ must be used to modify or convert to text. The
+ &man.praudit.1; command converts trail files to a simple text
+ format; the &man.auditreduce.1; command may be used to reduce
+ the audit trail file for analysis, archiving, or printing
+ purposes. <command>auditreduce</command> supports a variety
+ of selection parameters, including event type, event class,
+ user, date or time of the event, and the file path or object
+ acted on.</para>
- <para>For example, the <command>praudit</command> utility will dump
- the entire contents of a specified audit log in plain text:</para>
+ <para>For example, the <command>praudit</command> utility will
+ dump the entire contents of a specified audit log in plain
+ text:</para>
<screen>&prompt.root; <userinput>praudit /var/audit/AUDITFILE</userinput></screen>
- <para>Where <filename><replaceable>AUDITFILE</replaceable></filename> is the audit log to
- dump.</para>
+ <para>Where
+ <filename><replaceable>AUDITFILE</replaceable></filename> is
+ the audit log to dump.</para>
- <para>Audit trails consist of a series of audit records made up of
- tokens, which <command>praudit</command> prints sequentially one per
- line. Each token is of a specific type, such as
- <literal>header</literal> holding an audit record header, or
- <literal>path</literal> holding a file path from a name
- lookup. The following is an example of an
+ <para>Audit trails consist of a series of audit records made up
+ of tokens, which <command>praudit</command> prints
+ sequentially one per line. Each token is of a specific type,
+ such as <literal>header</literal> holding an audit record
+ header, or <literal>path</literal> holding a file path from a
+ name lookup. The following is an example of an
<literal>execve</literal> event:</para>
<programlisting>header,133,10,execve(2),0,Mon Sep 25 15:58:03 2006, + 384 msec
@@ -565,112 +584,124 @@ subject,robert,root,wheel,root,wheel,38439,38032,42086,128.232.9.100
return,success,0
trailer,133</programlisting>
- <para>This audit represents a successful <literal>execve</literal>
- call, in which the command <literal>finger doug</literal> has been run. The
- arguments token contains both the processed command line presented
- by the shell to the kernel. The <literal>path</literal> token holds the path to the
- executable as looked up by the kernel. The <literal>attribute</literal> token
- describes the binary, and in particular, includes the file mode
- which can be used to determine if the application was setuid.
- The <literal>subject</literal> token describes the subject process, and stores in
- sequence the audit user ID, effective user ID and group ID, real
- user ID and group ID, process ID, session ID, port ID, and login
- address. Notice that the audit user ID and real user ID differ:
- the user <username>robert</username> has switched to the
- <username>root</username> account before running this command, but
- it is audited using the original authenticated user. Finally, the
- <literal>return</literal> token indicates the successful execution, and the <literal>trailer</literal>
+ <para>This audit represents a successful
+ <literal>execve</literal> call, in which the command
+ <literal>finger doug</literal> has been run. The arguments
+ token contains both the processed command line presented by
+ the shell to the kernel. The <literal>path</literal> token
+ holds the path to the executable as looked up by the kernel.
+ The <literal>attribute</literal> token describes the binary,
+ and in particular, includes the file mode which can be used to
+ determine if the application was setuid. The
+ <literal>subject</literal> token describes the subject
+ process, and stores in sequence the audit user ID, effective
+ user ID and group ID, real user ID and group ID, process ID,
+ session ID, port ID, and login address. Notice that the audit
+ user ID and real user ID differ: the user
+ <username>robert</username> has switched to the
+ <username>root</username> account before running this command,
+ but it is audited using the original authenticated user.
+ Finally, the <literal>return</literal> token indicates the
+ successful execution, and the <literal>trailer</literal>
concludes the record.</para>
<para><command>praudit</command> also supports
an XML output format, which can be selected using the
<option>-x</option> argument.</para>
-
</sect2>
<sect2>
<title>Reducing Audit Trails</title>
<para>Since audit logs may be very large, an administrator will
- likely want to select a subset of records for using, such as records
- associated with a specific user:</para>
+ likely want to select a subset of records for using, such as
+ records associated with a specific user:</para>
<screen>&prompt.root; <userinput>auditreduce -u trhodes /var/audit/AUDITFILE | praudit</userinput></screen>
<para>This will select all audit records produced for the user
<username>trhodes</username> stored in the
- <filename><replaceable>AUDITFILE</replaceable></filename> file.</para>
+ <filename><replaceable>AUDITFILE</replaceable></filename>
+ file.</para>
</sect2>
<sect2>
<title>Delegating Audit Review Rights</title>
- <para>Members of the <groupname>audit</groupname> group are given
- permission to read audit trails in <filename>/var/audit</filename>;
- by default, this group is empty, so only the <username>root</username> user may read
- audit trails. Users may be added to the <groupname>audit</groupname>
- group in order to delegate audit review rights to the user. As
- the ability to track audit log contents provides significant insight
- into the behavior of users and processes, it is recommended that the
- delegation of audit review rights be performed with caution.</para>
+ <para>Members of the <groupname>audit</groupname> group are
+ given permission to read audit trails in
+ <filename>/var/audit</filename>; by default, this group is
+ empty, so only the <username>root</username> user may read
+ audit trails. Users may be added to the
+ <groupname>audit</groupname> group in order to delegate audit
+ review rights to the user. As the ability to track audit log
+ contents provides significant insight into the behavior of
+ users and processes, it is recommended that the delegation of
+ audit review rights be performed with caution.</para>
</sect2>
<sect2>
<title>Live Monitoring Using Audit Pipes</title>
- <para>Audit pipes are cloning pseudo-devices in the device file system
- which allow applications to tap the live audit record stream. This
- is primarily of interest to authors of intrusion detection and
- system monitoring applications. However, for the administrator the
- audit pipe device is a convenient way to allow live monitoring
- without running into problems with audit trail file ownership or
- log rotation interrupting the event stream. To track the live audit
- event stream, use the following command line:</para>
+ <para>Audit pipes are cloning pseudo-devices in the device file
+ system which allow applications to tap the live audit record
+ stream. This is primarily of interest to authors of intrusion
+ detection and system monitoring applications. However, for
+ the administrator the audit pipe device is a convenient way to
+ allow live monitoring without running into problems with audit
+ trail file ownership or log rotation interrupting the event
+ stream. To track the live audit event stream, use the
+ following command line:</para>
<screen>&prompt.root; <userinput>praudit /dev/auditpipe</userinput></screen>
- <para>By default, audit pipe device nodes are accessible only to the
- <username>root</username> user. To make them accessible to the members of the
- <groupname>audit</groupname> group, add a <literal>devfs</literal> rule
- to <filename>devfs.rules</filename>:</para>
+ <para>By default, audit pipe device nodes are accessible only to
+ the <username>root</username> user. To make them accessible
+ to the members of the <groupname>audit</groupname> group, add
+ a <literal>devfs</literal> rule to
+ <filename>devfs.rules</filename>:</para>
<programlisting>add path 'auditpipe*' mode 0440 group audit</programlisting>
- <para>See &man.devfs.rules.5; for more information on configuring
- the devfs file system.</para>
+ <para>See &man.devfs.rules.5; for more information on
+ configuring the devfs file system.</para>
<warning>
- <para>It is easy to produce audit event feedback cycles, in which
- the viewing of each audit event results in the generation of more
- audit events. For example, if all network I/O is audited, and
- &man.praudit.1; is run from an SSH session, then a continuous stream of
- audit events will be generated at a high rate, as each event
- being printed will generate another event. It is advisable to run
- <command>praudit</command> on an audit pipe device from sessions without fine-grained
- I/O auditing in order to avoid this happening.</para>
+ <para>It is easy to produce audit event feedback cycles, in
+ which the viewing of each audit event results in the
+ generation of more audit events. For example, if all
+ network I/O is audited, and &man.praudit.1; is run from an
+ SSH session, then a continuous stream of audit events will
+ be generated at a high rate, as each event being printed
+ will generate another event. It is advisable to run
+ <command>praudit</command> on an audit pipe device from
+ sessions without fine-grained I/O auditing in order to avoid
+ this happening.</para>
</warning>
</sect2>
<sect2>
<title>Rotating Audit Trail Files</title>
- <para>Audit trails are written to only by the kernel, and managed only
- by the audit daemon, <application>auditd</application>. Administrators
- should not attempt to use &man.newsyslog.conf.5; or other tools to
- directly rotate audit logs. Instead, the <command>audit</command>
- management tool may be used to shut down auditing, reconfigure the
- audit system, and perform log rotation. The following command causes
- the audit daemon to create a new audit log and signal the kernel to
- switch to using the new log. The old log will be terminated and
+ <para>Audit trails are written to only by the kernel, and
+ managed only by the audit daemon,
+ <application>auditd</application>. Administrators should not
+ attempt to use &man.newsyslog.conf.5; or other tools to
+ directly rotate audit logs. Instead, the
+ <command>audit</command> management tool may be used to shut
+ down auditing, reconfigure the audit system, and perform log
+ rotation. The following command causes the audit daemon to
+ create a new audit log and signal the kernel to switch to
+ using the new log. The old log will be terminated and
renamed, at which point it may then be manipulated by the
administrator.</para>
<screen>&prompt.root; <userinput>audit -n</userinput></screen>
<warning>
- <para>If the <application>auditd</application> daemon is not currently
- running, this command will fail and an error message will be
- produced.</para>
+ <para>If the <application>auditd</application> daemon is not
+ currently running, this command will fail and an error
+ message will be produced.</para>
</warning>
<para>Adding the following line to
@@ -682,23 +713,24 @@ trailer,133</programlisting>
<para>The change will take effect once you have saved the
new <filename>/etc/crontab</filename>.</para>
- <para>Automatic rotation of the audit trail file based on file size is
- possible via the <option>filesz</option> option in
- &man.audit.control.5;, and is described in the configuration files
- section of this chapter.</para>
+ <para>Automatic rotation of the audit trail file based on file
+ size is possible via the <option>filesz</option> option in
+ &man.audit.control.5;, and is described in the configuration
+ files section of this chapter.</para>
</sect2>
<sect2>
<title>Compressing Audit Trails</title>
- <para>As audit trail files can become very large, it is often desirable
- to compress or otherwise archive trails once they have been closed by
- the audit daemon. The <filename>audit_warn</filename> script can be
- used to perform customized operations for a variety of audit-related
- events, including the clean termination of audit trails when they are
+ <para>As audit trail files can become very large, it is often
+ desirable to compress or otherwise archive trails once they
+ have been closed by the audit daemon. The
+ <filename>audit_warn</filename> script can be used to perform
+ customized operations for a variety of audit-related events,
+ including the clean termination of audit trails when they are
rotated. For example, the following may be added to the
- <filename>audit_warn</filename> script to compress audit trails on
- close:</para>
+ <filename>audit_warn</filename> script to compress audit
+ trails on close:</para>
<programlisting>#
# Compress audit trail files on close.
@@ -707,11 +739,12 @@ if [ "$1" = closefile ]; then
gzip -9 $2
fi</programlisting>
- <para>Other archiving activities might include copying trail files to
- a centralized server, deleting old trail files, or reducing the audit
- trail to remove unneeded records. The script will be run only when
- audit trail files are cleanly terminated, so will not be run on
- trails left unterminated following an improper shutdown.</para>
+ <para>Other archiving activities might include copying trail
+ files to a centralized server, deleting old trail files, or
+ reducing the audit trail to remove unneeded records. The
+ script will be run only when audit trail files are cleanly
+ terminated, so will not be run on trails left unterminated
+ following an improper shutdown.</para>
</sect2>
</sect1>
</chapter>
diff --git a/en_US.ISO8859-1/books/handbook/basics/chapter.xml b/en_US.ISO8859-1/books/handbook/basics/chapter.xml
index 2b45e4a68d..23dde1ae1f 100644
--- a/en_US.ISO8859-1/books/handbook/basics/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/basics/chapter.xml
@@ -9,7 +9,7 @@
<chapterinfo>
<authorgroup>
<author>
- <firstname>Chris</firstname>
+ <firstname>Chris</firstname>
<surname>Shumway</surname>
<contrib>Rewritten by </contrib>
</author>
@@ -22,226 +22,191 @@
<sect1 id="basics-synopsis">
<title>Synopsis</title>
- <para>The following chapter will cover the basic commands and
- functionality of the FreeBSD operating system. Much of this
- material is relevant for any &unix;-like operating system. Feel
- free to skim over this chapter if you are familiar with the
- material. If you are new to FreeBSD, then you will definitely
- want to read through this chapter carefully.</para>
+ <para>This chapter covers the basic commands and functionality of
+ the &os; operating system. Much of this material is relevant
+ for any &unix;-like operating system. New &os; users are
+ encouraged to read through this chapter carefully.</para>
<para>After reading this chapter, you will know:</para>
<itemizedlist>
<listitem>
- <para>How to use the <quote>virtual consoles</quote> of
- FreeBSD.</para>
+ <para>How to use the <quote>virtual consoles</quote> of
+ &os;.</para>
</listitem>
+
<listitem>
- <para>How &unix; file permissions work along with
- understanding file flags in &os;.</para>
+ <para>How &unix; file permissions and &os; file flags
+ work.</para>
</listitem>
+
<listitem>
<para>The default &os; file system layout.</para>
</listitem>
+
<listitem>
<para>The &os; disk organization.</para>
</listitem>
+
<listitem>
<para>How to mount and unmount file systems.</para>
</listitem>
+
<listitem>
<para>What processes, daemons, and signals are.</para>
</listitem>
+
<listitem>
<para>What a shell is, and how to change your default login
- environment.</para>
+ environment.</para>
</listitem>
+
<listitem>
<para>How to use basic text editors.</para>
</listitem>
+
<listitem>
<para>What devices and device nodes are.</para>
</listitem>
+
<listitem>
<para>What binary format is used under &os;.</para>
</listitem>
+
<listitem>
<para>How to read manual pages for more information.</para>
</listitem>
</itemizedlist>
-
</sect1>
<sect1 id="consoles">
<title>Virtual Consoles and Terminals</title>
+
<indexterm><primary>virtual consoles</primary></indexterm>
<indexterm><primary>terminals</primary></indexterm>
- <para>FreeBSD can be used in various ways. One of them is typing commands
- to a text terminal. A lot of the flexibility and power of a &unix;
- operating system is readily available at your hands when using FreeBSD
- this way. This section describes what <quote>terminals</quote> and
- <quote>consoles</quote> are, and how you can use them in FreeBSD.</para>
+ <para>&os; can be used in various ways. One of them is typing
+ commands to a text terminal. A lot of the flexibility and power
+ of a &unix; operating system is readily available at your hands
+ when using &os; this way. This section describes what
+ <quote>terminals</quote> and <quote>consoles</quote> are, and
+ how you can use them in &os;.</para>
<sect2 id="consoles-intro">
<title>The Console</title>
- <indexterm><primary>console</primary></indexterm>
-
- <para>If you have not configured FreeBSD to automatically start a
- graphical environment during startup, the system will present you with
- a login prompt after it boots, right after the startup scripts finish
- running. You will see something similar to:</para>
- <screen>Additional ABI support:.
-Local package initialization:.
-Additional TCP options:.
+ <indexterm><primary>console</primary></indexterm>
-Fri Sep 20 13:01:06 EEST 2002
+ <para>Unless &os; has been configured to automatically start
+ a graphical environment during startup, the system will boot
+ into a command line login prompt, as seen in this
+ example:</para>
-FreeBSD/i386 (pc3.example.org) (ttyv0)
+ <screen>FreeBSD/amd64 (pc3.example.org) (ttyv0)
login:</screen>
- <para>The messages might be a bit different on your system, but you will
- see something similar. The last two lines are what we are interested
- in right now. The second last line reads:</para>
-
- <programlisting>FreeBSD/i386 (pc3.example.org) (ttyv0)</programlisting>
-
- <para>This line contains some bits of information about the system you
- have just booted. You are looking at a <quote>FreeBSD</quote>
- console, running on an Intel or compatible processor of the x86
- architecture<footnote>
- <para>This is what <literal>i386</literal> means. Note that even if
- you are not running FreeBSD on an Intel 386 CPU, this is going to
- be <literal>i386</literal>. It is not the type of your processor,
- but the processor <quote>architecture</quote> that is shown
- here.</para>
- </footnote>. The name of this machine (every &unix; machine has a
- name) is <hostid>pc3.example.org</hostid>, and you are now looking
- at its system console&mdash;the <devicename>ttyv0</devicename>
- terminal.</para>
-
- <para>Finally, the last line is always:</para>
-
- <programlisting>login:</programlisting>
-
- <para>This is the part where you are supposed to type in your
- <quote>username</quote> to log into FreeBSD. The next section
- describes how you can do this.</para>
+ <para>The first line contains some information about the
+ system. The <literal>amd64</literal> indicates that the
+ system in this example is running a 64-bit version of &os;.
+ The hostname is <hostid>pc3.example.org</hostid>, and
+ <devicename>ttyv0</devicename> indicates that this is the
+ system console.</para>
+
+ <para>The second line is the login prompt. The next section
+ describes how to log into &os; at this prompt.</para>
</sect2>
<sect2 id="consoles-login">
- <title>Logging into FreeBSD</title>
+ <title>Logging into &os;</title>
- <para>FreeBSD is a multiuser, multiprocessing system. This is
- the formal description that is usually given to a system that can be
- used by many different people, who simultaneously run a lot of
- programs on a single machine.</para>
+ <para>&os; is a multiuser, multiprocessing system. This is
+ the formal description that is usually given to a system that
+ can be used by many different people, who simultaneously run a
+ lot of programs on a single machine.</para>
<para>Every multiuser system needs some way to distinguish one
- <quote>user</quote> from the rest. In FreeBSD (and all the
- &unix;-like operating systems), this is accomplished by requiring that
- every user must <quote>log into</quote> the system before being able
- to run programs. Every user has a unique name (the
- <quote>username</quote>) and a personal, secret key (the
- <quote>password</quote>). FreeBSD will ask for these two before
- allowing a user to run any programs.</para>
+ <quote>user</quote> from the rest. In &os; (and all the
+ &unix;-like operating systems), this is accomplished by
+ requiring that every user must <quote>log into</quote> the
+ system before being able to run programs. Every user has a
+ unique name (the <quote>username</quote>) and a personal,
+ secret key (the <quote>password</quote>). &os; will ask
+ for these two before allowing a user to run any
+ programs.</para>
<indexterm><primary>startup scripts</primary></indexterm>
- <para>Right after FreeBSD boots and finishes running its startup
- scripts<footnote>
- <para>Startup scripts are programs that are run automatically by
- FreeBSD when booting. Their main function is to set things up for
- everything else to run, and start any services that you have
- configured to run in the background doing useful things.</para>
- </footnote>, it will present you with a prompt and ask for a valid
- username:</para>
+ <para>When a &os; system boots, startup scripts are
+ automatically executed in order to prepare the system and to
+ start any services which have been configured to start at
+ system boot. Once the system finishes running its startup
+ scripts, it will present a login prompt:</para>
<screen>login:</screen>
- <para>For the sake of this example, let us assume that your username is
- <username>john</username>. Type <literal>john</literal> at this prompt and press
- <keycap>Enter</keycap>. You should then be presented with a prompt to
- enter a <quote>password</quote>:</para>
-
- <screen>login: <userinput>john</userinput>
-Password:</screen>
-
- <para>Type in <username>john</username>'s password now, and press
- <keycap>Enter</keycap>. The password is <emphasis>not
- echoed!</emphasis> You need not worry about this right now. Suffice
- it to say that it is done for security reasons.</para>
-
- <para>If you have typed your password correctly, you should by now be
- logged into FreeBSD and ready to try out all the available
- commands.</para>
-
- <para>You should see the <acronym>MOTD</acronym> or message of
- the day followed by a command prompt (a <literal>#</literal>,
- <literal>$</literal>, or <literal>%</literal> character). This
- indicates you have successfully logged into FreeBSD.</para>
+ <para>Type the username that was configured during <link
+ linkend="bsdinstall-addusers">system installation</link> and
+ press <keycap>Enter</keycap>. Then enter the password
+ associated with the username and press <keycap>Enter</keycap>.
+ The password is <emphasis>not echoed</emphasis> for security
+ reasons.</para>
+
+ <para>Once the correct password is input, the message of
+ the day (<acronym>MOTD</acronym>) will be displayed followed
+ by a command prompt (a <literal>#</literal>,
+ <literal>$</literal>, or <literal>%</literal> character). You
+ are now logged into the &os; console and ready to try the
+ available commands.</para>
</sect2>
<sect2 id="consoles-virtual">
- <title>Multiple Consoles</title>
-
- <para>Running &unix; commands in one console is fine, but FreeBSD can
- run many programs at once. Having one console where commands can be
- typed would be a bit of a waste when an operating system like FreeBSD
- can run dozens of programs at the same time. This is where
- <quote>virtual consoles</quote> can be very helpful.</para>
-
- <para>FreeBSD can be configured to present you with many different
- virtual consoles. You can switch from one of them to any other
- virtual console by pressing a couple of keys on your keyboard. Each
- console has its own different output channel, and FreeBSD takes care
- of properly redirecting keyboard input and monitor output as you
- switch from one virtual console to the next.</para>
-
- <para>Special key combinations have been reserved by FreeBSD for
- switching consoles<footnote>
- <para>A fairly technical and accurate description of all the details
- of the FreeBSD console and keyboard drivers can be found in the
- manual pages of &man.syscons.4;, &man.atkbd.4;, &man.vidcontrol.1;
- and &man.kbdcontrol.1;. We will not expand on the details here,
- but the interested reader can always consult the manual pages for
- a more detailed and thorough explanation of how things
- work.</para>
- </footnote>. You can use
+ <title>Virtual Consoles</title>
+
+ <para>&os; can be configured to provide many virtual consoles
+ for inputting commands. Each virtual console has its own
+ login prompt and output channel, and &os; takes care of
+ properly redirecting keyboard input and monitor output as you
+ switch between virtual consoles.</para>
+
+ <para>Special key combinations have been reserved by &os; for
+ switching consoles.<footnote>
+ <para>Refer to &man.syscons.4;, &man.atkbd.4;,
+ &man.vidcontrol.1; and &man.kbdcontrol.1; for a more
+ technical description of the &os; console and its keyboard
+ drivers.</para></footnote>. Use
<keycombo><keycap>Alt</keycap><keycap>F1</keycap></keycombo>,
- <keycombo><keycap>Alt</keycap><keycap>F2</keycap></keycombo>, through
- <keycombo><keycap>Alt</keycap><keycap>F8</keycap></keycombo> to switch
- to a different virtual console in FreeBSD.</para>
-
- <para>As you are switching from one console to the next, FreeBSD takes
- care of saving and restoring the screen output. The result is an
- <quote>illusion</quote> of having multiple <quote>virtual</quote>
- screens and keyboards that you can use to type commands for
- FreeBSD to run. The programs that you launch on one virtual console
- do not stop running when that console is not visible. They continue
- running when you have switched to a different virtual console.</para>
+ <keycombo><keycap>Alt</keycap><keycap>F2</keycap></keycombo>,
+ through
+ <keycombo><keycap>Alt</keycap><keycap>F8</keycap></keycombo>
+ to switch to a different virtual console in &os;.</para>
+
+ <para>When switching from one console to the next, &os; takes
+ care of saving and restoring the screen output. The result is
+ an <quote>illusion</quote> of having multiple
+ <quote>virtual</quote> screens and keyboards that can be used
+ to type commands for &os; to run. The programs that are
+ launched in one virtual console do not stop running when that
+ console is not visible because the user has switched to a
+ different virtual console.</para>
</sect2>
<sect2 id="consoles-ttys">
<title>The <filename>/etc/ttys</filename> File</title>
- <para>The default configuration of FreeBSD will start up with eight
- virtual consoles. This is not a hardwired setting though, and
- you can easily customize your installation to boot with more
- or fewer virtual consoles. The number and settings of the
- virtual consoles are configured in the
- <filename>/etc/ttys</filename> file.</para>
-
- <para>You can use the <filename>/etc/ttys</filename> file to configure
- the virtual consoles of FreeBSD. Each uncommented line in this file
- (lines that do not start with a <literal>#</literal> character) contains
- settings for a single terminal or virtual console. The default
- version of this file that ships with FreeBSD configures nine virtual
- consoles, and enables eight of them. They are the lines that start with
- <literal>ttyv</literal>:</para>
-
- <programlisting># name getty type status comments
+ <para>By default, &os; is configured to start eight virtual
+ consoles. The configuration can be customized to start
+ more or fewer virtual consoles. To change the number of and
+ the settings of the virtual consoles, edit
+ <filename>/etc/ttys</filename>.</para>
+
+ <para>Each uncommented line in <filename>/etc/ttys</filename>
+ (lines that do not start with a <literal>#</literal>
+ character) contains settings for a single terminal or virtual
+ console. The default version configures nine virtual
+ consoles, and enables eight of them. They are the lines that
+ start with <literal>ttyv</literal>:</para>
+
+ <programlisting># name getty type status comments
#
ttyv0 "/usr/libexec/getty Pc" cons25 on secure
# Virtual terminals
@@ -254,72 +219,70 @@ ttyv6 "/usr/libexec/getty Pc" cons25 on secure
ttyv7 "/usr/libexec/getty Pc" cons25 on secure
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure</programlisting>
- <para>For a detailed description of every column in this file and all
- the options you can use to set things up for the virtual consoles,
- consult the &man.ttys.5; manual page.</para>
+ <para>For a detailed description of every column in this file
+ and the available options for the virtual consoles, refer to
+ &man.ttys.5;.</para>
</sect2>
<sect2 id="consoles-singleuser">
<title>Single User Mode Console</title>
- <para>A detailed description of what <quote>single user mode</quote> is
- can be found in <xref linkend="boot-singleuser"/>. It is worth noting
- that there is only one console when you are running FreeBSD in single
- user mode. There are no virtual consoles available. The settings of
- the single user mode console can also be found in the
- <filename>/etc/ttys</filename> file. Look for the line that starts
- with <literal>console</literal>:</para>
+ <para>A detailed description of <quote>single user mode</quote>
+ can be found <link linkend="boot-singleuser">here</link>.
+ There is only one console when &os; is in single user mode as
+ no other virtual consoles are available in this mode. The
+ settings for single user mode are found in this section of
+ <filename>/etc/ttys</filename>:</para>
- <programlisting># name getty type status comments
+ <programlisting># name getty type status comments
#
# If console is marked "insecure", then init will ask for the root password
# when going to single-user mode.
-console none unknown off secure</programlisting>
+console none unknown off secure</programlisting>
<note>
- <para>As the comments above the <literal>console</literal> line
- indicate, you can edit this line and change <literal>secure</literal> to
- <literal>insecure</literal>. If you do that, when FreeBSD boots
- into single user mode, it will still ask for the
- <username>root</username> password.</para>
-
- <para><emphasis>Be careful when changing this to
- <literal>insecure</literal></emphasis>. If you ever forget
- the <username>root</username> password, booting into single user
- mode is a bit involved. It is still possible, but it might be a bit
- hard for someone who is not very comfortable with the FreeBSD
- booting process and the programs involved.</para>
+ <para>As the comments above the <literal>console</literal>
+ line indicate, editing <literal>secure</literal> to
+ <literal>insecure</literal> will prompt for the
+ <username>root</username> password when booting into single
+ user mode. The default setting enters single user mode
+ without prompting for a password.</para>
+
+ <para><emphasis>Be careful when changing this setting to
+ <literal>insecure</literal></emphasis>. If you ever
+ forget the <username>root</username> password, booting into
+ single user mode is still possible, but may be difficult for
+ someone who is not comfortable with the &os; booting
+ process.</para>
</note>
</sect2>
<sect2 id="consoles-vidcontrol">
<title>Changing Console Video Modes</title>
- <para>The FreeBSD console default video mode may be adjusted to
- 1024x768, 1280x1024, or any other size supported by your
- graphics chip and monitor. To use a different video mode, you
- first must recompile your kernel and include two additional
- options:</para>
+ <para>The &os; console default video mode may be adjusted to
+ 1024x768, 1280x1024, or any other size supported by the
+ graphics chip and monitor. To use a different video mode
+ load the <literal>VESA</literal> module:</para>
- <programlisting>options VESA
-options SC_PIXEL_MODE</programlisting>
+ <screen>&prompt.root; <userinput>kldload vesa</userinput></screen>
- <para>Once the kernel has been recompiled with these two
- options, you can then determine what video modes are supported
- by your hardware by using the &man.vidcontrol.1; utility. To
- get a list of supported video modes issue the following:</para>
+ <para>To determine which video modes are supported by the
+ hardware, use &man.vidcontrol.1;. To get a list of supported
+ video modes issue the following:</para>
<screen>&prompt.root; <userinput>vidcontrol -i mode</userinput></screen>
- <para>The output of this command is a list of video modes that
- are supported by your hardware. You can then choose to use a
- new video mode by passing it to &man.vidcontrol.1; in a <username>root</username> console:</para>
+ <para>The output of this command lists the video modes that
+ are supported by the hardware. To select a new video mode,
+ specify the mode using &man.vidcontrol.1; as the
+ <username>root</username> user:</para>
<screen>&prompt.root; <userinput>vidcontrol MODE_279</userinput></screen>
<para>If the new video mode is acceptable, it can be permanently
- set on boot by setting it in the <filename>/etc/rc.conf</filename>
- file:</para>
+ set on boot by adding it to
+ <filename>/etc/rc.conf</filename>:</para>
<programlisting>allscreens_flags="MODE_279"</programlisting>
</sect2>
@@ -327,23 +290,24 @@ options SC_PIXEL_MODE</programlisting>
<sect1 id="permissions">
<title>Permissions</title>
+
<indexterm><primary>UNIX</primary></indexterm>
- <para>FreeBSD, being a direct descendant of BSD &unix;, is based on
- several key &unix; concepts. The first and
- most pronounced is that FreeBSD is a multi-user operating system.
- The system can handle several users all working simultaneously on
- completely unrelated tasks. The system is responsible for properly
- sharing and managing requests for hardware devices, peripherals,
- memory, and CPU time fairly to each user.</para>
+ <para>&os;, being a direct descendant of BSD &unix;, is based
+ on several key &unix; concepts. The first and most pronounced
+ is that &os; is a multi-user operating system that can handle
+ several users working simultaneously on completely unrelated
+ tasks. The system is responsible for properly sharing and
+ managing requests for hardware devices, peripherals, memory, and
+ CPU time fairly to each user.</para>
<para>Because the system is capable of supporting multiple users,
- everything the system manages has a set of permissions governing who
- can read, write, and execute the resource. These permissions are
- stored as three octets broken into three pieces, one for the owner of
- the file, one for the group that the file belongs to, and one for
- everyone else. This numerical representation works like
- this:</para>
+ everything the system manages has a set of permissions governing
+ who can read, write, and execute the resource. These
+ permissions are stored as three octets broken into three pieces,
+ one for the owner of the file, one for the group that the file
+ belongs to, and one for everyone else. This numerical
+ representation works like this:</para>
<indexterm><primary>permissions</primary></indexterm>
<indexterm>
@@ -415,67 +379,59 @@ options SC_PIXEL_MODE</programlisting>
</indexterm>
<indexterm><primary>directories</primary></indexterm>
- <para>You can use the <option>-l</option> command line
- argument to &man.ls.1; to view a long directory listing that
- includes a column with information about a file's permissions
- for the owner, group, and everyone else. For example, a
- <command>ls -l</command> in an arbitrary directory may show:</para>
+ <para>Use the <option>-l</option> argument to &man.ls.1; to view a
+ long directory listing that includes a column of information
+ about a file's permissions for the owner, group, and everyone
+ else. For example, a <command>ls -l</command> in an arbitrary
+ directory may show:</para>
<screen>&prompt.user; <userinput>ls -l</userinput>
total 530
-rw-r--r-- 1 root wheel 512 Sep 5 12:31 myfile
-rw-r--r-- 1 root wheel 512 Sep 5 12:31 otherfile
--rw-r--r-- 1 root wheel 7680 Sep 5 12:31 email.txt
-...</screen>
-
- <para>Here is how the first column of <command>ls -l</command> is
- broken up:</para>
-
- <screen>-rw-r--r--</screen>
-
- <para>The first (leftmost) character
- tells if this file is a regular file, a directory, a special
- character device, a socket, or any other special
- pseudo-file device. In this case, the <literal>-</literal>
- indicates a regular file. The next three characters,
- <literal>rw-</literal> in this example, give the permissions for the owner of the
- file. The next three characters, <literal>r--</literal>, give the
- permissions for the group that the file belongs to. The final three
- characters, <literal>r--</literal>, give the permissions for the
- rest of the world. A dash means that the permission is turned off.
- In the case of this file, the permissions are set so the owner can
- read and write to the file, the group can read the file, and the
- rest of the world can only read the file. According to the table
- above, the permissions for this file would be
- <literal>644</literal>, where each digit represents the three parts
- of the file's permission.</para>
-
- <para>This is all well and good, but how does the system control
- permissions on devices? FreeBSD actually treats most hardware
- devices as a file that programs can open, read, and write data to
- just like any other file. These special device files are stored on
- the <filename>/dev</filename> directory.</para>
-
- <para>Directories are also treated as files. They have read, write,
- and execute permissions. The executable bit for a directory has a
- slightly different meaning than that of files. When a directory is
- marked executable, it means it can be traversed into, that is, it is
- possible to <quote>cd</quote> (change directory) into it. This also means that
- within the directory it is possible to access files whose names are
- known (subject, of course, to the permissions on the files
- themselves).</para>
-
- <para>In particular, in order to perform a directory listing,
- read permission must be set on the directory, whilst to delete a file
- that one knows the name of, it is necessary to have write
+-rw-r--r-- 1 root wheel 7680 Sep 5 12:31 email.txt</screen>
+
+ <para>The first (leftmost) character in the first column indicates
+ whether this file is a regular file, a directory, a special
+ character device, a socket, or any other special pseudo-file
+ device. In this example, the <literal>-</literal> indicates a
+ regular file. The next three characters, <literal>rw-</literal>
+ in this example, give the permissions for the owner of the file.
+ The next three characters, <literal>r--</literal>, give the
+ permissions for the group that the file belongs to. The final
+ three characters, <literal>r--</literal>, give the permissions
+ for the rest of the world. A dash means that the permission is
+ turned off. In this example, the permissions are set so the
+ owner can read and write to the file, the group can read the
+ file, and the rest of the world can only read the file.
+ According to the table above, the permissions for this file
+ would be <literal>644</literal>, where each digit represents the
+ three parts of the file's permission.</para>
+
+ <para>How does the system control permissions on devices? &os;
+ treats most hardware devices as a file that programs can open,
+ read, and write data to. These special device files are
+ stored in <filename class="directory">/dev/</filename>.</para>
+
+ <para>Directories are also treated as files. They have read,
+ write, and execute permissions. The executable bit for a
+ directory has a slightly different meaning than that of files.
+ When a directory is marked executable, it means it is possible
+ to change into that directory using
+ <application>cd</application>. This also means that it is
+ possible to access the files within that directory, subject to
+ the permissions on the files themselves.</para>
+
+ <para>In order to perform a directory listing, the read permission
+ must be set on the directory. In order to delete a file that
+ one knows the name of, it is necessary to have write
<emphasis>and</emphasis> execute permissions to the directory
containing the file.</para>
- <para>There are more permission bits, but they are primarily used in
- special circumstances such as setuid binaries and sticky
- directories. If you want more information on file permissions and
- how to set them, be sure to look at the &man.chmod.1; manual
- page.</para>
+ <para>There are more permission bits, but they are primarily used
+ in special circumstances such as setuid binaries and sticky
+ directories. For more information on file permissions and how
+ to set them, refer to &man.chmod.1;.</para>
<sect2>
<sect2info>
@@ -489,12 +445,17 @@ total 530
</sect2info>
<title>Symbolic Permissions</title>
- <indexterm><primary>permissions</primary><secondary>symbolic</secondary></indexterm>
- <para>Symbolic permissions, sometimes referred to as symbolic expressions,
- use characters in place of octal values to assign permissions to files
- or directories. Symbolic expressions use the syntax of (who) (action)
- (permissions), where the following values are available:</para>
+ <indexterm>
+ <primary>permissions</primary>
+ <secondary>symbolic</secondary>
+ </indexterm>
+
+ <para>Symbolic permissions use characters instead of octal
+ values to assign permissions to files or directories.
+ Symbolic permissions use the syntax of (who) (action)
+ (permissions), where the following values are
+ available:</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="3">
@@ -506,101 +467,102 @@ total 530
</row>
</thead>
- <tbody>
- <row>
- <entry>(who)</entry>
- <entry>u</entry>
- <entry>User</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>(who)</entry>
+ <entry>u</entry>
+ <entry>User</entry>
+ </row>
- <row>
- <entry>(who)</entry>
- <entry>g</entry>
- <entry>Group owner</entry>
- </row>
+ <row>
+ <entry>(who)</entry>
+ <entry>g</entry>
+ <entry>Group owner</entry>
+ </row>
- <row>
- <entry>(who)</entry>
- <entry>o</entry>
- <entry>Other</entry>
- </row>
+ <row>
+ <entry>(who)</entry>
+ <entry>o</entry>
+ <entry>Other</entry>
+ </row>
- <row>
- <entry>(who)</entry>
- <entry>a</entry>
- <entry>All (<quote>world</quote>)</entry>
- </row>
+ <row>
+ <entry>(who)</entry>
+ <entry>a</entry>
+ <entry>All (<quote>world</quote>)</entry>
+ </row>
- <row>
- <entry>(action)</entry>
- <entry>+</entry>
- <entry>Adding permissions</entry>
- </row>
+ <row>
+ <entry>(action)</entry>
+ <entry>+</entry>
+ <entry>Adding permissions</entry>
+ </row>
- <row>
- <entry>(action)</entry>
- <entry>-</entry>
- <entry>Removing permissions</entry>
- </row>
+ <row>
+ <entry>(action)</entry>
+ <entry>-</entry>
+ <entry>Removing permissions</entry>
+ </row>
- <row>
- <entry>(action)</entry>
- <entry>=</entry>
- <entry>Explicitly set permissions</entry>
- </row>
+ <row>
+ <entry>(action)</entry>
+ <entry>=</entry>
+ <entry>Explicitly set permissions</entry>
+ </row>
- <row>
- <entry>(permissions)</entry>
- <entry>r</entry>
- <entry>Read</entry>
- </row>
+ <row>
+ <entry>(permissions)</entry>
+ <entry>r</entry>
+ <entry>Read</entry>
+ </row>
- <row>
- <entry>(permissions)</entry>
- <entry>w</entry>
- <entry>Write</entry>
- </row>
+ <row>
+ <entry>(permissions)</entry>
+ <entry>w</entry>
+ <entry>Write</entry>
+ </row>
- <row>
- <entry>(permissions)</entry>
- <entry>x</entry>
- <entry>Execute</entry>
- </row>
+ <row>
+ <entry>(permissions)</entry>
+ <entry>x</entry>
+ <entry>Execute</entry>
+ </row>
- <row>
- <entry>(permissions)</entry>
- <entry>t</entry>
- <entry>Sticky bit</entry>
- </row>
+ <row>
+ <entry>(permissions)</entry>
+ <entry>t</entry>
+ <entry>Sticky bit</entry>
+ </row>
- <row>
- <entry>(permissions)</entry>
- <entry>s</entry>
- <entry>Set UID or GID</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
+ <row>
+ <entry>(permissions)</entry>
+ <entry>s</entry>
+ <entry>Set UID or GID</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
- <para>These values are used with the &man.chmod.1; command
- just like before, but with letters. For an example, you could use
- the following command to block other users from accessing
- <replaceable>FILE</replaceable>:</para>
+ <para>These values are used with &man.chmod.1;, but with
+ letters instead of numbers. For example, the following
+ command would block other users from accessing
+ <replaceable>FILE</replaceable>:</para>
- <screen>&prompt.user; <userinput>chmod go= FILE</userinput></screen>
+ <screen>&prompt.user; <userinput>chmod go= FILE</userinput></screen>
- <para>A comma separated list can be provided when more than one set
- of changes to a file must be made. For example the following command
- will remove the group and <quote>world</quote> write permission
- on <replaceable>FILE</replaceable>, then it adds the execute
- permissions for everyone:</para>
+ <para>A comma separated list can be provided when more than one
+ set of changes to a file must be made. For example, the
+ following command removes the group and
+ <quote>world</quote> write permission on
+ <replaceable>FILE</replaceable>, and adds the execute
+ permissions for everyone:</para>
- <screen>&prompt.user; <userinput>chmod go-w,a+x <replaceable>FILE</replaceable></userinput></screen>
+ <screen>&prompt.user; <userinput>chmod go-w,a+x <replaceable>FILE</replaceable></userinput></screen>
<!--
- <para>Most users will not notice this, but it should be pointed out
- that using the octal method will only set or assign permissions to
- a file; it does not add or delete them.</para>
+ <para>Most users will not notice this, but it should be pointed
+ out that using the octal method will only set or assign
+ permissions to a file; it does not add or delete them.</para>
-->
</sect2>
@@ -617,42 +579,37 @@ total 530
<title>&os; File Flags</title>
- <para>In addition to file permissions discussed previously, &os;
- supports the use of <quote>file flags.</quote> These flags
- add an additional level of security and control over files, but
- not directories.</para>
-
- <para>These file flags add an additional level of control over
- files, helping to ensure that in some cases not even the
- <username>root</username> can remove or alter files.</para>
+ <para>In addition to file permissions, &os; supports the use of
+ <quote>file flags</quote>. These flags add an additional
+ level of security and control over files, but not
+ directories. With file flags, even
+ <username>root</username> can be prevented from removing or
+ altering files.</para>
- <para>File flags are altered by using the &man.chflags.1; utility,
- using a simple interface. For example, to enable the system
- undeletable flag on the file <filename>file1</filename>,
- issue the following command:</para>
+ <para>File flags are modified using &man.chflags.1;. For
+ example, to enable the system undeletable flag on the file
+ <filename>file1</filename>, issue the following
+ command:</para>
<screen>&prompt.root; <userinput>chflags sunlink <filename>file1</filename></userinput></screen>
- <para>And to disable the system undeletable flag,
- issue the previous command with <quote>no</quote> in
- front of the <option>sunlink</option>. Observe:</para>
+ <para>To disable the system undeletable flag, put a
+ <quote>no</quote> in front of the
+ <option>sunlink</option>:</para>
<screen>&prompt.root; <userinput>chflags nosunlink <filename>file1</filename></userinput></screen>
- <para>To view the flags of this file, use the &man.ls.1; command
- with the <option>-lo</option> flags:</para>
+ <para>To view the flags of a file, use <option>-lo</option> with
+ &man.ls.1;:</para>
<screen>&prompt.root; <userinput>ls -lo <filename>file1</filename></userinput></screen>
- <para>The output should look like the following:</para>
-
<programlisting>-rw-r--r-- 1 trhodes trhodes sunlnk 0 Mar 1 05:54 file1</programlisting>
- <para>Several flags may only added or removed to files by the
- <username>root</username> user. In other cases, the file owner
- may set these flags. It is recommended that administrators read
- over the &man.chflags.1; and &man.chflags.2; manual pages for
- more information.</para>
+ <para>Several file flags may only added or removed by the
+ <username>root</username> user. In other cases, the file
+ owner may set its file flags. Refer to &man.chflags.1; and
+ &man.chflags.2; for more information.</para>
</sect2>
<sect2>
@@ -666,61 +623,60 @@ total 530
</authorgroup>
</sect2info>
- <title>The setuid, setgid, and sticky Permissions</title>
+ <title>The <literal>setuid</literal>, <literal>setgid</literal>,
+ and <literal>sticky</literal> Permissions</title>
<para>Other than the permissions already discussed, there are
three other specific settings that all administrators should
know about. They are the <literal>setuid</literal>,
- <literal>setgid</literal> and <literal>sticky</literal>
+ <literal>setgid</literal>, and <literal>sticky</literal>
permissions.</para>
<para>These settings are important for some &unix; operations
as they provide functionality not normally granted to normal
users. To understand them, the difference between the real
- user ID and effective user ID must also be noted.</para>
+ user ID and effective user ID must be noted.</para>
<para>The real user ID is the <acronym>UID</acronym> who owns
or starts the process. The effective <acronym>UID</acronym>
- is the user ID the process runs as. As an example, the
- &man.passwd.1; utility runs with the real user ID as the
- user changing their password; however, to manipulate the
- password database, it runs as the effective ID of the
- <username>root</username> user. This is what allows normal
- users to change their passwords without seeing a
+ is the user ID the process runs as. As an example,
+ &man.passwd.1; runs with the real user ID when a user changes
+ their password. However, in order to update the password
+ database, the command runs as the effective ID of the
+ <username>root</username> user. This allows users to change
+ their passwords without seeing a
<errorname>Permission Denied</errorname> error.</para>
- <note>
- <para>The <literal>nosuid</literal> &man.mount.8; option will
- cause these binaries to silently fail. That is, they will
- fail to execute without ever alerting the user. That option
- is also not completely reliable as a <literal>nosuid</literal>
- wrapper may be able to circumvent it; according to the
- &man.mount.8; manual page.</para>
- </note>
-
<para>The setuid permission may be set by prefixing a permission
set with the number four (4) as shown in the following
example:</para>
<screen>&prompt.root; <userinput>chmod 4755 suidexample.sh</userinput></screen>
- <para>The permissions on the
+ <para>The permissions on
<filename><replaceable>suidexample.sh</replaceable></filename>
- file should now look like the following:</para>
+ now look like the following:</para>
<programlisting>-rwsr-xr-x 1 trhodes trhodes 63 Aug 29 06:36 suidexample.sh</programlisting>
- <para>It should be noticeable from this example that an
- <literal>s</literal> is now part of the permission set
- designated for the file owner, replacing the executable
- bit. This allows utilities which need elevated permissions,
- such as <command>passwd</command>.</para>
+ <para>Note that a <literal>s</literal> is now part of the
+ permission set designated for the file owner, replacing the
+ executable bit. This allows utilities which need elevated
+ permissions, such as <command>passwd</command>.</para>
+
+ <note>
+ <para>The <literal>nosuid</literal> &man.mount.8; option will
+ cause such binaries to silently fail without alerting
+ the user. That option is not completely reliable as a
+ <literal>nosuid</literal> wrapper may be able to circumvent
+ it.</para>
+ </note>
<para>To view this in real time, open two terminals. On
one, start the <command>passwd</command> process as a normal
user. While it waits for a new password, check the process
- table and look at the user information of the
- <command>passwd</command> command.</para>
+ table and look at the user information for
+ <command>passwd</command>:</para>
<para>In terminal A:</para>
@@ -741,17 +697,17 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<para>The <literal>setgid</literal> permission performs the
same function as the <literal>setuid</literal> permission;
except that it alters the group settings. When an application
- or utility is ran with this setting, it will be granted the
- permissions based on the group that owns the file, not
- the user who started the process.</para>
+ or utility executes with this setting, it will be granted the
+ permissions based on the group that owns the file, not the
+ user who started the process.</para>
<para>To set the <literal>setgid</literal> permission on a
- file, provide the <command>chmod</command> command with a
- leading two (2) as in the following example:</para>
+ file, provide <command>chmod</command> with a leading two
+ (2):</para>
<screen>&prompt.root; <userinput>chmod 2755 sgidexample.sh</userinput></screen>
- <para>The new setting may be viewed as before, notice the
+ <para>In the following listing, notice that the
<literal>s</literal> is now in the field designated for the
group permission settings:</para>
@@ -765,71 +721,70 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
&man.setuid.2; system calls.</para>
</note>
- <para>The first two special permission bits we discussed
- (the <literal>setuid</literal> and <literal>setgid</literal>
- permission bits) may lower system security, by allowing for
- elevated permissions. There is a third special permission bit
- that can strengthen the security of a system: the
- <literal>sticky bit</literal>.</para>
-
- <para>The <literal>sticky bit</literal>, when set on a directory,
- allows file deletion only by the file owner. This
- permission set is useful to prevent file deletion in public
- directories, such as
- <filename class="directory">/tmp</filename>, by users who do
- not own the file. To utilize this permission, prefix the
- permission with a one (1). For example:</para>
+ <para>The <literal>setuid</literal> and
+ <literal>setgid</literal> permission bits may lower system
+ security, by allowing for elevated permissions. The third
+ special permission, the <literal>sticky bit</literal>, can
+ strengthen the security of a system.</para>
+
+ <para>When the <literal>sticky bit</literal> is set on a
+ directory, it allows file deletion only by the file owner.
+ This is useful to prevent file deletion in public directories,
+ such as <filename class="directory">/tmp</filename>, by users
+ who do not own the file. To utilize this permission, prefix
+ the permission set with a one (1):</para>
<screen>&prompt.root; <userinput>chmod 1777 /tmp</userinput></screen>
- <para>Now, it is possible to see the effect by using the
- <command>ls</command> command:</para>
+ <para>The <literal>sticky bit</literal> permission will display
+ as a <literal>t</literal> at the very end of the permission
+ set:</para>
<screen>&prompt.root; <userinput>ls -al / | grep tmp</userinput></screen>
<screen>drwxrwxrwt 10 root wheel 512 Aug 31 01:49 tmp</screen>
- <para>The <literal>sticky bit</literal> permission is
- distinguishable from the <literal>t</literal> at the very
- end of the set.</para>
</sect2>
</sect1>
<sect1 id="dirstructure">
<title>Directory Structure</title>
+
<indexterm><primary>directory hierarchy</primary></indexterm>
- <para>The FreeBSD directory hierarchy is fundamental to obtaining
+ <para>The &os; directory hierarchy is fundamental to obtaining
an overall understanding of the system. The most important
- concept to grasp is that of the root directory,
- <quote>/</quote>. This directory is the first one mounted at
- boot time and it contains the base system necessary to prepare
- the operating system for multi-user operation. The root
- directory also contains mount points for other file systems
- that are mounted during the transition to multi-user
- operation.</para>
-
- <para>A mount point is a directory where additional file systems can
- be grafted onto a parent file system (usually the root file system).
- This is further described in <xref linkend="disk-organization"/>.
- Standard mount points include
- <filename>/usr</filename>, <filename>/var</filename>, <filename>/tmp</filename>,
- <filename>/mnt</filename>, and <filename>/cdrom</filename>. These
- directories are usually referenced to entries in the file
- <filename>/etc/fstab</filename>. <filename>/etc/fstab</filename> is
- a table of various file systems and mount points for reference by the
- system. Most of the file systems in <filename>/etc/fstab</filename>
- are mounted automatically at boot time from the script &man.rc.8;
- unless they contain the <option>noauto</option> option.
- Details can be found in <xref linkend="disks-fstab"/>.</para>
+ directory is root or, <quote>/</quote>. This directory is the
+ first one mounted at boot time and it contains the base system
+ necessary to prepare the operating system for multi-user
+ operation. The root directory also contains mount points for
+ other file systems that are mounted during the transition to
+ multi-user operation.</para>
+
+ <para>A mount point is a directory where additional file systems
+ can be grafted onto a parent file system (usually the root file
+ system). This is further described in <xref
+ linkend="disk-organization"/>. Standard mount points
+ include <filename class="directory">/usr/</filename>,
+ <filename class="directory">/var/</filename>,
+ <filename class="directory">/tmp/</filename>,
+ <filename class="directory">/mnt/</filename>, and
+ <filename class="directory">/cdrom/</filename>. These
+ directories are usually referenced to entries in
+ <filename>/etc/fstab</filename>. This file is a table of
+ various file systems and mount points and is read by the system.
+ Most of the file systems in <filename>/etc/fstab</filename> are
+ mounted automatically at boot time from the script &man.rc.8;
+ unless their entry includes <option>noauto</option>. Details
+ can be found in <xref linkend="disks-fstab"/>.</para>
<para>A complete description of the file system hierarchy is
- available in &man.hier.7;. For now, a brief overview of the
- most common directories will suffice.</para>
+ available in &man.hier.7;. The following table provides a brief
+ overview of the most common directories.</para>
<para>
<informaltable frame="none" pgwide="1">
- <tgroup cols="2">
+ <tgroup cols="2">
<thead>
<row>
<entry>Directory</entry>
@@ -837,326 +792,353 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
</row>
</thead>
<tbody valign="top">
- <row>
+ <row>
<entry><filename class="directory">/</filename></entry>
<entry>Root directory of the file system.</entry>
- </row>
+ </row>
<row>
- <entry><filename class="directory">/bin/</filename></entry>
+ <entry><filename
+ class="directory">/bin/</filename></entry>
<entry>User utilities fundamental to both single-user
- and multi-user environments.</entry>
+ and multi-user environments.</entry>
</row>
<row>
- <entry><filename class="directory">/boot/</filename></entry>
+ <entry><filename
+ class="directory">/boot/</filename></entry>
<entry>Programs and configuration files used during
- operating system bootstrap.</entry>
+ operating system bootstrap.</entry>
</row>
<row>
- <entry><filename class="directory">/boot/defaults/</filename></entry>
- <entry>Default bootstrapping configuration files; see
- &man.loader.conf.5;.</entry>
+ <entry><filename
+ class="directory">/boot/defaults/</filename></entry>
+ <entry>Default boot configuration files. Refer to
+ &man.loader.conf.5; for details.</entry>
</row>
<row>
- <entry><filename class="directory">/dev/</filename></entry>
- <entry>Device nodes; see &man.intro.4;.</entry>
+ <entry><filename
+ class="directory">/dev/</filename></entry>
+ <entry>Device nodes. Refer to &man.intro.4; for
+ details.</entry>
</row>
<row>
- <entry><filename class="directory">/etc/</filename></entry>
+ <entry><filename
+ class="directory">/etc/</filename></entry>
<entry>System configuration files and scripts.</entry>
</row>
<row>
- <entry><filename class="directory">/etc/defaults/</filename></entry>
- <entry>Default system configuration files; see &man.rc.8;.</entry>
+ <entry><filename
+ class="directory">/etc/defaults/</filename></entry>
+ <entry>Default system configuration files. Refer to
+ &man.rc.8; for details.</entry>
</row>
<row>
- <entry><filename class="directory">/etc/mail/</filename></entry>
- <entry>Configuration files for mail transport agents such
- as &man.sendmail.8;.</entry>
+ <entry><filename
+ class="directory">/etc/mail/</filename></entry>
+ <entry>Configuration files for mail transport agents
+ such as &man.sendmail.8;.</entry>
</row>
<row>
- <entry><filename class="directory">/etc/namedb/</filename></entry>
- <entry><command>named</command> configuration files; see
- &man.named.8;.</entry>
+ <entry><filename
+ class="directory">/etc/namedb/</filename></entry>
+ <entry><command>named</command> configuration files.
+ Refer to &man.named.8; for details.</entry>
</row>
<row>
- <entry><filename class="directory">/etc/periodic/</filename></entry>
- <entry>Scripts that are run daily, weekly, and monthly,
- via &man.cron.8;; see &man.periodic.8;.</entry>
+ <entry><filename
+ class="directory">/etc/periodic/</filename></entry>
+ <entry>Scripts that run daily, weekly, and monthly,
+ via &man.cron.8;. Refer to &man.periodic.8; for
+ details.</entry>
</row>
<row>
- <entry><filename class="directory">/etc/ppp/</filename></entry>
- <entry><command>ppp</command> configuration files; see
- &man.ppp.8;.</entry>
+ <entry><filename
+ class="directory">/etc/ppp/</filename></entry>
+ <entry><command>ppp</command> configuration files as
+ described in &man.ppp.8;.</entry>
</row>
<row>
- <entry><filename class="directory">/mnt/</filename></entry>
- <entry>Empty directory commonly used by system administrators as a
- temporary mount point.</entry>
+ <entry><filename
+ class="directory">/mnt/</filename></entry>
+ <entry>Empty directory commonly used by system
+ administrators as a temporary mount point.</entry>
</row>
<row>
- <entry><filename class="directory">/proc/</filename></entry>
- <entry>Process file system; see &man.procfs.5;,
- &man.mount.procfs.8;.</entry>
+ <entry><filename
+ class="directory">/proc/</filename></entry>
+ <entry>Process file system. Refer to &man.procfs.5;,
+ &man.mount.procfs.8; for details.</entry>
</row>
<row>
- <entry><filename class="directory">/rescue/</filename></entry>
- <entry>Statically linked programs for emergency recovery; see
- &man.rescue.8;.</entry>
+ <entry><filename
+ class="directory">/rescue/</filename></entry>
+ <entry>Statically linked programs for emergency
+ recovery as described in &man.rescue.8;.</entry>
</row>
<row>
- <entry><filename class="directory">/root/</filename></entry>
+ <entry><filename
+ class="directory">/root/</filename></entry>
<entry>Home directory for the <username>root</username>
- account.</entry>
+ account.</entry>
</row>
<row>
- <entry><filename class="directory">/sbin/</filename></entry>
- <entry>System programs and administration utilities fundamental to
- both single-user and multi-user environments.</entry>
+ <entry><filename
+ class="directory">/sbin/</filename></entry>
+ <entry>System programs and administration utilities
+ fundamental to both single-user and multi-user
+ environments.</entry>
</row>
-
<row>
- <entry><filename class="directory">/tmp/</filename></entry>
- <entry>Temporary files. The contents of
- <filename class="directory">/tmp</filename> are usually NOT
- preserved across a system reboot. A memory-based file system
- is often mounted at
- <filename class="directory">/tmp</filename>.
- This can be automated using the tmpmfs-related variables of
- &man.rc.conf.5; (or with an entry in
- <filename>/etc/fstab</filename>; see &man.mdmfs.8;).</entry>
+ <entry><filename
+ class="directory">/tmp/</filename></entry>
+ <entry>Temporary files which are usually
+ <emphasis>not</emphasis> preserved across a system
+ reboot. A memory-based file system is often mounted
+ at <filename class="directory">/tmp</filename>. This
+ can be automated using the tmpmfs-related variables of
+ &man.rc.conf.5; or with an entry in
+ <filename>/etc/fstab</filename>; refer to
+ &man.mdmfs.8; for details.</entry>
</row>
-
<row>
- <entry><filename class="directory">/usr/</filename></entry>
- <entry>The majority of user utilities and applications.</entry>
+ <entry><filename
+ class="directory">/usr/</filename></entry>
+ <entry>The majority of user utilities and
+ applications.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/bin/</filename></entry>
- <entry>Common utilities, programming tools, and applications.</entry>
+ <entry><filename
+ class="directory">/usr/bin/</filename></entry>
+ <entry>Common utilities, programming tools, and
+ applications.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/include/</filename></entry>
+ <entry><filename
+ class="directory">/usr/include/</filename></entry>
<entry>Standard C include files.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/lib/</filename></entry>
+ <entry><filename
+ class="directory">/usr/lib/</filename></entry>
<entry>Archive libraries.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/libdata/</filename></entry>
+ <entry><filename
+ class="directory">/usr/libdata/</filename></entry>
<entry>Miscellaneous utility data files.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/libexec/</filename></entry>
- <entry>System daemons &amp; system utilities (executed by other
- programs).</entry>
+ <entry><filename
+ class="directory">/usr/libexec/</filename></entry>
+ <entry>System daemons and system utilities executed
+ by other programs.</entry>
</row>
<row>
<entry><filename
- class="directory">/usr/local/</filename></entry>
-
- <entry>Local executables, libraries, etc. Also used as
- the default destination for the FreeBSD ports
- framework. Within <filename>/usr/local</filename>,
- the general layout sketched out by &man.hier.7; for
- <filename>/usr</filename> should be used. Exceptions
- are the man directory, which is directly under
- <filename>/usr/local</filename> rather than under
- <filename>/usr/local/share</filename>, and the ports
- documentation is in
- <filename>share/doc/<replaceable>port</replaceable></filename>.
- </entry>
+ class="directory">/usr/local/</filename></entry>
+ <entry>Local executables and libraries. Also used as
+ the default destination for the &os; ports
+ framework. Within <filename>/usr/local</filename>,
+ the general layout sketched out by &man.hier.7; for
+ <filename>/usr</filename> should be used. Exceptions
+ are the man directory, which is directly under
+ <filename>/usr/local</filename> rather than under
+ <filename>/usr/local/share</filename>, and the ports
+ documentation is in
+ <filename>share/doc/<replaceable>port</replaceable></filename>.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/obj/</filename></entry>
- <entry>Architecture-specific target tree produced by building
- the <filename>/usr/src</filename> tree.</entry>
+ <entry><filename
+ class="directory">/usr/obj/</filename></entry>
+ <entry>Architecture-specific target tree produced by
+ building the <filename>/usr/src</filename>
+ tree.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/ports/</filename></entry>
- <entry>The FreeBSD Ports Collection (optional).</entry>
+ <entry><filename
+ class="directory">/usr/ports/</filename></entry>
+ <entry>The &os; Ports Collection (optional).</entry>
</row>
<row>
- <entry><filename class="directory">/usr/sbin/</filename></entry>
- <entry>System daemons &amp; system utilities (executed by users).</entry>
+ <entry><filename
+ class="directory">/usr/sbin/</filename></entry>
+ <entry>System daemons and system utilities executed
+ by users.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/share/</filename></entry>
+ <entry><filename
+ class="directory">/usr/share/</filename></entry>
<entry>Architecture-independent files.</entry>
</row>
<row>
- <entry><filename class="directory">/usr/src/</filename></entry>
+ <entry><filename
+ class="directory">/usr/src/</filename></entry>
<entry>BSD and/or local source files.</entry>
</row>
<row>
<entry><filename
- class="directory">/usr/X11R6/</filename></entry>
- <entry>X11R6 distribution executables, libraries, etc
- (optional).</entry>
+ class="directory">/var/</filename></entry>
+ <entry>Multi-purpose log, temporary, transient, and
+ spool files. A memory-based file system is sometimes
+ mounted at <filename
+ class="directory">/var</filename>. This can be
+ automated using the varmfs-related variables in
+ &man.rc.conf.5; or with an entry in
+ <filename>/etc/fstab</filename>; refer to
+ &man.mdmfs.8; for details.</entry>
</row>
<row>
- <entry><filename class="directory">/var/</filename></entry>
- <entry>Multi-purpose log, temporary, transient, and spool files.
- A memory-based file system is sometimes mounted at
- <filename class="directory">/var</filename>.
- This can be automated using the varmfs-related variables of
- &man.rc.conf.5; (or with an entry in
- <filename>/etc/fstab</filename>; see &man.mdmfs.8;).</entry>
- </row>
-
-
- <row>
- <entry><filename class="directory">/var/log/</filename></entry>
+ <entry><filename
+ class="directory">/var/log/</filename></entry>
<entry>Miscellaneous system log files.</entry>
</row>
<row>
- <entry><filename class="directory">/var/mail/</filename></entry>
+ <entry><filename
+ class="directory">/var/mail/</filename></entry>
<entry>User mailbox files.</entry>
</row>
<row>
- <entry><filename class="directory">/var/spool/</filename></entry>
- <entry>Miscellaneous printer and mail system spooling directories.
- </entry>
+ <entry><filename
+ class="directory">/var/spool/</filename></entry>
+ <entry>Miscellaneous printer and mail system spooling
+ directories.</entry>
</row>
<row>
- <entry><filename class="directory">/var/tmp/</filename></entry>
- <entry>Temporary files.
- The files are usually preserved across a system reboot,
- unless <filename class="directory">/var</filename>
- is a memory-based file system.</entry>
+ <entry><filename
+ class="directory">/var/tmp/</filename></entry>
+ <entry>Temporary files which are usually preserved
+ across a system reboot, unless
+ <filename class="directory">/var</filename> is a
+ memory-based file system.</entry>
</row>
<row>
- <entry><filename class="directory">/var/yp/</filename></entry>
+ <entry><filename
+ class="directory">/var/yp/</filename></entry>
<entry>NIS maps.</entry>
</row>
-
</tbody>
</tgroup>
- </informaltable>
- </para>
-
+ </informaltable></para>
</sect1>
<sect1 id="disk-organization">
- <title>Disk Organization</title>
-
- <para>The smallest unit of organization that FreeBSD uses to find files
- is the filename. Filenames are case-sensitive, which means that
- <filename>readme.txt</filename> and <filename>README.TXT</filename>
- are two separate files. FreeBSD does not use the extension
- (<filename>.txt</filename>) of a file to determine whether the file is
- a program, or a document, or some other form of data.</para>
-
- <para>Files are stored in directories. A directory may contain no
- files, or it may contain many hundreds of files. A directory can also
- contain other directories, allowing you to build up a hierarchy of
- directories within one another. This makes it much easier to organize
- your data.</para>
-
- <para>Files and directories are referenced by giving the file or
- directory name, followed by a forward slash, <literal>/</literal>,
- followed by any other directory names that are necessary. If you have
- directory <filename>foo</filename>, which contains directory
- <filename>bar</filename>, which contains the file
- <filename>readme.txt</filename>, then the full name, or
- <firstterm>path</firstterm> to the file is
- <filename>foo/bar/readme.txt</filename>.</para>
-
- <para>Directories and files are stored in a file system. Each file system
- contains exactly one directory at the very top level, called the
- <firstterm>root directory</firstterm> for that file system. This root
- directory can then contain other directories.</para>
-
- <para>So far this is probably similar to any other operating system you
- may have used. There are a few differences; for example, &ms-dos; uses
- <literal>\</literal> to separate file and directory names, while &macos;
- uses <literal>:</literal>.</para>
-
- <para>FreeBSD does not use drive letters, or other drive names in the
- path. You would not write <filename>c:/foo/bar/readme.txt</filename>
- on FreeBSD.</para>
-
- <para>Instead, one file system is designated the <firstterm>root
- file system</firstterm>. The root file system's root directory is
- referred to as <literal>/</literal>. Every other file system is then
- <firstterm>mounted</firstterm> under the root file system. No matter
- how many disks you have on your FreeBSD system, every directory
- appears to be part of the same disk.</para>
-
- <para>Suppose you have three file systems, called <literal>A</literal>,
- <literal>B</literal>, and <literal>C</literal>. Each file system has
- one root directory, which contains two other directories, called
- <literal>A1</literal>, <literal>A2</literal> (and likewise
- <literal>B1</literal>, <literal>B2</literal> and
- <literal>C1</literal>, <literal>C2</literal>).</para>
-
- <para>Call <literal>A</literal> the root file system. If you used the
- <command>ls</command> command to view the contents of this directory
- you would see two subdirectories, <literal>A1</literal> and
- <literal>A2</literal>. The directory tree looks like this:</para>
+ <title>Disk Organization</title>
+
+ <para>The smallest unit of organization that &os; uses to find
+ files is the filename. Filenames are case-sensitive, which
+ means that <filename>readme.txt</filename> and
+ <filename>README.TXT</filename> are two separate files. &os;
+ does not use the extension of a file to determine whether the
+ file is a program, document, or some other form of data.</para>
+
+ <para>Files are stored in directories. A directory may contain no
+ files, or it may contain many hundreds of files. A directory
+ can also contain other directories, allowing you to build up a
+ hierarchy of directories within one another in order to organize
+ data.</para>
+
+ <para>Files and directories are referenced by giving the file or
+ directory name, followed by a forward slash,
+ <literal>/</literal>, followed by any other directory names that
+ are necessary. For example, if the directory
+ <filename>foo</filename> contains a directory
+ <filename>bar</filename> which contains the file
+ <filename>readme.txt</filename>, the full name, or
+ <firstterm>path</firstterm>, to the file is
+ <filename>foo/bar/readme.txt</filename>. Note that this is
+ different from &windows; which uses
+ <literal>\</literal> to separate file and directory
+ names. &os; does not use drive letters, or other drive names in
+ the path. For example, you would not type
+ <filename>c:/foo/bar/readme.txt</filename> on &os;.</para>
+
+ <para>Directories and files are stored in a file system. Each
+ file system contains exactly one directory at the very top
+ level, called the <firstterm>root directory</firstterm> for that
+ file system. This root directory can contain other
+ directories. One file system is designated the
+ <firstterm>root file system</firstterm> or <literal>/</literal>.
+ Every other file system is <firstterm>mounted</firstterm> under
+ the root file system. No matter how many disks you have on your
+ &os; system, every directory appears to be part of the same
+ disk.</para>
+
+ <para>Suppose you have three file systems, called
+ <literal>A</literal>, <literal>B</literal>, and
+ <literal>C</literal>. Each file system has one root directory,
+ which contains two other directories, called
+ <literal>A1</literal>, <literal>A2</literal> (and likewise
+ <literal>B1</literal>, <literal>B2</literal> and
+ <literal>C1</literal>, <literal>C2</literal>).</para>
+
+ <para>Call <literal>A</literal> the root file system. If you used
+ <command>ls</command> to view the contents of this directory you
+ would see two subdirectories, <literal>A1</literal> and
+ <literal>A2</literal>. The directory tree looks like
+ this:</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="install/example-dir1" format="EPS"/>
- </imageobject>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="install/example-dir1" format="EPS"/>
+ </imageobject>
- <textobject>
- <literallayout class="monospaced"> /
+ <textobject>
+ <literallayout class="monospaced"> /
|
+--- A1
|
`--- A2</literallayout>
- </textobject>
- </mediaobject>
-
- <para>A file system must be mounted on to a directory in another
- file system. So now suppose that you mount file system
- <literal>B</literal> on to the directory <literal>A1</literal>. The
- root directory of <literal>B</literal> replaces <literal>A1</literal>,
- and the directories in <literal>B</literal> appear accordingly:</para>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="install/example-dir2" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced"> /
+ </textobject>
+ </mediaobject>
+
+ <para>A file system must be mounted on to a directory in another
+ file system. When mounting file system
+ <literal>B</literal> on to the directory <literal>A1</literal>,
+ the root directory of <literal>B</literal> replaces
+ <literal>A1</literal>, and the directories in
+ <literal>B</literal> appear accordingly:</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="install/example-dir2" format="EPS"/>
+ </imageobject>
+
+ <textobject>
+ <literallayout class="monospaced"> /
|
+--- A1
| |
@@ -1165,26 +1147,28 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
| `--- B2
|
`--- A2</literallayout>
- </textobject>
- </mediaobject>
-
- <para>Any files that are in the <literal>B1</literal> or
- <literal>B2</literal> directories can be reached with the path
- <filename>/A1/B1</filename> or <filename>/A1/B2</filename> as
- necessary. Any files that were in <filename>/A1</filename> have been
- temporarily hidden. They will reappear if <literal>B</literal> is
- <firstterm>unmounted</firstterm> from A.</para>
-
- <para>If <literal>B</literal> had been mounted on <literal>A2</literal>
- then the diagram would look like this:</para>
+ </textobject>
+ </mediaobject>
+
+ <para>Any files that are in the <literal>B1</literal> or
+ <literal>B2</literal> directories can be reached with the path
+ <filename>/A1/B1</filename> or <filename>/A1/B2</filename> as
+ necessary. Any files that were in <filename>/A1</filename> have
+ been temporarily hidden. They will reappear if
+ <literal>B</literal> is <firstterm>unmounted</firstterm> from
+ A.</para>
+
+ <para>If <literal>B</literal> had been mounted on
+ <literal>A2</literal> then the diagram would look like
+ this:</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="install/example-dir3" format="EPS"/>
- </imageobject>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="install/example-dir3" format="EPS"/>
+ </imageobject>
- <textobject>
- <literallayout class="monospaced"> /
+ <textobject>
+ <literallayout class="monospaced"> /
|
+--- A1
|
@@ -1193,24 +1177,25 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
+--- B1
|
`--- B2</literallayout>
- </textobject>
- </mediaobject>
+ </textobject>
+ </mediaobject>
- <para>and the paths would be <filename>/A2/B1</filename> and
- <filename>/A2/B2</filename> respectively.</para>
+ <para>and the paths would be <filename>/A2/B1</filename> and
+ <filename>/A2/B2</filename> respectively.</para>
- <para>File systems can be mounted on top of one another. Continuing the
- last example, the <literal>C</literal> file system could be mounted on
- top of the <literal>B1</literal> directory in the <literal>B</literal>
- file system, leading to this arrangement:</para>
+ <para>File systems can be mounted on top of one another.
+ Continuing the last example, the <literal>C</literal> file
+ system could be mounted on top of the <literal>B1</literal>
+ directory in the <literal>B</literal> file system, leading to
+ this arrangement:</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="install/example-dir4" format="EPS"/>
- </imageobject>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="install/example-dir4" format="EPS"/>
+ </imageobject>
- <textobject>
- <literallayout class="monospaced"> /
+ <textobject>
+ <literallayout class="monospaced"> /
|
+--- A1
|
@@ -1223,20 +1208,20 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
| `--- C2
|
`--- B2</literallayout>
- </textobject>
- </mediaobject>
+ </textobject>
+ </mediaobject>
- <para>Or <literal>C</literal> could be mounted directly on to the
- <literal>A</literal> file system, under the <literal>A1</literal>
- directory:</para>
+ <para>Or <literal>C</literal> could be mounted directly on to the
+ <literal>A</literal> file system, under the
+ <literal>A1</literal> directory:</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="install/example-dir5" format="EPS"/>
- </imageobject>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="install/example-dir5" format="EPS"/>
+ </imageobject>
- <textobject>
- <literallayout class="monospaced"> /
+ <textobject>
+ <literallayout class="monospaced"> /
|
+--- A1
| |
@@ -1249,302 +1234,294 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
+--- B1
|
`--- B2</literallayout>
- </textobject>
- </mediaobject>
+ </textobject>
+ </mediaobject>
- <para>If you are familiar with &ms-dos;, this is similar, although not
- identical, to the <command>join</command> command.</para>
+ <para>This is similar, although not identical, to a &ms-dos;
+ <command>join</command>.</para>
- <para>This is not normally something you need to concern yourself with.
- Typically you create file systems when installing FreeBSD and decide
- where to mount them, and then never change them unless you add a new
- disk.</para>
+ <para>Typically you create file systems when installing &os;
+ and decide where to mount them, and then never change them
+ unless you add a new disk.</para>
- <para>It is entirely possible to have one large root file system, and not
- need to create any others. There are some drawbacks to this approach,
- and one advantage.</para>
+ <para>It is entirely possible to have one large root file system,
+ and not need to create any others. There are some drawbacks to
+ this approach, and one advantage.</para>
- <itemizedlist>
- <title>Benefits of Multiple File Systems</title>
+ <itemizedlist>
+ <title>Benefits of Multiple File Systems</title>
- <listitem>
- <para>Different file systems can have different <firstterm>mount
- options</firstterm>. For example, with careful planning, the
- root file system can be mounted read-only, making it impossible for
- you to inadvertently delete or edit a critical file. Separating
- user-writable file systems, such as <filename>/home</filename>,
- from other file systems also allows them to be mounted
- <firstterm>nosuid</firstterm>; this option prevents the
- <firstterm>suid</firstterm>/<firstterm>guid</firstterm> bits on
- executables stored on the file system from taking effect, possibly
- improving security.</para>
- </listitem>
+ <listitem>
+ <para>Different file systems can have different
+ <firstterm>mount options</firstterm>. For example, the root
+ file system can be mounted read-only, making it impossible
+ for users to inadvertently delete or edit a critical file.
+ Separating user-writable file systems, such as
+ <filename>/home</filename>, from other file systems allows
+ them to be mounted <firstterm>nosuid</firstterm>. This
+ option prevents the
+ <firstterm>suid</firstterm>/<firstterm>guid</firstterm> bits
+ on executables stored on the file system from taking effect,
+ possibly improving security.</para>
+ </listitem>
- <listitem>
- <para>FreeBSD automatically optimizes the layout of files on a
- file system, depending on how the file system is being used. So a
- file system that contains many small files that are written
- frequently will have a different optimization to one that contains
- fewer, larger files. By having one big file system this
- optimization breaks down.</para>
- </listitem>
+ <listitem>
+ <para>&os; automatically optimizes the layout of files on a
+ file system, depending on how the file system is being used.
+ So a file system that contains many small files that are
+ written frequently will have a different optimization to one
+ that contains fewer, larger files. By having one big file
+ system this optimization breaks down.</para>
+ </listitem>
- <listitem>
- <para>FreeBSD's file systems are very robust should you lose power.
- However, a power loss at a critical point could still damage the
- structure of the file system. By splitting your data over multiple
- file systems it is more likely that the system will still come up,
- making it easier for you to restore from backup as necessary.</para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>&os;'s file systems are very robust should you lose
+ power. However, a power loss at a critical point could
+ still damage the structure of the file system. By splitting
+ data over multiple file systems it is more likely that the
+ system will still come up, making it easier to restore from
+ backup as necessary.</para>
+ </listitem>
+ </itemizedlist>
- <itemizedlist>
- <title>Benefit of a Single File System</title>
+ <itemizedlist>
+ <title>Benefit of a Single File System</title>
- <listitem>
- <para>File systems are a fixed size. If you create a file system when
- you install FreeBSD and give it a specific size, you may later
- discover that you need to make the partition bigger. This is not
- easily accomplished without backing up, recreating the file system
- with the new size, and then restoring the backed up data.</para>
-
- <important>
- <para>FreeBSD features the &man.growfs.8;
- command, which makes it possible to increase the size of
- file system on the fly, removing this limitation.</para>
- </important>
- </listitem>
- </itemizedlist>
-
- <para>File systems are contained in partitions. This does not have the
- same meaning as the common usage of the term partition (for example, &ms-dos;
- partition), because of &os;'s &unix; heritage. Each partition is
- identified by a letter from <literal>a</literal> through to
- <literal>h</literal>. Each partition can contain only one file system,
- which means that file systems are often described by either their
- typical mount point in the file system hierarchy, or the letter of the
- partition they are contained in.</para>
-
- <para>FreeBSD also uses disk space for <firstterm>swap
- space</firstterm>. Swap space provides FreeBSD with
- <firstterm>virtual memory</firstterm>. This allows your computer to
- behave as though it has much more memory than it actually does. When
- FreeBSD runs out of memory it moves some of the data that is not
- currently being used to the swap space, and moves it back in (moving
- something else out) when it needs it.</para>
-
- <para>Some partitions have certain conventions associated with
- them.</para>
+ <listitem>
+ <para>File systems are a fixed size. If you create a file
+ system when you install &os; and give it a specific size,
+ you may later discover that you need to make the partition
+ bigger. This is not easily accomplished without backing up,
+ recreating the file system with the new size, and then
+ restoring the backed up data.</para>
+
+ <important>
+ <para>&os; features the &man.growfs.8; command, which
+ makes it possible to increase the size of file system on
+ the fly, removing this limitation.</para>
+ </important>
+ </listitem>
+ </itemizedlist>
- <informaltable frame="none" pgwide="1">
- <tgroup cols="2">
- <colspec colwidth="1*"/>
- <colspec colwidth="5*"/>
+ <para>File systems are contained in partitions. This does not
+ have the same meaning as the common usage of the term partition
+ (for example, &ms-dos; partition), because of &os;'s &unix;
+ heritage. Each partition is identified by a letter from
+ <literal>a</literal> through to <literal>h</literal>. Each
+ partition can contain only one file system, which means that
+ file systems are often described by either their typical mount
+ point in the file system hierarchy, or the letter of the
+ partition they are contained in.</para>
+
+ <para>&os; also uses disk space for <firstterm>swap
+ space</firstterm> to provide
+ <firstterm>virtual memory</firstterm>. This allows your
+ computer to behave as though it has much more memory than it
+ actually does. When &os; runs out of memory, it moves some of
+ the data that is not currently being used to the swap space, and
+ moves it back in (moving something else out) when it needs
+ it.</para>
+
+ <para>Some partitions have certain conventions associated with
+ them.</para>
- <thead>
- <row>
- <entry>Partition</entry>
+ <informaltable frame="none" pgwide="1">
+ <tgroup cols="2">
+ <colspec colwidth="1*"/>
+ <colspec colwidth="5*"/>
- <entry>Convention</entry>
- </row>
- </thead>
+ <thead>
+ <row>
+ <entry>Partition</entry>
+ <entry>Convention</entry>
+ </row>
+ </thead>
- <tbody valign="top">
- <row>
- <entry><literal>a</literal></entry>
+ <tbody valign="top">
+ <row>
+ <entry><literal>a</literal></entry>
+ <entry>Normally contains the root file system.</entry>
+ </row>
- <entry>Normally contains the root file system</entry>
- </row>
+ <row>
+ <entry><literal>b</literal></entry>
+ <entry>Normally contains swap space.</entry>
+ </row>
- <row>
- <entry><literal>b</literal></entry>
+ <row>
+ <entry><literal>c</literal></entry>
+ <entry>Normally the same size as the enclosing slice.
+ This allows utilities that need to work on the entire
+ slice, such as a bad block scanner, to work on the
+ <literal>c</literal> partition. You would not normally
+ create a file system on this partition.</entry>
+ </row>
- <entry>Normally contains swap space</entry>
- </row>
+ <row>
+ <entry><literal>d</literal></entry>
+ <entry>Partition <literal>d</literal> used to have a
+ special meaning associated with it, although that is now
+ gone and <literal>d</literal> may work as any normal
+ partition.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
- <row>
- <entry><literal>c</literal></entry>
+ <para>Each partition-that-contains-a-file-system is stored in what
+ &os; calls a <firstterm>slice</firstterm>. Slice is
+ &os;'s term for what the common call partitions, and again,
+ this is because of &os;'s &unix; background. Slices are
+ numbered, starting at 1, through to 4.</para>
+
+ <indexterm><primary>slices</primary></indexterm>
+ <indexterm><primary>partitions</primary></indexterm>
+ <indexterm><primary>dangerously dedicated</primary></indexterm>
+
+ <para>Slice numbers follow the device name, prefixed with an
+ <literal>s</literal>, starting at 1. So
+ <quote>da0<emphasis>s1</emphasis></quote> is the first slice on
+ the first SCSI drive. There can only be four physical slices on
+ a disk, but you can have logical slices inside physical slices
+ of the appropriate type. These extended slices are numbered
+ starting at 5, so <quote>ad0<emphasis>s5</emphasis></quote> is
+ the first extended slice on the first IDE disk. These devices
+ are used by file systems that expect to occupy a slice.</para>
+
+ <para>Slices, <quote>dangerously dedicated</quote> physical
+ drives, and other drives contain
+ <firstterm>partitions</firstterm>, which are represented as
+ letters from <literal>a</literal> to <literal>h</literal>. This
+ letter is appended to the device name, so
+ <quote>da0<emphasis>a</emphasis></quote> is the a partition on
+ the first da drive, which is <quote>dangerously
+ dedicated</quote>. <quote>ad1s3<emphasis>e</emphasis></quote> is
+ the fifth partition in the third slice of the second IDE disk
+ drive.</para>
+
+ <para>Finally, each disk on the system is identified. A disk name
+ starts with a code that indicates the type of disk, and then a
+ number, indicating which disk it is. Unlike slices, disk
+ numbering starts at 0. Common codes that you will see are
+ listed in <xref linkend="basics-dev-codes"/>.</para>
+
+ <para>When referring to a partition, include the disk name,
+ <literal>s</literal>, the slice number, and then the partition
+ letter. Examples are shown in <xref
+ linkend="basics-disk-slice-part"/>.</para>
+
+ <para><xref linkend="basics-concept-disk-model"/> shows a
+ conceptual model of a disk layout.</para>
+
+ <para>When installing &os;, configure the disk slices, create
+ partitions within the slice to be used for &os;, create a file
+ system or swap space in each partition, and decide where each
+ file system will be mounted.</para>
+
+ <table frame="none" pgwide="1" id="basics-dev-codes">
+ <title>Disk Device Codes</title>
- <entry>Normally the same size as the enclosing slice. This
- allows utilities that need to work on the entire slice (for
- example, a bad block scanner) to work on the
- <literal>c</literal> partition. You would not normally create
- a file system on this partition.</entry>
- </row>
+ <tgroup cols="2">
+ <colspec colwidth="1*"/>
+ <colspec colwidth="5*"/>
- <row>
- <entry><literal>d</literal></entry>
+ <thead>
+ <row>
+ <entry>Code</entry>
+ <entry>Meaning</entry>
+ </row>
+ </thead>
- <entry>Partition <literal>d</literal> used to have a special
- meaning associated with it, although that is now gone and
- <literal>d</literal> may work as any normal partition.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
+ <tbody>
+ <row>
+ <entry><devicename>ad</devicename></entry>
+ <entry>ATAPI (IDE) disk</entry>
+ </row>
+
+ <row>
+ <entry><devicename>da</devicename></entry>
+ <entry>SCSI direct access disk</entry>
+ </row>
- <para>Each partition-that-contains-a-file-system is stored in what
- FreeBSD calls a <firstterm>slice</firstterm>. Slice is FreeBSD's term
- for what the common call partitions, and again, this is because of
- FreeBSD's &unix; background. Slices are numbered, starting at 1,
- through to 4.</para>
-
- <indexterm><primary>slices</primary></indexterm>
- <indexterm><primary>partitions</primary></indexterm>
- <indexterm><primary>dangerously dedicated</primary></indexterm>
-
- <para>Slice numbers follow
- the device name, prefixed with an <literal>s</literal>,
- starting at 1. So <quote>da0<emphasis>s1</emphasis></quote>
- is the first slice on the first SCSI drive. There can only be
- four physical slices on a disk, but you can have logical
- slices inside physical slices of the appropriate type. These
- extended slices are numbered starting at 5, so
- <quote>ad0<emphasis>s5</emphasis></quote> is the first
- extended slice on the first IDE disk. These devices are used by file
- systems that expect to occupy a slice.</para>
-
- <para>Slices, <quote>dangerously dedicated</quote> physical
- drives, and other drives contain
- <firstterm>partitions</firstterm>, which are represented as
- letters from <literal>a</literal> to <literal>h</literal>.
- This letter is appended to the device name, so
- <quote>da0<emphasis>a</emphasis></quote> is the a partition on
- the first da drive, which is <quote>dangerously dedicated</quote>.
- <quote>ad1s3<emphasis>e</emphasis></quote> is the fifth partition
- in the third slice of the second IDE disk drive.</para>
-
- <para>Finally, each disk on the system is identified. A disk name
- starts with a code that indicates the type of disk, and then a number,
- indicating which disk it is. Unlike slices, disk numbering starts at
- 0. Common codes that you will see are listed in
- <xref linkend="basics-dev-codes"/>.</para>
-
- <para>When referring to a partition FreeBSD requires that you also name
- the slice and disk that contains the partition, and when referring to
- a slice you must also refer to the disk name.
- Thus, you refer to a partition by listing
- the disk name, <literal>s</literal>, the slice number, and then the
- partition letter. Examples are shown in
- <xref linkend="basics-disk-slice-part"/>.</para>
-
- <para><xref linkend="basics-concept-disk-model"/> shows a conceptual
- model of the disk layout that should help make things clearer.</para>
-
- <para>In order to install FreeBSD you must first configure the disk
- slices, then create partitions within the slice you will use for
- FreeBSD, and then create a file system (or swap space) in each
- partition, and decide where that file system will be mounted.</para>
-
- <table frame="none" pgwide="1" id="basics-dev-codes">
- <title>Disk Device Codes</title>
+ <row>
+ <entry><devicename>acd</devicename></entry>
+ <entry>ATAPI (IDE) CDROM</entry>
+ </row>
+
+ <row>
+ <entry><devicename>cd</devicename></entry>
+ <entry>SCSI CDROM</entry>
+ </row>
+ <row>
+ <entry><devicename>fd</devicename></entry>
+ <entry>Floppy disk</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <example id="basics-disk-slice-part">
+ <title>Sample Disk, Slice, and Partition Names</title>
+
+ <informaltable frame="none" pgwide="1">
<tgroup cols="2">
- <colspec colwidth="1*"/>
- <colspec colwidth="5*"/>
+ <colspec colwidth="1*"/>
+ <colspec colwidth="5*"/>
<thead>
<row>
- <entry>Code</entry>
-
+ <entry>Name</entry>
<entry>Meaning</entry>
</row>
</thead>
<tbody>
<row>
- <entry><devicename>ad</devicename></entry>
-
- <entry>ATAPI (IDE) disk</entry>
- </row>
-
- <row>
- <entry><devicename>da</devicename></entry>
-
- <entry>SCSI direct access disk</entry>
- </row>
-
- <row>
- <entry><devicename>acd</devicename></entry>
-
- <entry>ATAPI (IDE) CDROM</entry>
- </row>
-
- <row>
- <entry><devicename>cd</devicename></entry>
-
- <entry>SCSI CDROM</entry>
+ <entry><literal>ad0s1a</literal></entry>
+ <entry>The first partition (<literal>a</literal>) on the
+ first slice (<literal>s1</literal>) on the first IDE
+ disk (<literal>ad0</literal>).</entry>
</row>
<row>
- <entry><devicename>fd</devicename></entry>
+ <entry><literal>da1s2e</literal></entry>
- <entry>Floppy disk</entry>
+ <entry>The fifth partition (<literal>e</literal>) on the
+ second slice (<literal>s2</literal>) on the second
+ SCSI disk (<literal>da1</literal>).</entry>
</row>
</tbody>
</tgroup>
- </table>
-
- <example id="basics-disk-slice-part">
- <title>Sample Disk, Slice, and Partition Names</title>
-
- <informaltable frame="none" pgwide="1">
- <tgroup cols="2">
- <colspec colwidth="1*"/>
- <colspec colwidth="5*"/>
-
- <thead>
- <row>
- <entry>Name</entry>
-
- <entry>Meaning</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><literal>ad0s1a</literal></entry>
-
- <entry>The first partition (<literal>a</literal>) on the first
- slice (<literal>s1</literal>) on the first IDE disk
- (<literal>ad0</literal>).</entry>
- </row>
-
- <row>
- <entry><literal>da1s2e</literal></entry>
-
- <entry>The fifth partition (<literal>e</literal>) on the
- second slice (<literal>s2</literal>) on the second SCSI disk
- (<literal>da1</literal>).</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </example>
-
- <example id="basics-concept-disk-model">
- <title>Conceptual Model of a Disk</title>
-
- <para>This diagram shows FreeBSD's view of the first IDE disk attached
- to the system. Assume that the disk is 4&nbsp;GB in size, and contains
- two 2&nbsp;GB slices (&ms-dos; partitions). The first slice contains a &ms-dos;
- disk, <devicename>C:</devicename>, and the second slice contains a
- FreeBSD installation. This example FreeBSD installation has three
- data partitions, and a swap partition.</para>
-
- <para>The three partitions will each hold a file system. Partition
- <literal>a</literal> will be used for the root file system,
- <literal>e</literal> for the <filename>/var</filename> directory
- hierarchy, and <literal>f</literal> for the
- <filename>/usr</filename> directory hierarchy.</para>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="install/disk-layout" format="EPS"/>
- </imageobject>
-
- <textobject>
- <literallayout class="monospaced">.-----------------. --.
+ </informaltable>
+ </example>
+
+ <example id="basics-concept-disk-model">
+ <title>Conceptual Model of a Disk</title>
+
+ <para>This diagram shows &os;'s view of the first IDE disk
+ attached to the system. Assume that the disk is 4&nbsp;GB in
+ size, and contains two 2&nbsp;GB slices (&ms-dos; partitions).
+ The first slice contains a &ms-dos; disk,
+ <devicename>C:</devicename>, and the second slice contains a
+ &os; installation. This example &os; installation has
+ three data partitions, and a swap partition.</para>
+
+ <para>The three partitions will each hold a file system.
+ Partition <literal>a</literal> will be used for the root file
+ system, <literal>e</literal> for the <filename
+ class="directory">/var/</filename> directory hierarchy, and
+ <literal>f</literal> for the <filename
+ class="directory">/usr/</filename> directory
+ hierarchy.</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="install/disk-layout" format="EPS"/>
+ </imageobject>
+
+ <textobject>
+ <literallayout class="monospaced">.-----------------. --.
| | |
| DOS / Windows | |
: : &gt; First slice, ad0s1
@@ -1570,41 +1547,44 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
| | | |
| | --' |
`-----------------' --'</literallayout>
- </textobject>
- </mediaobject>
- </example>
+ </textobject>
+ </mediaobject>
+ </example>
</sect1>
-
-
<sect1 id="mount-unmount">
<title>Mounting and Unmounting File Systems</title>
<para>The file system is best visualized as a tree,
- rooted, as it were, at <filename>/</filename>.
- <filename>/dev</filename>, <filename>/usr</filename>, and the
+ rooted, as it were, at <filename class="directory">/</filename>.
+ <filename class="directory">/dev</filename>,
+ <filename class="directory">/usr</filename>, and the
other directories in the root directory are branches, which may
have their own branches, such as
- <filename>/usr/local</filename>, and so on.</para>
+ <filename class="directory">/usr/local</filename>, and so
+ on.</para>
<indexterm><primary>root file system</primary></indexterm>
<para>There are various reasons to house some of these
- directories on separate file systems. <filename>/var</filename>
- contains the directories <filename>log/</filename>,
- <filename>spool/</filename>,
- and various types of temporary files, and
- as such, may get filled up. Filling up the root file system
- is not a good idea, so splitting <filename>/var</filename> from
- <filename>/</filename> is often favorable.</para>
+ directories on separate file systems. <filename
+ class="directory">/var</filename> contains the directories
+ <filename class="directory">log/</filename>,
+ <filename class="directory">spool/</filename>, and various types
+ of temporary files, and as such, may get filled up. Filling up
+ the root file system is not a good idea, so splitting <filename
+ class="directory">/var</filename> from
+ <filename class="directory">/</filename> is often
+ favorable.</para>
<para>Another common reason to contain certain directory trees on
other file systems is if they are to be housed on separate
- physical disks, or are separate virtual disks, such as <link
- linkend="network-nfs">Network File System</link> mounts, or CDROM
- drives.</para>
+ physical disks, or are separate virtual disks, such as
+ <link linkend="network-nfs">Network File System</link> mounts,
+ or CDROM drives.</para>
<sect2 id="disks-fstab">
<title>The <filename>fstab</filename> File</title>
+
<indexterm>
<primary>file systems</primary>
<secondary>mounted with fstab</secondary>
@@ -1612,11 +1592,9 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<para>During the <link linkend="boot">boot process</link>,
file systems listed in <filename>/etc/fstab</filename> are
- automatically mounted (unless they are listed with the
- <option>noauto</option> option).</para>
-
- <para>The <filename>/etc/fstab</filename> file contains a list
- of lines of the following format:</para>
+ automatically mounted except for the entries containing
+ <option>noauto</option>. This file contains entries in the
+ following format:</para>
<programlisting><replaceable>device</replaceable> <replaceable>/mount-point</replaceable> <replaceable>fstype</replaceable> <replaceable>options</replaceable> <replaceable>dumpfreq</replaceable> <replaceable>passno</replaceable></programlisting>
@@ -1624,7 +1602,7 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<varlistentry>
<term><literal>device</literal></term>
<listitem>
- <para>A device name (which should exist), as explained in
+ <para>An existing device name as explained in
<xref linkend="disks-naming"/>.</para>
</listitem>
</varlistentry>
@@ -1632,16 +1610,18 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<varlistentry>
<term><literal>mount-point</literal></term>
- <listitem><para>A directory (which should exist), on which
- to mount the file system.</para>
+ <listitem>
+ <para>An existing directory on which to mount the file
+ system.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>fstype</literal></term>
- <listitem><para>The file system type to pass to
- &man.mount.8;. The default FreeBSD file system is
+ <listitem>
+ <para>The file system type to pass to &man.mount.8;. The
+ default &os; file system is
<literal>ufs</literal>.</para>
</listitem>
</varlistentry>
@@ -1649,65 +1629,66 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<varlistentry>
<term><literal>options</literal></term>
- <listitem><para>Either <option>rw</option> for read-write
- file systems, or <option>ro</option> for read-only
- file systems, followed by any other options that may be
+ <listitem>
+ <para>Either <option>rw</option> for read-write
+ file systems, or <option>ro</option> for read-only file
+ systems, followed by any other options that may be
needed. A common option is <option>noauto</option> for
- file systems not normally mounted during the boot sequence.
- Other options are listed in the &man.mount.8; manual page.</para>
+ file systems not normally mounted during the boot
+ sequence. Other options are listed in
+ &man.mount.8;.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>dumpfreq</literal></term>
- <listitem><para>This is used by &man.dump.8; to determine which
- file systems require dumping. If the field is missing,
- a value of zero is assumed.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><literal>passno</literal></term>
-
- <listitem>
- <para>This determines the order in which file systems should
- be checked. File systems that should be skipped should have
- their <literal>passno</literal> set to zero. The root
- file system (which needs to be checked before everything
- else) should have its <literal>passno</literal> set to
- one, and other file systems' <literal>passno</literal>
- should be set to values greater than one. If more than one
- file systems have the same <literal>passno</literal> then
- &man.fsck.8; will attempt to check file systems in parallel
- if possible.</para>
- </listitem>
+ <listitem>
+ <para>Used by &man.dump.8; to determine which file systems
+ require dumping. If the field is missing, a value of
+ zero is assumed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>passno</literal></term>
+
+ <listitem>
+ <para>Determines the order in which file systems should be
+ checked. File systems that should be skipped should
+ have their <literal>passno</literal> set to zero. The
+ root file system needs to be checked before everything
+ else and should have its <literal>passno</literal> set
+ to one. The other file systems should be set to
+ values greater than one. If more than one file system
+ has the same <literal>passno</literal>, &man.fsck.8;
+ will attempt to check file systems in parallel if
+ possible.</para>
+ </listitem>
</varlistentry>
</variablelist>
- <para>Consult the &man.fstab.5; manual page for more information
- on the format of the <filename>/etc/fstab</filename> file and
- the options it contains.</para>
+ <para>Refer to &man.fstab.5; for more information on the format
+ of <filename>/etc/fstab</filename> and its options.</para>
</sect2>
<sect2 id="disks-mount">
<title>The <command>mount</command> Command</title>
+
<indexterm>
<primary>file systems</primary>
<secondary>mounting</secondary>
</indexterm>
- <para>The &man.mount.8; command is what is ultimately used to
- mount file systems.</para>
-
- <para>In its most basic form, you use:</para>
+ <para>File systems are mounted using &man.mount.8;. The most
+ basic syntax is as follows:</para>
<informalexample>
<screen>&prompt.root; <userinput>mount <replaceable>device</replaceable> <replaceable>mountpoint</replaceable></userinput></screen>
</informalexample>
- <para>There are plenty of options, as mentioned in the
- &man.mount.8; manual page, but the most common are:</para>
+ <para>This command provides many options which are described in
+ &man.mount.8;, The most commonly used options include:</para>
<variablelist>
<title>Mount Options</title>
@@ -1717,8 +1698,8 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<listitem>
<para>Mount all the file systems listed in
- <filename>/etc/fstab</filename>. Except those
- marked as <quote>noauto</quote>, excluded by the
+ <filename>/etc/fstab</filename>, except those marked as
+ <quote>noauto</quote>, excluded by the
<option>-t</option> flag, or those that are already
mounted.</para>
</listitem>
@@ -1728,10 +1709,11 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<term><option>-d</option></term>
<listitem>
- <para>Do everything except for the actual mount system call.
- This option is useful in conjunction with the
- <option>-v</option> flag to determine what
- &man.mount.8; is actually trying to do.</para>
+
+ <para>Do everything except for the actual mount system
+ call. This option is useful in conjunction with the
+ <option>-v</option> flag to determine what &man.mount.8;
+ is actually trying to do.</para>
</listitem>
</varlistentry>
@@ -1740,20 +1722,18 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<listitem>
<para>Force the mount of an unclean file system
- (dangerous), or forces the revocation of write access
- when downgrading a file system's mount status from
- read-write to read-only.</para>
+ (dangerous), or the revocation of write access when
+ downgrading a file system's mount status from read-write
+ to read-only.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-r</option></term>
+ <term><option>-r</option></term>
<listitem>
<para>Mount the file system read-only. This is identical
- to using the <option>ro</option>
- argument to the
- <option>-o</option> option.</para>
+ to using <option>-o ro</option>.</para>
</listitem>
</varlistentry>
@@ -1762,12 +1742,10 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<replaceable>fstype</replaceable></term>
<listitem>
- <para>Mount the given file system as the given file system
- type, or mount only file systems of the given type, if
- given the <option>-a</option> option.</para>
-
- <para><quote>ufs</quote> is the default file system
- type.</para>
+ <para>Mount the specified file system type or mount only
+ file systems of the given type, if <option>-a</option>
+ is included. <quote>ufs</quote> is the default file
+ system type.</para>
</listitem>
</varlistentry>
@@ -1796,16 +1774,16 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
</varlistentry>
</variablelist>
- <para>The <option>-o</option> option takes a comma-separated list of
- the options, including the following:</para>
+ <para>The following options can be passed to <option>-o</option>
+ as a comma-separated list:</para>
<variablelist>
<varlistentry>
<term>noexec</term>
<listitem>
- <para>Do not allow execution of binaries on this
- file system. This is also a useful security option.</para>
+ <para>Do not allow execution of binaries on this file
+ system. This is also a useful security option.</para>
</listitem>
</varlistentry>
@@ -1814,7 +1792,8 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<listitem>
<para>Do not interpret setuid or setgid flags on the
- file system. This is also a useful security option.</para>
+ file system. This is also a useful security
+ option.</para>
</listitem>
</varlistentry>
</variablelist>
@@ -1822,63 +1801,60 @@ root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd</screen>
<sect2 id="disks-umount">
<title>The <command>umount</command> Command</title>
+
<indexterm>
<primary>file systems</primary>
<secondary>unmounting</secondary>
</indexterm>
- <para>The &man.umount.8; command takes, as a parameter, one of a
- mountpoint, a device name, or the <option>-a</option> or
- <option>-A</option> option.</para>
+ <para>To unmount a filesystem use &man.umount.8;. This command
+ takes one parameter which can be a mountpoint, device name,
+ <option>-a</option> or <option>-A</option>.</para>
<para>All forms take <option>-f</option> to force unmounting,
- and <option>-v</option> for verbosity. Be warned that
- <option>-f</option> is not generally a good idea. Forcibly
- unmounting file systems might crash the computer or damage data
- on the file system.</para>
-
- <para><option>-a</option> and <option>-A</option> are used to
- unmount all mounted file systems, possibly modified by the
- file system types listed after <option>-t</option>.
- <option>-A</option>, however, does not attempt to unmount the
- root file system.</para>
+ and <option>-v</option> for verbosity. Be warned that
+ <option>-f</option> is not generally a good idea as it might
+ crash the computer or damage data on the file system.</para>
+
+ <para>To unmount all mounted file systems, or just the file
+ system types listed after <option>-t</option>, use
+ <option>-a</option> or <option>-A</option>. Note that
+ <option>-A</option> does not attempt to unmount the root file
+ system.</para>
</sect2>
</sect1>
<sect1 id="basics-processes">
<title>Processes</title>
- <para>FreeBSD is a multi-tasking operating system. This means that it
- seems as though more than one program is running at once. Each program
- running at any one time is called a <firstterm>process</firstterm>.
- Every command you run will start at least one new process, and there are
- a number of system processes that run all the time, keeping the system
- functional.</para>
+ <para>&os; is a multi-tasking operating system. Each program
+ running at any one time is called a
+ <firstterm>process</firstterm>. Every running command starts
+ at least one new process and there are a number of system
+ processes that are run by &os;.</para>
<para>Each process is uniquely identified by a number called a
- <firstterm>process ID</firstterm>, or <firstterm>PID</firstterm>, and,
- like files, each process also has one owner and group. The owner and
- group information is used to determine what files and devices the
- process can open, using the file permissions discussed earlier. Most
- processes also have a parent process. The parent process is the process
- that started them. For example, if you are typing commands to the shell
- then the shell is a process, and any commands you run are also
- processes. Each process you run in this way will have your shell as its
- parent process. The exception to this is a special process called
- &man.init.8;. <command>init</command> is always the first
- process, so its PID is always 1. <command>init</command> is started
- automatically by the kernel when FreeBSD starts.</para>
-
- <para>Two commands are particularly useful to see the processes on the
- system, &man.ps.1; and &man.top.1;. The <command>ps</command> command is used to
- show a static list of the currently running processes, and can show
- their PID, how much memory they are using, the command line they were
- started with, and so on. The <command>top</command> command displays all the
- running processes, and updates the display every few seconds, so that
- you can interactively see what your computer is doing.</para>
-
- <para>By default, <command>ps</command> only shows you the commands that are running
- and are owned by you. For example:</para>
+ <firstterm>process ID</firstterm>
+ (<firstterm>PID</firstterm>). Similar to files, each process
+ has one owner and group, and the owner and group