Make a few areas more clear to the reader.

Make use of the &os; entity.
Add a few tabs.
Grammar.
This commit is contained in:
Tom Rhodes 2003-03-29 15:27:47 +00:00
parent a466409979
commit a7368f51bb
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=16397

View file

@ -34,9 +34,9 @@
<secondary>building a custom kernel</secondary>
</indexterm>
<para>The kernel is the core of the FreeBSD operating system. It is
<para>The kernel is the core of the &os; operating system. It is
responsible for managing memory, enforcing security controls,
networking, disk access, and much more. While more and more of FreeBSD
networking, disk access, and much more. While more and more of &os;
becomes dynamically configurable it is still occasionally necessary to
reconfigure and recompile your kernel.</para>
@ -75,19 +75,19 @@
<sect1 id="kernelconfig-custom-kernel">
<title>Why Build a Custom Kernel?</title>
<para>Traditionally, FreeBSD has had what is called a
<para>Traditionally, &os; has had what is called a
<quote>monolithic</quote> kernel. This means that the kernel was one
large program, supported a fixed list of devices, and if you wanted to
change the kernel's behavior then you had to compile a new kernel, and
then reboot your computer with the new kernel.</para>
<para>Today, FreeBSD is rapidly moving to a model where much of the
<para>Today, &os; is rapidly moving to a model where much of the
kernel's functionality is contained in modules which can be dynamically
loaded and unloaded from the kernel as necessary. This allows the
kernel to adapt to new hardware suddenly becoming available (such as
PCMCIA cards in a laptop), or for new functionality to be brought into
the kernel that was not necessary when the kernel was originally
compiled. Colloquially these are called KLDs.</para>
compiled. This is known as a modular kernel. Colloquially these are called KLDs.</para>
<para>Despite this, it is still necessary to carry out some static kernel
configuration. In some cases this is because the functionality is so
@ -97,7 +97,7 @@
<para>Building a custom kernel is one of the most important rites of
passage nearly every Unix user must endure. This process, while
time consuming, will provide many benefits to your FreeBSD system.
time consuming, will provide many benefits to your &os; system.
Unlike the <filename>GENERIC</filename> kernel, which must support a
wide range of hardware, a custom kernel only contains support for
<emphasis>your</emphasis> PC's hardware. This has a number of
@ -147,10 +147,12 @@
<filename>pc98</filename> (an alternative development branch of PC
hardware, popular in Japan). Everything inside a particular
architecture's directory deals with that architecture only; the rest
of the code is common to all platforms to which FreeBSD could
of the code is common to all platforms to which &os; could
potentially be ported. Notice the logical organization of the
directory structure, with each supported device, filesystem, and
option in its own subdirectory.</para>
option in its own subdirectory. &os; 5.X and up has support for
<filename>sparc64</filename>, and a few other architectures under
development.</para>
<note>
<para>If there is <emphasis>not</emphasis> a
@ -161,7 +163,7 @@
then <guimenuitem>Distributions</guimenuitem>, then
<guimenuitem>src</guimenuitem>, then <guimenuitem>sys</guimenuitem>. If you
have an aversion to <application>sysinstall</application> and
you have access to an <quote>official</quote> FreeBSD CDROM, then
you have access to an <quote>official</quote> &os; CDROM, then
you can also install the source from the command line:</para>
<screen>&prompt.root; <userinput>mount /cdrom</userinput>
@ -179,7 +181,7 @@
&prompt.root; <userinput>cp GENERIC MYKERNEL</userinput></screen>
<para>Traditionally, this name is in all capital letters and, if you
are maintaining multiple FreeBSD machines with different hardware,
are maintaining multiple &os; machines with different hardware,
it is a good idea to name it after your machine's hostname. We will
call it <filename>MYKERNEL</filename> for the purpose of this
example.</para>
@ -214,7 +216,7 @@
editor. If you are just starting out, the only editor available
will probably be <application>vi</application>, which is too complex to
explain here, but is covered well in many books in the <link
linkend="bibliography">bibliography</link>. However, FreeBSD does
linkend="bibliography">bibliography</link>. However, &os; does
offer an easier editor called <application>ee</application> which, if
you are a beginner, should be your editor of choice. Feel free to
change the comment lines at the top to reflect your configuration or
@ -235,16 +237,16 @@
<filename>/usr/src/UPDATING</filename>, before you perform any update
steps, in the case you <link
linkend="cutting-edge">sync your source tree</link> with the
latest sources of the FreeBSD project.
In this file all important issues with updating FreeBSD
are written down. <filename>/usr/src/UPDATING</filename> always fits
to your version of the FreeBSD source, and is therefore more accurate
for those information than the handbook.</para>
latest sources of the &os; project.
In this file all important issues with updating &os;
are typed out. <filename>/usr/src/UPDATING</filename> always fits
your version of the &os; source, and is therefore more accurate
for new information than the handbook.</para>
</note>
<para>You must now compile the source code for the kernel. There are two
procedures you can use to do this, and the one you will use depends on
why you are rebuilding the kernel, and the version of FreeBSD you are
why you are rebuilding the kernel, and the version of &os; you are
running.</para>
<itemizedlist>
@ -254,8 +256,8 @@
</listitem>
<listitem>
<para>If you are running a FreeBSD version prior to 4.0, and you are
<emphasis>not</emphasis> upgrading to FreeBSD&nbsp;4.0 or higher using
<para>If you are running a &os; version prior to 4.0, and you are
<emphasis>not</emphasis> upgrading to &os;&nbsp;4.0 or higher using
the <maketarget>make world</maketarget> procedure, use procedure 1.
</para>
</listitem>
@ -283,11 +285,12 @@
</step>
<step>
<para>Change into the build directory.</para>
<para>Change into the build directory. This is printed out after running the aformentioned
command..</para>
<screen>&prompt.root; <userinput>cd ../compile/<replaceable>MYKERNEL</replaceable></userinput></screen>
<para>For FreeBSD version prior to 5.0, use instead:</para>
<para>For &os; version prior to 5.0, use instead:</para>
<screen>&prompt.root; <userinput>cd ../../compile/<replaceable>MYKERNEL</replaceable></userinput></screen>
</step>
@ -330,7 +333,7 @@
</procedure>
<note>
<para>In FreeBSD&nbsp;4.2 and older you must replace
<para>In &os;&nbsp;4.2 and older you must replace
<literal>KERNCONF=</literal> with <literal>KERNEL=</literal>.
4.2-STABLE that was fetched before Feb 2nd, 2001 does not
recognize <literal>KERNCONF=</literal>.</para>
@ -368,22 +371,22 @@
linkend="kernelconfig-noboot">does not boot</link>.</para>
<note>
<para>As of FreeBSD 5.0, kernels are installed along with their
<para>As of &os; 5.0, kernels are installed along with their
modules in <filename>/boot/kernel</filename>, and old kernels
will be backed up as <filename>/boot/kernel.old</filename>.
Other files relating to the boot process, such as the boot
&man.loader.8; and configuration are also stored in
<filename>/boot</filename>. Third party or custom modules
may be placed in <filename>/boot/modules</filename>, although
users should be aware that keeping modules in sync with the
compiled kernel is very important. Modules not intended
to run with the compiled kernel may result in instability
or incorrectness.</para>
may be placed in <filename>/boot/modules</filename>, although
users should be aware that keeping modules in sync with the
compiled kernel is very important. Modules not intended
to run with the compiled kernel may result in instability
or incorrectness.</para>
</note>
<note>
<para>If you have added any new devices (such as sound cards) and you
are running FreeBSD&nbsp;4.X or previous versions, you
are running &os;&nbsp;4.X or previous versions, you
may have to add some device
nodes to your <filename>/dev</filename> directory before
you can use them. For more information, take a look at <link linkend="kernelconfig-nodes">Making
@ -422,7 +425,7 @@
<important>
<title>Quoting numbers</title>
<para>In all versions of FreeBSD up to and including 3.X,
<para>In all versions of &os; up to and including 3.X,
&man.config.8; required that any strings in the configuration file
that contained numbers used as text had to be enclosed in double
quotes.</para>
@ -446,23 +449,23 @@
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
<programlisting>#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
# GENERIC -- Generic kernel configuration file for &os;/i386
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
# http://www.&os;.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.ORG/) for the
# &os; World Wide Web server (http://www.&os;.ORG/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
# &dollar;FreeBSD: src/sys/i386/conf/GENERIC,v 1.246 2000/03/09 16:32:55 jlemon Exp &dollar;</programlisting>
# &dollar;&os;: src/sys/i386/conf/GENERIC,v 1.246 2000/03/09 16:32:55 jlemon Exp &dollar;</programlisting>
<para>The following are the mandatory keywords required in
<emphasis>every</emphasis> kernel you build:</para>
@ -494,7 +497,7 @@ cpu I686_CPU</programlisting>
CPU type, you can check the <filename>/var/run/dmesg.boot</filename> file to view your boot
up messages.</para>
<note><para>In FreeBSD 5.0, support for <literal>I386_CPU</literal>
<note><para>In &os; 5.0, support for <literal>I386_CPU</literal>
is disabled by default.</para></note>
<indexterm>
<primary>kernel options</primary>
@ -535,12 +538,12 @@ cpu EV5</programlisting>
equal to the number of simultaneous users you expect to have on your
machine.</para>
<para>Starting with FreeBSD&nbsp;4.5, the system will auto-tune this setting
<para>Starting with &os;&nbsp;4.5, the system will auto-tune this setting
for you if you explicitly set it to <literal>0</literal><footnote>
<para>The auto-tuning algorithm sets <literal>maxuser</literal> equal
to the amount of memory in the system, with a minimum of 32, and a
maximum of 384.</para></footnote>. If you are
using an earlier version of FreeBSD, or you want to manage it
using an earlier version of &os;, or you want to manage it
yourself you will want to set
<literal>maxusers</literal> to at least 4, especially if you are
using the X Window System or compiling software. The reason is that
@ -576,7 +579,7 @@ cpu EV5</programlisting>
device npx0 at nexus? port IO_NPX irq 13</programlisting>
<para><literal>npx0</literal> is the interface to the floating point
math unit in FreeBSD, which is either the hardware co-processor or
math unit in &os;, which is either the hardware co-processor or
the software math emulator. This is <emphasis>not</emphasis>
optional.</para>
@ -602,17 +605,17 @@ options MATH_EMULATE #Support for x87 emulation</programlisting>
<note>
<para>The normal math co-processor emulation routines that come with
FreeBSD are <emphasis>not</emphasis> very accurate. If you do not
&os; are <emphasis>not</emphasis> very accurate. If you do not
have a math co-processor, and you need the best accuracy, it is
recommended that you change this option to
<literal>GPL_MATH_EMULATE</literal> to use the GNU math support,
which is not included by default for licensing reasons.</para>
</note>
<note><para>In FreeBSD 5.0, math emulation is disabled by default,
<note><para>In &os; 5.0, math emulation is disabled by default,
as older CPUs that do not have native floating point math support
are far less common, and in many cases not supported by the native
FreeBSD kernel without other additional options.</para></note>
&os; kernel without other additional options.</para></note>
<programlisting>options INET #InterNETworking</programlisting>
@ -631,12 +634,12 @@ options FFS_ROOT #FFS usable as root device [keep this!]</programli
<para>This is the basic hard drive filesystem. Leave it in if you
boot from the hard disk.</para>
<note><para>In FreeBSD 5.0, <literal>FFS_ROOT</literal> is no longer
<note><para>In &os; 5.0, <literal>FFS_ROOT</literal> is no longer
required.</para></note>
<programlisting>options UFS_ACL #Support for access control lists</programlisting>
<para>This option, present only in FreeBSD&nbsp;5.0, enables kernel support
<para>This option, present only in &os;&nbsp;5.0, enables kernel support
for access control lists. This relies on the use of extended
attributes and UFS2, and the feature is described in detail
in the <xref linkend="fs-acl">. ACLs are enabled by default, and should not be
@ -649,7 +652,7 @@ options FFS_ROOT #FFS usable as root device [keep this!]</programli
<para>This option includes some code to speed up disk operations on large
directories, at the expense of using a some additional memory. You
would normally keep this for a large server, or interactive workstation,
and remove it if you are using FreeBSD on a smaller system where memory
and remove it if you are using &os; on a smaller system where memory
is at a premium and disk access speed is less important, such as a
firewall.</para>
@ -680,7 +683,7 @@ options MD_ROOT #MD is a potential root device</programlisting>
<para>Now you simply need to either reboot, or run the command
<command>mount /tmp</command>.</para>
<note><para>In FreeBSD 5.0, &man.md.4;-backed UFS file systems are
<note><para>In &os; 5.0, &man.md.4;-backed UFS file systems are
used for memory file systems rather than MFS. Information on
configuring MD-backed file systems may be found in the man pages
for &man.mdconfig.8; and &man.mdmfs.8;. As a result, the
@ -729,7 +732,7 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
<para>The process filesystem. This is a <quote>pretend</quote>
filesystem mounted on <filename>/proc</filename> which allows
programs like &man.ps.1; to give you more information on what
processes are running. In FreeBSD 5.0, use of <literal>PROCFS
processes are running. In &os; 5.0, use of <literal>PROCFS
</literal> is not required under most circumstances, as most
debugging and monitoring tools have been adapted to run without
<literal>PROCFS</literal>. In addition, 5.0-CURRENT kernels
@ -738,8 +741,8 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
<programlisting>options PSEUDOFS #Pseudo-filesystem framework</programlisting>
<para><literal>PSEUDOFS</literal> is not available in FreeBSD 4.X.
Unlike in FreeBSD 4.X, new installs of FreeBSD 5.0 will not mount
<para><literal>PSEUDOFS</literal> is not available in &os; 4.X.
Unlike in &os; 4.X, new installs of &os; 5.0 will not mount
the process file system by default.</para>
<programlisting>options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
@ -747,10 +750,10 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
<para>Compatibility with 4.3BSD. Leave this in; some programs will
act strangely if you comment this out.</para>
<programlisting>options COMPAT_FREEBSD4 #Compatible with FreeBSD4</programlisting>
<programlisting>options COMPAT_FREEBSD4 #Compatible with &os;4</programlisting>
<para>This option is required on FreeBSD 5.0 i386 and alpha systems
to support applications compiled on older versions of FreeBSD
<para>This option is required on &os; 5.0 i386 and alpha systems
to support applications compiled on older versions of &os;
that use older system call interfaces. It is recommended that
this option be used on all i386 and alpha systems that may
run older applications; platforms that gained support only in
@ -762,7 +765,7 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
each SCSI device in your system. If you only have IDE hard drives,
you can ignore this, otherwise you will probably want to lower this
number, perhaps to 5 seconds, to speed up booting. Of course, if
you do this, and FreeBSD has trouble recognizing your SCSI devices,
you do this, and &os; has trouble recognizing your SCSI devices,
you will have to raise it back up.</para>
<programlisting>options UCONSOLE #Allow users to grab the console</programlisting>
@ -774,7 +777,7 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
&man.talk.1;, and any other messages you receive, as well
as any console messages sent by the kernel.</para>
<note><para>In FreeBSD 5.0, <literal>UCONSOLE</literal> is no
<note><para>In &os; 5.0, <literal>UCONSOLE</literal> is no
longer required.</para></note>
<programlisting>options USERCONFIG #boot -c editor</programlisting>
@ -787,7 +790,7 @@ options CD9660_ROOT #CD-ROM usable as root, CD9660 required</programli
<para>This option allows you to boot the visual configuration editor
from the boot menu.</para>
<note><para>From FreeBSD versions 5.0 and later, userconfig has been depreciated
<note><para>From &os; versions 5.0 and later, userconfig has been depreciated
in favor of the new &man.device.hints.5; method. For more information
on &man.device.hints.5; please visit <xref linkend="device-hints"></para></note>
@ -826,7 +829,7 @@ options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
applications in the ports collection use these
(such as <application>StarOffice</application>).</para>
<note><para>In FreeBSD 5.0, all of this functionality is now
<note><para>In &os; 5.0, all of this functionality is now
provided by the <literal>_KPOSIX_PRIORITY_SCHEDULING</literal>
option, and <literal>P1003_1B</literal> is no longer
required.</para></note>
@ -844,7 +847,7 @@ options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
typically want this option as it will help protect the machine from
denial of service packet attacks.</para>
<note><para>In FreeBSD 5.0, this feature is enabled by default and
<note><para>In &os; 5.0, this feature is enabled by default and
the <literal>ICMP_BANDLIM</literal> option is not required.
</para></note>
@ -860,8 +863,8 @@ options _KPOSIX_PRIORITY_SCHEDULING</programlisting>
<programlisting>device isa</programlisting>
<para>All PCs supported by FreeBSD have one of these. If you have an
IBM PS/2 (Micro Channel Architecture), FreeBSD provides some limited support at
<para>All PCs supported by &os; have one of these. If you have an
IBM PS/2 (Micro Channel Architecture), &os; provides some limited support at
this time. For more information about the MCA support, see <filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
<programlisting>device eisa</programlisting>
@ -1049,7 +1052,7 @@ device sio3 at isa? disable port IO_COM4 irq 9</programlisting>
<para>If you have an internal modem on COM4 and a serial port at
COM2, you will have to change the IRQ of the modem to 2 (for
obscure technical reasons, IRQ2 = IRQ 9) in order to access it
from FreeBSD. If you have a multiport serial card, check the
from &os;. If you have a multiport serial card, check the
manual page for &man.sio.4; for more information on the proper
values for these lines. Some video cards (notably those based on
S3 chips) use IO addresses in the form of
@ -1214,10 +1217,10 @@ pseudo-device pty # Pseudo-ttys (telnet etc)</programlisting>
<para>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6 tunneling,
IPv4 over IPv4 tunneling, and IPv6 over IPv6 tunneling. Beginning with
FreeBSD&nbsp;4.4 the <literal>gif</literal> device is
&os;&nbsp;4.4 the <literal>gif</literal> device is
<quote>auto-cloning</quote>, and you should use the first example
(without the number after <literal>gif</literal>). Earlier versions of
FreeBSD require the number.</para>
&os; require the number.</para>
<programlisting>pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)</programlisting>
@ -1259,7 +1262,7 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
<para>Support for various USB devices.</para>
<para>For more information and additional devices supported by
FreeBSD, see
&os;, see
<filename>/usr/src/sys/i386/conf/LINT</filename>.</para>
</sect1>
@ -1271,7 +1274,7 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
<primary><command>MAKEDEV</command></primary>
</indexterm>
<note><para>If you are running FreeBSD&nbsp;5.0 or later
<note><para>If you are running &os;&nbsp;5.0 or later
you can safely skip this section. These versions use
&man.devfs.5; to allocate device nodes transparently for the user.</para></note>
@ -1399,10 +1402,10 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
<listitem>
<para>If your new kernel does not boot, or fails to
recognize your devices, do not panic! Fortunately, FreeBSD has
recognize your devices, do not panic! Fortunately, &os; has
an excellent mechanism for recovering from incompatible
kernels. Simply choose the kernel you want to boot from at
the FreeBSD boot loader. You can access this when the system
the &os; boot loader. You can access this when the system
counts down from 10. Hit any key except for the
<keycap>Enter</keycap> key, type <command>unload</command>
and then type
@ -1450,7 +1453,7 @@ pseudo-device bpf # Berkeley packet filter</programlisting>
<screen>&prompt.root; <userinput>chflags schg /kernel</userinput></screen>
</note>
<note><para>In FreeBSD 5.0, kernels are not installed with the
<note><para>In &os; 5.0, kernels are not installed with the
system immutable flag, so this is unlikely to be the source
of the problem you're experiencing.</para></note>
</listitem>