Add ~105 new index entries.

This commit is contained in:
Murray Stokely 2001-06-25 12:41:15 +00:00
parent 5cb9e67a8a
commit 109c529fc7
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9703
2 changed files with 192 additions and 75 deletions

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v 1.29 2001/06/21 17:20:56 murray Exp $
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v 1.30 2001/06/23 06:57:01 dd Exp $
-->
<chapter id="disks">
@ -19,8 +19,10 @@
<para>Before you install and configure FreeBSD on your system, there is an
important subject that you should be aware of if, especially if you have
multiple hard drives.</para>
multiple hard drives.</para>
<indexterm><primary>DOS</primary></indexterm>
<indexterm><primary>Microsoft Windows</primary></indexterm>
<para>In a PC running DOS or any of the BIOS-dependent operating systems
(WINxxx), the BIOS is able to abstract the normal disk drive order, and
the operating system goes along with the change. This allows the user
@ -34,6 +36,8 @@
to logically swap the drives. It's like switching the cables on the
drives, but without having to open the case.</para>
<indexterm><primary>SCSI</primary></indexterm>
<indexterm><primary>BIOS</primary></indexterm>
<para>More expensive systems with SCSI controllers often include BIOS
extensions which allow the SCSI drives to be re-ordered in a similar
fashion for up to seven drives.</para>
@ -116,6 +120,10 @@
<sect1 id="disks-naming">
<title>Disk Naming</title>
<indexterm><primary>IDE</primary></indexterm>
<indexterm><primary>SCSI</primary></indexterm>
<indexterm><primary>RAID</primary></indexterm>
<indexterm><primary>fash memory</primary></indexterm>
<para>Physical drives come in two main flavors,
<acronym>IDE</acronym>, or <acronym>SCSI</acronym>; but there
are also drives backed by RAID controllers, flash memory, and so
@ -192,7 +200,9 @@
<sect2>
<title>Slices and Partitions</title>
<indexterm><primary>slices</primary></indexterm>
<indexterm><primary>partitions</primary></indexterm>
<indexterm><primary>dangerously dedicated</primary></indexterm>
<para>Physical disks usually contain
<firstterm>slices</firstterm>, unless they are
<quote>dangerously dedicated</quote>. Slice numbers follow
@ -220,6 +230,7 @@
have their own branches, such as
<filename>/usr/local</filename>, and so on.</para>
<indexterm><primary>root filesystem</primary></indexterm>
<para>There are various reasons to house some of these
directories on separate filesystems. <filename>/var</filename>
contains log, spool, and various types of temporary files, and
@ -235,6 +246,8 @@
<sect2 id="disks-fstab">
<title>The fstab File</title>
<indexterm><primary>filesystems</primary><secondary>mounted with
fstab</secondary></indexterm>
<para>During the <link linkend="boot">boot process</link>,
filesystems listed in <filename>/etc/fstab</filename> are
@ -272,6 +285,7 @@
<sect2 id="disks-mount">
<title>The mount Command</title>
<indexterm><primary>filesystems</primary><secondary>mounting</secondary></indexterm>
<para>The &man.mount.8; command is what is ultimately used to
mount filesystems.</para>
@ -397,6 +411,7 @@
<sect2 id="disks-umount">
<title>The umount Command</title>
<indexterm><primary>filesystems</primary><secondary>unmounting</secondary></indexterm>
<para>The umount command takes, as a parameter, one of a
mountpoint, a device name, or the <option>-a</option> or
@ -415,15 +430,17 @@
<sect1 id="disks-adding">
<title>Adding Disks</title>
<indexterm><primary>disks</primary><secondary>adding</secondary></indexterm>
<para><emphasis>Originally contributed by &a.obrien; 26 April
1998</emphasis></para>
<para>Lets say we want to add a new SCSI disk to a machine that currently
only has a single drive. First turn off the computer and install the
drive in the computer following the instructions of the computer,
controller, and drive manufacturer. Due the wide variations of procedures
to do this, the details are beyond the scope of this document.</para>
<para>Lets say we want to add a new SCSI disk to a machine that
currently only has a single drive. First turn off the computer
and install the drive in the computer following the instructions
of the computer, controller, and drive manufacturer. Due the
wide variations of procedures to do this, the details are beyond
the scope of this document.</para>
<para>Login as user <username>root</username>. After you've installed the
drive, inspect <filename>/var/run/dmesg.boot</filename> to ensure the new
@ -433,77 +450,92 @@
be <filename>wd1</filename> in pre-4.0 systems, or
<filename>ad1</filename> in most 4.X systems).</para>
<para>Because FreeBSD runs on IBM-PC compatible computers, it must take into
account the PC BIOS partitions. These are different from the traditional
BSD partitions. A PC disk has up to four BIOS partition entries. If the
disk is going to be truly dedicated to FreeBSD, you can use the
<emphasis>dedicated</emphasis> mode. Otherwise, FreeBSD will have to live
with in one of the PC BIOS partitions. FreeBSD calls the PC BIOS
partitions <emphasis>slices</emphasis> so as not to confuse them with
traditional BSD partitions. You may also use slices on a disk that is
dedicated to FreeBSD, but used in a computer that also has another
operating system installed. This is to not confuse the
<command>fdisk</command> utility of the other operating system.</para>
<indexterm><primary>partitions</primary></indexterm>
<indexterm><primary>slices</primary></indexterm>
<indexterm><primary>fdisk</primary></indexterm>
<para>Because FreeBSD runs on IBM-PC compatible computers, it must
take into account the PC BIOS partitions. These are different
from the traditional BSD partitions. A PC disk has up to four
BIOS partition entries. If the disk is going to be truly
dedicated to FreeBSD, you can use the
<emphasis>dedicated</emphasis> mode. Otherwise, FreeBSD will
have to live with in one of the PC BIOS partitions. FreeBSD
calls the PC BIOS partitions <emphasis>slices</emphasis> so as
not to confuse them with traditional BSD partitions. You may
also use slices on a disk that is dedicated to FreeBSD, but used
in a computer that also has another operating system installed.
This is to not confuse the <command>fdisk</command> utility of
the other operating system.</para>
<para>In the slice case the drive will be added as
<filename>/dev/da1s1e</filename>. This is read as: SCSI disk, unit number
1 (second SCSI disk), slice 1 (PC BIOS partition 1), and
<filename>e</filename> BSD partition. In the dedicated case, the drive
will be added simply as <filename>/dev/da1e</filename>.</para>
<filename>/dev/da1s1e</filename>. This is read as: SCSI disk,
unit number 1 (second SCSI disk), slice 1 (PC BIOS partition 1),
and <filename>e</filename> BSD partition. In the dedicated
case, the drive will be added simply as
<filename>/dev/da1e</filename>.</para>
<sect2>
<title>Using sysinstall</title>
<para>You may use <command>/stand/sysinstall</command> to partition and
label a new disk using its easy to use menus. Either login as user
<username>root</username> or use the <command>su</command> command. Run
<indexterm><primary>sysinstall</primary><secondary>adding disks</secondary></indexterm>
<para>You may use <command>/stand/sysinstall</command> to
partition and label a new disk using its easy to use menus.
Either login as user <username>root</username> or use the
<command>su</command> command. Run
<command>/stand/sysinstall</command> and enter the
<literal>Configure</literal> menu. With in the <literal>FreeBSD
Configuration Menu</literal>, scroll down and select the
<literal>Partition</literal> item. Next you should be presented with a
list of hard drives installed in your system. If you do not see
<literal>da1</literal> listed, you need to recheck your physical
installation and <command>dmesg</command> output in the file
<literal>Configure</literal> menu. With in the
<literal>FreeBSD Configuration Menu</literal>, scroll down and
select the <literal>Partition</literal> item. Next you should
be presented with a list of hard drives installed in your
system. If you do not see <literal>da1</literal> listed, you
need to recheck your physical installation and
<command>dmesg</command> output in the file
<filename>/var/run/dmesg.boot</filename>.</para>
<para>Select <literal>da1</literal> to enter the <literal>FDISK Partition
Editor</literal>. Choose <literal>A</literal> to use the entire disk
for FreeBSD. When asked if you want to <quote>remain cooperative with
any future possible operating systems</quote>, answer
<literal>YES</literal>. Write the changes to the disk using
<command>W</command>. Now exit the FDISK editor using
<command>q</command>. Next you will be asked about the Master Boot
Record. Since you are adding a disk to an already running system,
choose <literal>None</literal>.</para>
<para>Select <literal>da1</literal> to enter the <literal>FDISK
Partition Editor</literal>. Choose <literal>A</literal> to
use the entire disk for FreeBSD. When asked if you want to
<quote>remain cooperative with any future possible operating
systems</quote>, answer <literal>YES</literal>. Write the
changes to the disk using <command>W</command>. Now exit the
FDISK editor using <command>q</command>. Next you will be
asked about the Master Boot Record. Since you are adding a
disk to an already running system, choose
<literal>None</literal>.</para>
<para>Next enter the <literal>Disk Label Editor</literal>. This is where
you will create the traditional BSD partitions. A disk can have up to
eight partitions, labeled a-h. A few of the partition labels have
special uses. The <literal>a</literal> partition is used for the root
partition (<filename>/</filename>). Thus only your system disk (e.g,
the disk you boot from) should have an <literal>a</literal> partition.
The <literal>b</literal> partition is used for swap partitions, and you
may have many disks with swap partitions. The <literal>c</literal>
partition addresses the entire disk in dedicated mode, or the entire
FreeBSD slice in slice mode. The other partitions are for general
use.</para>
<indexterm><primary>BSD partitions</primary></indexterm>
<para>Next enter the <literal>Disk Label Editor</literal>. This
is where you will create the traditional BSD partitions. A
disk can have up to eight partitions, labeled a-h. A few of
the partition labels have special uses. The
<literal>a</literal> partition is used for the root partition
(<filename>/</filename>). Thus only your system disk (e.g,
the disk you boot from) should have an <literal>a</literal>
partition. The <literal>b</literal> partition is used for
swap partitions, and you may have many disks with swap
partitions. The <literal>c</literal> partition addresses the
entire disk in dedicated mode, or the entire FreeBSD slice in
slice mode. The other partitions are for general use.</para>
<para>Sysinstall's Label editor favors the <literal>e</literal> partition
for non-root, non-swap partitions. With in the Label editor, create a
single file system using <command>C</command>. When prompted if this
will be a FS (file system) or swap, choose <literal>FS</literal> and
give a mount point (e.g, <filename>/mnt</filename>). When adding a disk
in post-install mode, Sysinstall will not create entries in
<filename>/etc/fstab</filename> for you, so the mount point you specify
isn't important.</para>
<para>Sysinstall's Label editor favors the <literal>e</literal>
partition for non-root, non-swap partitions. With in the
Label editor, create a single file system using
<command>C</command>. When prompted if this will be a FS
(file system) or swap, choose <literal>FS</literal> and give a
mount point (e.g, <filename>/mnt</filename>). When adding a
disk in post-install mode, Sysinstall will not create entries
in <filename>/etc/fstab</filename> for you, so the mount point
you specify isn't important.</para>
<para>You are now ready to write the new label to the disk and create a
file system on it. Do this by hitting <command>W</command>. Ignore any
errors from Sysinstall that it could not mount the new partition. Exit
the Label Editor and Sysinstall completely.</para>
<para>You are now ready to write the new label to the disk and
create a file system on it. Do this by hitting
<command>W</command>. Ignore any errors from Sysinstall that
it could not mount the new partition. Exit the Label Editor
and Sysinstall completely.</para>
<para>The last step is to edit <filename>/etc/fstab</filename> to add an
entry for your new disk.</para>
<para>The last step is to edit <filename>/etc/fstab</filename>
to add an entry for your new disk.</para>
</sect2>
<sect2>
@ -535,6 +567,7 @@
<sect3>
<title>Dedicated</title>
<indexterm><primary>OS/2</primary></indexterm>
<para>If you will not be sharing the new drive with another operating
system, you may use the <literal>dedicated</literal> mode. Remember
@ -565,12 +598,17 @@
<sect1 id="disks-virtual">
<title>Virtual Disks: Network, Memory, and File-Based Filesystems</title>
<indexterm><primary>virtual disks</primary></indexterm>
<indexterm><primary>disks</primary><secondary>virtual</secondary></indexterm>
<para>Aside from the disks you physically insert into your computer:
floppies, CDs, hard drives, and so forth; other forms of disks
are understood by FreeBSD - the <firstterm>virtual
disks</firstterm>.</para>
<indexterm><primary>NFS</primary></indexterm>
<indexterm><primary>Coda</primary></indexterm>
<indexterm><primary>disks</primary><secondary>memory</secondary></indexterm>
<para>These include network filesystems such as the <link
linkend="nfs">Network Filesystem</link> and Coda, memory-based
filesystems such as <link linkend="disks-md">md</link> and
@ -579,6 +617,7 @@
<sect2 id="disks-vnconfig">
<title>vnconfig: file-backed filesystem</title>
<indexterm><primary>disks</primary><secondary>file-backed</secondary></indexterm>
<para>&man.vnconfig.8; configures and enables vnode pseudo disk
devices. A <firstterm>vnode</firstterm> is a representation
@ -622,6 +661,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<sect2 id="disks-md">
<title>md: Memory Filesystem</title>
<indexterm><primary>disks</primary><secondary>memory</secondary></indexterm>
<para>md is a simple, efficient means to do memory
filesystems.</para>
@ -645,6 +685,9 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<sect1 id="quotas">
<title>Disk Quotas</title>
<indexterm><primary>accounting</primary><secondary>disk
space</secondary></indexterm>
<indexterm><primary>disk quotas</primary></indexterm>
<para>Quotas are an optional feature of the operating system that
allow you to limit the amount of disk space and/or the number of
@ -676,7 +719,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
line:</para>
<programlisting>enable_quotas=<quote>YES</quote></programlisting>
<indexterm><primary>disk quotas</primary><secondary>checking</secondary></indexterm>
<para>For finer control over your quota startup, there is an
additional configuration variable available. Normally on bootup,
the quota integrity of each file system is checked by the
@ -740,6 +783,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<sect2>
<title>Setting Quota Limits</title>
<indexterm><primary>disk quotas</primary><secondary>limits</secondary></indexterm>
<para>Once you have configured your system to enable quotas, verify
that they really are enabled. An easy way to do this is to
@ -761,6 +805,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
combination of both. Each of these limits are further broken down
into two categories; hard and soft limits.</para>
<indexterm><primary>hard limit</primary></indexterm>
<para>A hard limit may not be exceeded. Once a user reaches his
hard limit he may not make any further allocations on the file
system in question. For example, if the user has a hard limit of
@ -768,6 +813,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
user can only allocate an additional 10 blocks. Attempting to
allocate an additional 11 blocks will fail.</para>
<indexterm><primary>soft limit</primary></indexterm>
<para>Soft limits, on the other hand, can be exceeded for a limited
amount of time. This period of time is known as the grace period,
which is one week by default. If a user stays over his or her
@ -825,6 +871,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<sect2>
<title>Checking Quota Limits and Disk Usage</title>
<indexterm><primary>disk quotas</primary><secondary>checking</secondary></indexterm>
<para>You can use either the <command>quota</command> or the
<command>repquota</command> commands to check quota limits and
@ -845,6 +892,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
/usr 65* 50 75 5days 7 50 60
/usr/var 0 50 75 0 50 60</programlisting>
<indexterm><primary>grace period</primary></indexterm>
<para>On the <filename>/usr</filename> file system in the above
example this user is currently 15 blocks over the soft limit of
50 blocks and has 5 days of the grace period left. Note the
@ -862,6 +910,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<sect2>
<title>Quotas over NFS</title>
<indexterm><primary>NFS</primary></indexterm>
<para>Quotas are enforced by the quota subsystem on the NFS server.
The &man.rpc.rquotad.8; daemon makes quota information available
@ -881,6 +930,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<sect1 id="creating-cds">
<title>Creating CDs</title>
<indexterm><primary>CDROMs</primary><secondary>creating</secondary></indexterm>
<para><emphasis>Contributed by Mike Meyer
<email>mwm@mired.org</email>, April 2001.</emphasis></para>
@ -901,18 +951,22 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
to make up the tracks on the CD, then write the tracks to the
CD.</para>
<indexterm><primary>ISO 9660</primary></indexterm>
<indexterm><primary>filesystems</primary><secondary>ISO-9660</secondary></indexterm>
<para>The ISO 9660 file system was designed to deal with these
differences. It unfortunately codifies file system limits that were
common then. Fortunately, it provides an extension mechanism that
allows properly written CDs to exceed those limits while still
working with systems that do not support those extensions.</para>
<indexterm><primary>mkisofs</primary></indexterm>
<para>The <command><link linkend="mkisofs">mkisofs</link></command>
program is used to produce a data file containing an ISO 9660 file
system. It has options that support various extensions, and is
described below. You can install it with the <filename>
/usr/ports/sysutils/mkisofs</filename> port.</para>
<indexterm><primary>CD burner</primary><secondary>ATAPI</secondary></indexterm>
<para>Which tool to use to burn the CD depends on whether your CD burner
is ATAPI or something else. ATAPI CD burners use the <command><link
linkend="burncd">burncd</link></command> program that is part of
@ -930,6 +984,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<screen>&prompt.root; <userinput>mkisofs <option>-o</option> <replaceable>imagefile.iso</replaceable> <replaceable>/path/to/tree</replaceable></userinput></screen>
<indexterm><primary>filesystems</primary><secondary>ISO-9660</secondary></indexterm>
<para>This command will create an <replaceable>imagefile</replaceable>
containing an ISO 9660 file system that is a copy of the tree at
<replaceable>/path/to/tree</replaceable>. In the process, it will
@ -939,6 +994,8 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
for details of this process, and options that can be used to
control it.</para>
<indexterm><primary>filesystems</primary><secondary>HFS</secondary></indexterm>
<indexterm><primary>filesystems</primary><secondary>Joliet</secondary></indexterm>
<para>A number of options are available to overcome those
restrictions. In particular, <option>-R</option> enables the
Rock Ridge extensions common to Unix systems, <option>-J</option>
@ -953,7 +1010,8 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
file system image that is identical to the FreeBSD tree you started
from, though it may violate the ISO 9660 standard in a number of
ways.</para>
<indexterm><primary>CDROMs</primary><secondary>creating bootable</secondary></indexterm>
<para>The last option of general use is <option>-b</option>. This is
used to specify the location of the boot image for use in producing an
<quote>El Torito</quote> bootable CD. This option takes an
@ -983,7 +1041,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<sect2 id="burncd">
<title>burncd</title>
<indexterm><primary>CDROMs</primary><secondary>burning</secondary></indexterm>
<para>If you have an ATAPI CD burner, you can use the
<command>burncd</command> command to burn an ISO image onto a
CD. <command>burncd</command> is part of the base system, installed
@ -1024,7 +1082,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
the <option>dev</option> to use. To find the proper setting, use
the <option>-scanbus</option> flag of <command>cdrecord</command>,
which might produce results like this:</para>
<indexterm><primary>CDROMs</primary><secondary>burning</secondary></indexterm>
<screen>&prompt.root; <userinput>cdrecord <option>-scanbus</option></userinput>
Cdrecord 1.9 (i386-unknown-freebsd4.2) Copyright (C) 1995-2000 J&ouml;rg Schilling
Using libscg version 'schily-0.1'

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/printing/chapter.sgml,v 1.34 2001/05/28 13:41:59 sheldonh Exp $
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/printing/chapter.sgml,v 1.35 2001/06/23 06:57:04 dd Exp $
-->
<chapter id="printing">
@ -12,6 +12,8 @@
<sect1>
<title>Synopsis</title>
<indexterm><primary>LPD spooling system</primary></indexterm>
<indexterm><primary>printing</primary></indexterm>
<para>In order to use printers with FreeBSD, you will need to set them
up to work with the Berkeley line printer spooling system, also
@ -38,6 +40,7 @@
attached to other hosts on the network.</para>
</listitem>
<indexterm><primary>print jobs</primary></indexterm>
<listitem>
<para>It enables users to submit files to be printed; these
submissions are known as <emphasis>jobs</emphasis>.</para>
@ -96,6 +99,7 @@
for data to be copied to the printer.</para>
</listitem>
<indexterm><primary>TeX</primary></indexterm>
<listitem>
<para>LPD can conveniently run a job to be printed through
filters to add date/time headers or convert a special file
@ -190,6 +194,7 @@
or both of the following interfaces:</para>
<itemizedlist>
<indexterm><primary>printer</primary><secondary>serial</secondary></indexterm>
<listitem>
<para><emphasis>Serial</emphasis> interfaces use a serial
port on your computer to send data to the printer. Serial
@ -200,6 +205,7 @@
options.</para>
</listitem>
<indexterm><primary>printer</primary><secondary>parallel</secondary></indexterm>
<listitem>
<para><emphasis>Parallel</emphasis> interfaces use a
parallel port on your computer to send data to the
@ -209,6 +215,7 @@
options with parallel interfaces, making their
configuration exceedingly simple.</para>
<indexterm><primary>centronics (see parallel printers)</primary></indexterm>
<para>Parallel interfaces are sometimes known as
<quote>Centronics</quote> interfaces, named after the
connector type on the printer.</para>
@ -222,6 +229,7 @@
can communicate in both directions under FreeBSD when a
IEEE1284 compliant cable is used.</para>
<indexterm><primary>PostScript</primary></indexterm>
<para>Usually, the only time you need two-way communication with
the printer is if the printer speaks PostScript. PostScript
printers can be very verbose. In fact, PostScript jobs are
@ -274,6 +282,7 @@
<quote>DTE-to-DCE</quote> cable.</para>
</listitem>
<indexterm><primary>null-modem cable</primary></indexterm>
<listitem>
<para>A <emphasis>null-modem</emphasis> cable connects some
pins straight through, swaps others (send data to receive
@ -284,12 +293,15 @@
<listitem>
<para>A <emphasis>serial printer</emphasis> cable, required
for some unusual printers, is like the null modem cable,
for some unusual printers, is like the null-modem cable,
but sends some signals to their counterparts instead of
being internally shorted.</para>
</listitem>
</itemizedlist>
<indexterm><primary>baud rate</primary></indexterm>
<indexterm><primary>parity</primary></indexterm>
<indexterm><primary>flow control protocol</primary></indexterm>
<para>You should also set up the communications parameters for
the printer, usually through front-panel controls or DIP
switches on the printer. Choose the highest
@ -547,6 +559,7 @@ sio2: type 16550A</screen>
the program &man.lptest.1; is perfect: it generates all 96
printable ASCII characters in 96 lines.</para>
<indexterm><primary>PostScript</primary></indexterm>
<para>For a PostScript (or other language-based) printer, we
will need a more sophisticated test. A small PostScript
program, such as the following, will suffice:</para>
@ -561,6 +574,7 @@ showpage</programlisting>
used as shown in the examples appearing in the following
sections.</para>
<indexterm><primary>PCL</primary></indexterm>
<note>
<para>When this document refers to a printer language, it is
assuming a language like PostScript, and not Hewlett
@ -574,6 +588,7 @@ showpage</programlisting>
<sect5 id="printing-checking-parallel">
<title>Checking a Parallel Printer</title>
<indexterm><primary>printer</primary><secondary>parallel</secondary></indexterm>
<para>This section tells you how to check if FreeBSD can
communicate with a printer connected to a parallel
port.</para>
@ -636,6 +651,7 @@ showpage</programlisting>
<sect5 id="printing-checking-serial">
<title>Checking a Serial Printer</title>
<indexterm><primary>printer</primary><secondary>serial</secondary></indexterm>
<para>This section tells you how to check if FreeBSD can
communicate with a printer on a serial port.</para>
@ -653,6 +669,9 @@ showpage</programlisting>
<programlisting>printer:dv=/dev/<replaceable>port</replaceable>:br#<replaceable>bps-rate</replaceable>:pa=<replaceable>parity</replaceable></programlisting>
<indexterm><primary>bits-per-second</primary></indexterm>
<indexterm><primary>serial port</primary></indexterm>
<indexterm><primary>parity</primary></indexterm>
<para>Where <replaceable>port</replaceable> is the device
entry for the serial port (<literal>ttyd0</literal>,
<literal>ttyd1</literal>, etc.),
@ -739,6 +758,7 @@ showpage</programlisting>
reads this file each time the spooler is used, so updates to the
file take immediate effect.</para>
<indexterm><primary>printer</primary><secondary>capabilities</secondary></indexterm>
<para>The format of the &man.printcap.5; file is straightforward.
Use your favorite text editor to make changes to
<filename>/etc/printcap</filename>. The format is identical to
@ -759,6 +779,7 @@ showpage</programlisting>
section for more information on naming.</para>
</step>
<indexterm><primary>header pages</primary></indexterm>
<step>
<para>Turn off header pages (which are on by default) by
inserting the <literal>sh</literal> capability; see the
@ -876,6 +897,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:</programlisting>
<sect4 id="printing-no-header-pages">
<title>Suppressing Header Pages</title>
<indexterm><primary>printing</primary><secondary>header pages</secondary></indexterm>
<para>The LPD spooling system will by default print a
<emphasis>header page</emphasis> for each job. The header
@ -908,6 +930,8 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
<sect4 id="printing-spooldir">
<title>Making the Spooling Directory</title>
<indexterm><primary>printer spool</primary></indexterm>
<indexterm><primary>print jobs</primary></indexterm>
<para>The next step in the simple spooler setup is to make a
<emphasis>spooling directory</emphasis>, a directory where
@ -1022,6 +1046,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
<sect4 id="printing-commparam">
<title>Configuring Spooler Communication Parameters</title>
<indexterm><primary>printer</primary><secondary>serial</secondary></indexterm>
<para>For printers on serial ports, LPD can set up the bps rate,
parity, and other serial communication parameters on behalf of
@ -1131,6 +1156,7 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
<sect4 id="printing-textfilter">
<title>Installing the Text Filter</title>
<indexterm><primary>print filters</primary></indexterm>
<para>We are now ready to tell LPD what text filter to use to
send jobs to the printer. A <emphasis>text filter</emphasis>,
@ -1276,6 +1302,7 @@ $%&amp;'()*+,-./01234567
<sect2 id="printing-advanced-filter-intro">
<title>Filters</title>
<indexterm><primary>print filters</primary></indexterm>
<para>Although LPD handles network protocols, queuing, access control,
and other aspects of printing, most of the <emphasis>real</emphasis>
@ -1384,6 +1411,7 @@ $%&amp;'()*+,-./01234567
capability in <filename>/etc/printcap</filename>, or
<filename>/dev/console</filename> by default).</para>
<indexterm><primary>troff</primary></indexterm>
<para>Which filter LPD starts and the filter's arguments depend on
what is listed in the <filename>/etc/printcap</filename> file and
what arguments the user specified for the job on the
@ -1492,7 +1520,8 @@ $%&amp;'()*+,-./01234567
</variablelist>
</para>
</listitem>
<indexterm><primary>printer</primary><secondary>filters</secondary></indexterm>
<listitem>
<para>A <emphasis>conversion filter</emphasis> converts a specific
file format into one the printer can render onto paper. For
@ -1585,6 +1614,7 @@ $%&amp;'()*+,-./01234567
<sect3 id="printing-advanced-if-conversion">
<title>Accommodating Plain Text Jobs on PostScript Printers</title>
<indexterm><primary>print jobs</primary></indexterm>
<para>If you are the only user of your computer and PostScript (or
other language-based) printer, and you promise to never send plain
@ -1604,6 +1634,7 @@ $%&amp;'()*+,-./01234567
<para>How do we do this?</para>
<indexterm><primary>printer</primary><secondary>serial</secondary></indexterm>
<para>If you have got a serial printer, a great way to do it is to
install <command>lprps</command>. <command>lprps</command> is a
PostScript printer filter which performs two-way communication with
@ -1671,7 +1702,8 @@ fi</programlisting>
<sect3 id="printing-advanced-ps">
<title>Simulating PostScript on Non-PostScript Printers</title>
<indexterm><primary>PostScript</primary><secondary>emulating</secondary></indexterm>
<indexterm><primary>Ghostscript</primary></indexterm>
<para>PostScript is the <emphasis>de facto</emphasis> standard for
high quality typesetting and printing. PostScript is, however, an
<emphasis>expensive</emphasis> standard. Thankfully, Alladin
@ -1766,6 +1798,7 @@ exit 2</programlisting>
<sect4>
<title>Why Install Conversion Filters?</title>
<indexterm><primary>TeX</primary><secondary>printing dvi files</secondary></indexterm>
<para>Conversion filters make printing various kinds of files easy.
As an example, suppose we do a lot of work with the TeX
@ -1879,6 +1912,7 @@ exit 2</programlisting>
printer needs a <literal>df</literal> capability in its entry in
<filename>/etc/printcap</filename>.</para>
<indexterm><primary>fortran</primary></indexterm>
<para>Despite what others might contend, formats like FORTRAN text
and plot are probably obsolete. At your site, you can give new
meanings to these or any of the formatting options just by
@ -2163,6 +2197,8 @@ exit 0</programlisting>
<emphasis>some</emphasis> file types&mdash;and, of course, you can
still provide conversion filters just for them.</para>
<indexterm><primary>apsfilter</primary></indexterm>
<indexterm><primary>printer</primary><secondary>filters</secondary><tertiary>apsfilter</tertiary></indexterm>
<para>The FreeBSD ports collection has a text filter that performs
automatic conversion called <command>apsfilter</command>. It can
detect plain text, PostScript, and DVI files, run the proper
@ -2270,6 +2306,8 @@ exit 0</programlisting>
script to do the needed initialization and then execute
<command>lpf</command>.</para>
<indexterm><primary>page accounting</primary></indexterm>
<indexterm><primary>accounting</primary><secondary>printer</secondary></indexterm>
<para>In order for <command>lpf</command> to do page accounting
correctly, it needs correct values filled in for the
<literal>pw</literal> and <literal>pl</literal> capabilities in the
@ -2288,6 +2326,8 @@ exit 0</programlisting>
various printers, then you probably want to consider <emphasis>header
pages</emphasis> as a necessary evil.</para>
<indexterm><primary>banner pages (see header pages)</primary></indexterm>
<indexterm><primary>header pages</primary></indexterm>
<para>Header pages, also known as <emphasis>banner</emphasis> or
<emphasis>burst pages</emphasis> identify to whom jobs belong after
they are printed. They are usually printed in large, bold letters,
@ -2676,6 +2716,8 @@ done
<sect2 id="printing-advanced-network-printers">
<title>Networked Printing</title>
<indexterm><primary>printer</primary><secondary>network</secondary></indexterm>
<indexterm><primary>network printing</primary></indexterm>
<para>FreeBSD supports networked printing: sending jobs to remote
printers. Networked printing generally refers to two different
things:</para>
@ -2740,6 +2782,9 @@ done
linkend="printing-advanced-restricting-remote">Restricting Jobs
from Remote Printers</link>).</para>
<indexterm><primary>printer</primary><secondary>network</secondary>
</indexterm>
<indexterm><primary>network printing</primary></indexterm>
<para>If you are using a printer with a network interface that is
compatible with LPD, then the <emphasis>printer host</emphasis> in
the discussion below is the printer itself, and the
@ -2923,6 +2968,8 @@ exec /usr/libexec/lpr/lpf "$@" | /usr/local/libexec/netprint scrivener 5100</pro
<title>Restricting Printer Usage</title>
<para>This section gives information on restricting printer usage. The
<indexterm><primary>printer</primary><secondary>restricting
access to</secondary></indexterm>
LPD system lets you control who can access a printer, both locally or
remotely, whether they can print multiple copies, how large their jobs
can be, and how large the printer queues can get.</para>
@ -3065,12 +3112,14 @@ bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
<sect3 id="printing-advanced-restricting-sizes">
<title>Controlling Sizes of Jobs Submitted</title>
<indexterm><primary>print jobs</primary></indexterm>
<para>If you have many users accessing the printers, you probably need
to put an upper limit on the sizes of the files users can submit to
print. After all, there is only so much free space on the
filesystem that houses the spooling directories, and you also need
to make sure there is room for the jobs of other users.</para>
<indexterm><primary>print jobs</primary><secondary>controlling</secondary></indexterm>
<para>LPD enables you to limit the maximum byte size a file in a job
can be with the <literal>mx</literal> capability. The units are in
BUFSIZ blocks, which are 1024 bytes. If you put a zero for this
@ -3242,6 +3291,7 @@ boo/minfree</userinput></screen>
<sect2 id="printing-advanced-acct">
<title>Accounting for Printer Usage</title>
<indexterm><primary>accounting</primary><secondary>printer</secondary></indexterm>
<para>So, you need to charge for printouts. And why not? Paper and ink
cost money. And then there are maintenance costs&mdash;printers are
loaded with moving parts and tend to break down. You have examined
@ -3525,6 +3575,7 @@ total 337.00 154 $ 6.74</screen>
<sect1 id="printing-using">
<title>Using Printers</title>
<indexterm><primary>printer</primary><secondary>usage</secondary></indexterm>
<para>This section tells you how to use printers you have setup with
FreeBSD. Here is an overview of the user-level commands:</para>
@ -3581,6 +3632,7 @@ total 337.00 154 $ 6.74</screen>
<screen>&prompt.user; <userinput>lpr <replaceable>filename</replaceable> <replaceable>...</replaceable></userinput></screen>
<indexterm><primary>printing</primary></indexterm>
<para>This prints each of the listed files to the default printer. If
you list no files, &man.lpr.1; reads data to
print from standard input. For example, this command prints some
@ -3611,6 +3663,7 @@ total 337.00 154 $ 6.74</screen>
<sect2 id="printing-lpq">
<title>Checking Jobs</title>
<indexterm><primary>print jobs</primary></indexterm>
<para>When you print with &man.lpr.1;, the data you wish to print is put
together in a package called a <quote>print job</quote>, which is sent
to the LPD spooling system. Each printer has a queue of jobs, and
@ -3771,6 +3824,7 @@ cfA013rose dequeued
plain text or if you want plain text formatted through the
&man.pr.1; utility.</para>
<indexterm><primary>TeX</primary></indexterm>
<para>For example, the following command prints a DVI file (from the
TeX typesetting system) named <filename>fish-report.dvi</filename>
to the printer named <literal>bamboo</literal>:</para>
@ -4249,6 +4303,7 @@ cfA013rose dequeued
<varlistentry>
<term>LPRng</term>
<indexterm><primary>LPRng</primary></indexterm>
<listitem>
<para>LPRng, which purportedly means <quote>LPR: the Next
Generation</quote> is a complete rewrite of PLP. Patrick Powell
@ -4315,6 +4370,9 @@ exit 2</programlisting>
"#$%&amp;'()*+,-./012345
#$%&amp;'()*+,-./0123456</programlisting>
<indexterm><primary>DOS</primary></indexterm>
<indexterm><primary>OS/2</primary></indexterm>
<indexterm><primary>ASCII</primary></indexterm>
<para>You have become another victim of the <emphasis>staircase
effect</emphasis>, caused by conflicting interpretations of
what characters should indicate a new line. UNIX-style
@ -4386,6 +4444,7 @@ exit 2</programlisting>
proper escape code, modify the text filter to send the
code first, then send the print job.</para>
<indexterm><primary>PCL</primary></indexterm>
<para>Here is an example text filter for printers that
understand the Hewlett-Packard PCL escape codes. This
filter makes the printer treat LF characters as a LF and