This patch addresses the following:

- replaces FreeBSD with &os;

- rewording to replace "you"

- updated the F1 example

- general tightening and grammar fixes

Approved by:  bcr (mentor)
This commit is contained in:
Dru Lavigne 2013-02-04 22:21:54 +00:00
parent 26ad361dd2
commit 347ca9efc9
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=40887

View file

@ -6,7 +6,7 @@
--> -->
<chapter id="boot"> <chapter id="boot">
<title>The FreeBSD Booting Process</title> <title>The &os; Booting Process</title>
<sect1 id="boot-synopsis"> <sect1 id="boot-synopsis">
<title>Synopsis</title> <title>Synopsis</title>
@ -16,31 +16,31 @@
<para>The process of starting a computer and loading the operating <para>The process of starting a computer and loading the operating
system is referred to as <quote>the bootstrap process</quote>, system is referred to as <quote>the bootstrap process</quote>,
or simply <quote>booting</quote>. FreeBSD's boot process or simply <quote>booting</quote>. &os;'s boot process
provides a great deal of flexibility in customizing what happens provides a great deal of flexibility in customizing what happens
when you start the system, allowing you to select from different when the system starts, including the ability to select from
operating systems installed on the same computer, or even different operating systems installed on the same computer,
different versions of the same operating system or installed different versions of the same operating system, or a different
kernel.</para> installed kernel.</para>
<para>This chapter details the configuration options you can set <para>This chapter details the configuration options that can
and how to customize the FreeBSD boot process. This includes be set. It demonstrates how to customize the &os; boot
everything that happens until the FreeBSD kernel has started, process, including everything that happens until the &os; kernel
probed for devices, and started &man.init.8;. If you are not has started, probed for devices, and started &man.init.8;. This
quite sure when this happens, it occurs when the text color occurs when the text color of the boot messages changes from
changes from bright white to grey.</para> bright white to grey.</para>
<para>After reading this chapter, you will know:</para> <para>After reading this chapter, you will recognize:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>What the components of the FreeBSD bootstrap system are, <para>The components of the &os; bootstrap system and how they
and how they interact.</para> interact.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>The options you can give to the components in the <para>The options that can be passed to the components in the
FreeBSD bootstrap to control the boot process.</para> &os; bootstrap in order to control the boot process.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -49,9 +49,7 @@
</itemizedlist> </itemizedlist>
<note> <note>
<title>x86 Only</title> <para>This chapter only describes the boot process for &os;
<para>This chapter only describes the boot process for FreeBSD
running on Intel x86 systems.</para> running on Intel x86 systems.</para>
</note> </note>
</sect1> </sect1>
@ -62,7 +60,7 @@
<para>Turning on a computer and starting the operating system <para>Turning on a computer and starting the operating system
poses an interesting dilemma. By definition, the computer does poses an interesting dilemma. By definition, the computer does
not know how to do anything until the operating system is not know how to do anything until the operating system is
started. This includes running programs from the disk. So if started. This includes running programs from the disk. If
the computer can not run a program from the disk without the the computer can not run a program from the disk without the
operating system, and the operating system programs are on the operating system, and the operating system programs are on the
disk, how is the operating system started?</para> disk, how is the operating system started?</para>
@ -102,7 +100,7 @@
with the user. In this case the boot manager usually has more with the user. In this case the boot manager usually has more
code in the first <emphasis>track</emphasis> of the disk or code in the first <emphasis>track</emphasis> of the disk or
within some OS's file system. (A boot manager is sometimes also within some OS's file system. (A boot manager is sometimes also
called a <emphasis>boot loader</emphasis>, but FreeBSD uses that called a <emphasis>boot loader</emphasis>, but &os; uses that
term for a later stage of booting.) Popular boot managers term for a later stage of booting.) Popular boot managers
include <application>boot0</application> (aka include <application>boot0</application> (aka
<application>Boot Easy</application>, the standard &os; boot <application>Boot Easy</application>, the standard &os; boot
@ -111,30 +109,28 @@
<application>LILO</application>. (Only <application>LILO</application>. (Only
<application>boot0</application> fits within the MBR.)</para> <application>boot0</application> fits within the MBR.)</para>
<para>If you have only one operating system installed on your <para>If only one operating system is installed, a standard PC MBR
disks then a standard PC MBR will suffice. This MBR searches will suffice. This MBR searches for the first bootable (active)
for the first bootable (aka active) slice on the disk, and slice on the disk, and then runs the code on that slice to load
then runs the code on that slice to load the remainder of the the remainder of the operating system. By default, the MBR
operating system. The MBR installed by &man.fdisk.8;, by installed by &man.fdisk.8; is such an MBR and is based on
default, is such an MBR. It is based on
<filename>/boot/mbr</filename>.</para> <filename>/boot/mbr</filename>.</para>
<para>If you have installed multiple operating systems on your <para>If multiple operating systems are present, a different boot
disks then you can install a different boot manager, one that manager can be installed which displays the list of operating
can display a list of different operating systems, and allows systems so that the user can choose which one to boot from. Two
you to choose the one to boot from. Two of these are discussed boot managers are discussed in the next subsection.</para>
in the next subsection.</para>
<para>The remainder of the FreeBSD bootstrap system is divided <para>The remainder of the &os; bootstrap system is divided
into three stages. The first stage is run by the MBR, which into three stages. The first stage is run by the MBR, which
knows just enough to get the computer into a specific state and knows just enough to get the computer into a specific state and
run the second stage. The second stage can do a little bit run the second stage. The second stage can do a little bit
more, before running the third stage. The third stage finishes more, before running the third stage. The third stage finishes
the task of loading the operating system. The work is split the task of loading the operating system. The work is split
into these three stages because the PC standards put limits on into three stages because PC standards put limits on the size of
the size of the programs that can be run at stages one and two. the programs that can be run at stages one and two. Chaining
Chaining the tasks together allows FreeBSD to provide a more the tasks together allows &os; to provide a more flexible
flexible loader.</para> loader.</para>
<indexterm><primary>kernel</primary></indexterm> <indexterm><primary>kernel</primary></indexterm>
<indexterm><primary><command>init</command></primary></indexterm> <indexterm><primary><command>init</command></primary></indexterm>
@ -145,9 +141,8 @@
process &man.init.8;, which then makes sure the disks are in a process &man.init.8;, which then makes sure the disks are in a
usable state. &man.init.8; then starts the user-level resource usable state. &man.init.8; then starts the user-level resource
configuration which mounts file systems, sets up network cards configuration which mounts file systems, sets up network cards
to communicate on the network, and generally starts all the to communicate on the network, and starts the processes which
processes that usually are run on a FreeBSD system at have been configured to run on a &os; system at startup.</para>
startup.</para>
</sect1> </sect1>
<sect1 id="boot-blocks"> <sect1 id="boot-blocks">
@ -163,60 +158,54 @@
<para>The code in the MBR or boot manager is sometimes referred <para>The code in the MBR or boot manager is sometimes referred
to as <emphasis>stage zero</emphasis> of the boot process. to as <emphasis>stage zero</emphasis> of the boot process.
This subsection discusses two of the boot managers previously This section discusses two boot managers:
mentioned: <application>boot0</application> and <application>boot0</application> and
<application>LILO</application>.</para> <application>LILO</application>.</para>
<formalpara> <formalpara>
<title>The <application>boot0</application> Boot <title>The <application>boot0</application> Boot
Manager:</title> Manager:</title>
<para>The MBR installed by FreeBSD's installer or <para>The MBR installed by &os;'s installer or
&man.boot0cfg.8;, by default, is based on &man.boot0cfg.8; is based on
<filename>/boot/boot0</filename>. (The <filename>/boot/boot0</filename>. The size and capability
<application>boot0</application> program is very simple, of <application>boot0</application> is restricted to 446
since the program in the <abbrev>MBR</abbrev> can only be bytes due to the slice table and <literal>0x55AA</literal>
446 bytes long because of the slice table and identifier at the end of the MBR. If
<literal>0x55AA</literal> identifier at the end of the MBR.) <application>boot0</application> and multiple operating
If you have installed <application>boot0</application> and systems are installed, a message similar to this example
multiple operating systems on your hard disks, then you will will be displayed at boot time:</para>
see a display similar to this one at boot
time:</para>
</formalpara> </formalpara>
<example id="boot-boot0-example"> <example id="boot-boot0-example">
<title><filename>boot0</filename> Screenshot</title> <title><filename>boot0</filename> Screenshot</title>
<screen>F1 DOS <screen>F1 Windows
F2 FreeBSD F2 FreeBSD
F3 Linux
F4 ??
F5 Drive 1
Default: F2</screen> Default: F2</screen>
</example> </example>
<para>Other operating systems, in particular &windows;, have <para>Other operating systems, in particular &windows;, will
been known to overwrite an existing MBR with their own. If overwrite an existing MBR if they are installed after &os;.
this happens to you, or you want to replace your existing MBR If this happens, or you want to replace the existing MBR
with the FreeBSD MBR then use the following command:</para> with the &os; MBR, use the following command:</para>
<screen>&prompt.root; <userinput>fdisk -B -b /boot/boot0 <replaceable>device</replaceable></userinput></screen> <screen>&prompt.root; <userinput>fdisk -B -b /boot/boot0 <replaceable>device</replaceable></userinput></screen>
<para>where <replaceable>device</replaceable> is the device that <para>where <replaceable>device</replaceable> is the boot disk,
you boot from, such as <devicename>ad0</devicename> for the such as <devicename>ad0</devicename> for the first IDE disk,
first IDE disk, <devicename>ad2</devicename> for the first IDE <devicename>ad2</devicename> for the first IDE disk on a
disk on a second IDE controller, <devicename>da0</devicename> second IDE controller, or <devicename>da0</devicename>
for the first SCSI disk, and so on. Or, if you want a custom for the first SCSI disk. To create a custom configuration of
configuration of the MBR, use &man.boot0cfg.8;.</para> the MBR, refer to &man.boot0cfg.8;.</para>
<formalpara> <formalpara>
<title>The LILO Boot Manager:</title> <title>The LILO Boot Manager:</title>
<para>To install this boot manager so it will also boot <para>To install this boot manager so it will also boot
FreeBSD, first start Linux and add the following to your &os;, boot into Linux and add the following to the existing
existing <filename>/etc/lilo.conf</filename> configuration <filename>/etc/lilo.conf</filename> configuration:</para>
file:</para>
</formalpara> </formalpara>
<programlisting>other=/dev/hdXY <programlisting>other=/dev/hdXY
@ -224,30 +213,29 @@ table=/dev/hdX
loader=/boot/chain.b loader=/boot/chain.b
label=FreeBSD</programlisting> label=FreeBSD</programlisting>
<para>In the above, specify FreeBSD's primary partition and <para>Specify &os;'s primary partition and drive using Linux
drive using Linux specifiers, replacing specifiers, replacing <replaceable>X</replaceable> with the
<replaceable>X</replaceable> with the Linux drive letter and Linux drive letter and <replaceable>Y</replaceable> with the
<replaceable>Y</replaceable> with the Linux primary partition Linux primary partition number. For a <acronym>SCSI</acronym>
number. If you are using a <acronym>SCSI</acronym> drive, you drive, change <replaceable>/dev/hd</replaceable> to
will need to change <replaceable>/dev/hd</replaceable> to read <replaceable>/dev/sd</replaceable>. The
something similar to <replaceable>/dev/sd</replaceable>. The
<option>loader=/boot/chain.b</option> line can be omitted if <option>loader=/boot/chain.b</option> line can be omitted if
you have both operating systems on the same drive. Now run both operating systems are installed on the same drive. Next,
<command>/sbin/lilo&nbsp;-v</command> to commit your new run <command>/sbin/lilo&nbsp;-v</command> to commit the new
changes to the system; this should be verified by checking its changes. Verify these are correct by checking the screen
screen messages.</para> messages.</para>
</sect2> </sect2>
<sect2 id="boot-boot1"> <sect2 id="boot-boot1">
<title>Stage One, <filename>/boot/boot1</filename>, and Stage <title>Stage One, <filename>/boot/boot1</filename>, and Stage
Two, <filename>/boot/boot2</filename></title> Two, <filename>/boot/boot2</filename></title>
<para>Conceptually the first and second stages are part of the <para>Conceptually, the first and second stages are part of the
same program, on the same area of the disk. Because of space same program, on the same area of the disk. Because of space
constraints they have been split into two, but you would constraints, they have been split into two, but are always
always install them together. They are copied from the installed together. They are copied from the combined
combined file <filename>/boot/boot</filename> by the installer <filename>/boot/boot</filename> by the installer or
or <application>bsdlabel</application> (see below).</para> <application>bsdlabel</application>.</para>
<para>They are located outside file systems, in the first track <para>They are located outside file systems, in the first track
of the boot slice, starting with the first sector. This is of the boot slice, starting with the first sector. This is
@ -259,20 +247,18 @@ label=FreeBSD</programlisting>
<para><filename>boot1</filename> is very simple, since it can <para><filename>boot1</filename> is very simple, since it can
only be 512 bytes in size, and knows just enough about the only be 512 bytes in size, and knows just enough about the
FreeBSD <firstterm>bsdlabel</firstterm>, which stores &os; <firstterm>bsdlabel</firstterm>, which stores
information about the slice, to find and execute information about the slice, to find and execute
<filename>boot2</filename>.</para> <filename>boot2</filename>.</para>
<para><filename>boot2</filename> is slightly more sophisticated, <para><filename>boot2</filename> is slightly more sophisticated,
and understands the FreeBSD file system enough to find files and understands the &os; file system enough to find files, and
on it, and can provide a simple interface to choose the kernel can provide a simple interface to choose the kernel or loader
or loader to run.</para> to run.</para>
<para>Since the <link linkend="boot-loader">loader</link> is <para><link linkend="boot-loader">loader</link> is much more
much more sophisticated, and provides a nice easy-to-use sophisticated and provides a boot configuration which is run
boot configuration, <filename>boot2</filename> usually runs by <filename>boot2</filename>.</para>
it, but previously it
was tasked to run the kernel directly.</para>
<example id="boot-boot2-example"> <example id="boot-boot2-example">
<title><filename>boot2</filename> Screenshot</title> <title><filename>boot2</filename> Screenshot</title>
@ -282,25 +268,26 @@ Default: 0:ad(0,a)/boot/loader
boot:</screen> boot:</screen>
</example> </example>
<para>If you ever need to replace the installed <para>&man.bsdlabel.8; can be used to replace the installed
<filename>boot1</filename> and <filename>boot2</filename> use <filename>boot1</filename> and
&man.bsdlabel.8;:</para> <filename>boot2</filename>:</para>
<screen>&prompt.root; <userinput>bsdlabel -B <replaceable>diskslice</replaceable></userinput></screen> <screen>&prompt.root; <userinput>bsdlabel -B <replaceable>diskslice</replaceable></userinput></screen>
<para>where <replaceable>diskslice</replaceable> is the disk and <para>where <replaceable>diskslice</replaceable> is the disk and
slice you boot from, such as <devicename>ad0s1</devicename> slice to boot from, such as <devicename>ad0s1</devicename>
for the first slice on the first IDE disk.</para> for the first slice on the first IDE disk.</para>
<warning> <warning>
<title>Dangerously Dedicated Mode</title> <title>Dangerously Dedicated Mode</title>
<para>If you use just the disk name, such as <para>If just the disk name is used, such as
<devicename>ad0</devicename>, in the &man.bsdlabel.8; <devicename>ad0</devicename>, &man.bsdlabel.8; will create a
command you will create a dangerously dedicated disk, <quote>dangerously dedicated</quote> disk, without slices.
without slices. This is almost certainly not what you want This is probably not the desired action, so double check the
to do, so make sure you double check the &man.bsdlabel.8; <replaceable>diskslice</replaceable> passed to
command before you press <keycap>Return</keycap>.</para> &man.bsdlabel.8; before pressing
<keycap>Return</keycap>.</para>
</warning> </warning>
</sect2> </sect2>
@ -313,16 +300,16 @@ boot:</screen>
bootstrap, and is located on the file system, usually as bootstrap, and is located on the file system, usually as
<filename>/boot/loader</filename>.</para> <filename>/boot/loader</filename>.</para>
<para>The loader is intended as a user-friendly method for <para>The loader is intended as an interactive method for
configuration, using an easy-to-use built-in command set, configuration, using a built-in command set, backed up by a
backed up by a more powerful interpreter, with a more complex more powerful interpreter which has a more complex command
command set.</para> set.</para>
<sect3 id="boot-loader-flow"> <sect3 id="boot-loader-flow">
<title>Loader Program Flow</title> <title>Loader Program Flow</title>
<para>During initialization, the loader will probe for a <para>During initialization, the loader will probe for a
console and for disks, and figure out what disk it is console and for disks, and figure out which disk it is
booting from. It will set variables accordingly, and an booting from. It will set variables accordingly, and an
interpreter is started where user commands can be passed interpreter is started where user commands can be passed
from a script or interactively.</para> from a script or interactively.</para>
@ -342,16 +329,16 @@ boot:</screen>
<para>Finally, by default, the loader issues a 10 second wait <para>Finally, by default, the loader issues a 10 second wait
for key presses, and boots the kernel if it is not for key presses, and boots the kernel if it is not
interrupted. If interrupted, the user is presented with a interrupted. If interrupted, the user is presented with a
prompt which understands the easy-to-use command set, where prompt which understands the command set, where the user may
the user may adjust variables, unload all modules, load adjust variables, unload all modules, load modules, and then
modules, and then finally boot or reboot.</para> finally boot or reboot.</para>
</sect3> </sect3>
<sect3 id="boot-loader-commands"> <sect3 id="boot-loader-commands">
<title>Loader Built-In Commands</title> <title>Loader Built-In Commands</title>
<para>These are the most commonly used loader commands. For a <para>These are the most commonly used loader commands. For a
complete discussion of all available commands, please see complete discussion of all available commands, refer to
&man.loader.8;.</para> &man.loader.8;.</para>
<variablelist> <variablelist>
@ -372,11 +359,10 @@ boot:</screen>
<optional><replaceable>kernelname</replaceable></optional></term> <optional><replaceable>kernelname</replaceable></optional></term>
<listitem> <listitem>
<para>Immediately proceeds to boot the kernel, with the <para>Immediately proceeds to boot the kernel, with any
given options, if any, and with the kernel name given, specified options or kernel name. Providing a kernel
if it is. Providing a kernel name on the command-line name on the command-line is only applicable after an
is only applicable after an <emphasis>unload</emphasis> command has been issued;
<emphasis>unload</emphasis> command has been issued,
otherwise the previously-loaded kernel will be otherwise the previously-loaded kernel will be
used.</para> used.</para>
</listitem> </listitem>
@ -387,10 +373,10 @@ boot:</screen>
<listitem> <listitem>
<para>Goes through the same automatic configuration of <para>Goes through the same automatic configuration of
modules based on variables as what happens at boot. modules based on specified variables, most commonly
This only makes sense if you use <envar>kernel</envar>. This only makes sense if
<command>unload</command> first, and change some <command>unload</command> is used first, before
variables, most commonly <envar>kernel</envar>.</para> changing some variables.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -401,8 +387,8 @@ boot:</screen>
<listitem> <listitem>
<para>Shows help messages read from <para>Shows help messages read from
<filename>/boot/loader.help</filename>. If the topic <filename>/boot/loader.help</filename>. If the topic
given is <literal>index</literal>, then the list of given is <literal>index</literal>, the list of
available topics is given.</para> available topics is displayed.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -412,7 +398,7 @@ boot:</screen>
<listitem> <listitem>
<para>Processes the file with the given filename. The <para>Processes the file with the given filename. The
file is read in, and interpreted line by line. An file is read in and interpreted line by line. An
error immediately stops the include command.</para> error immediately stops the include command.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -424,8 +410,9 @@ boot:</screen>
<listitem> <listitem>
<para>Loads the kernel, kernel module, or file of the <para>Loads the kernel, kernel module, or file of the
type given, with the filename given. Any arguments type given, with the specified filename. Any
after filename are passed to the file.</para> arguments after <replaceable>filename</replaceable>
are passed to the file.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -436,8 +423,8 @@ boot:</screen>
<listitem> <listitem>
<para>Displays a listing of files in the given path, or <para>Displays a listing of files in the given path, or
the root directory, if the path is not specified. If the root directory, if the path is not specified. If
<option>-l</option> is specified, file sizes will be <option>-l</option> is specified, file sizes will
shown too.</para> also be shown.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -508,15 +495,14 @@ boot:</screen>
<indexterm><primary>single-user mode</primary></indexterm> <indexterm><primary>single-user mode</primary></indexterm>
<listitem> <listitem>
<para>To boot your usual kernel, but in single-user <para>To boot the usual kernel in single-user mode:</para>
mode:</para>
<screen><userinput>boot -s</userinput></screen> <screen><userinput>boot -s</userinput></screen>
</listitem> </listitem>
<listitem> <listitem>
<para>To unload your usual kernel and modules, and then <para>To unload the usual kernel and modules, and then
load just your old (or another) kernel:</para> load the previous or another kernel:</para>
<indexterm> <indexterm>
<primary><filename>kernel.old</filename></primary> <primary><filename>kernel.old</filename></primary>
@ -525,14 +511,14 @@ boot:</screen>
<screen><userinput>unload</userinput> <screen><userinput>unload</userinput>
<userinput>load <replaceable>kernel.old</replaceable></userinput></screen> <userinput>load <replaceable>kernel.old</replaceable></userinput></screen>
<para>You can use <filename>kernel.GENERIC</filename> to <para>Use <filename>kernel.GENERIC</filename> to refer to
refer to the generic kernel that comes on the install the default kernel that comes with an installation, or
disk, or <filename>kernel.old</filename> to refer to <filename>kernel.old</filename> to refer to the
your previously installed kernel (when you have upgraded previously installed kernel before a system upgrade or
or configured your own kernel, for example).</para> before configuring a custom kernel.</para>
<note> <note>
<para>Use the following to load your usual modules with <para>Use the following to load the usual modules with
another kernel:</para> another kernel:</para>
<screen><userinput>unload</userinput> <screen><userinput>unload</userinput>
@ -541,9 +527,8 @@ boot:</screen>
</listitem> </listitem>
<listitem> <listitem>
<para>To load a kernel configuration script (an automated <para>To load an automated kernel configuration
script which does the things you would normally do in script:</para>
the kernel boot-time configurator):</para>
<screen><userinput>load -t userconfig_script <replaceable>/boot/kernel.conf</replaceable></userinput></screen> <screen><userinput>load -t userconfig_script <replaceable>/boot/kernel.conf</replaceable></userinput></screen>
</listitem> </listitem>
@ -563,89 +548,58 @@ boot:</screen>
<title>Boot Time Splash Screens</title> <title>Boot Time Splash Screens</title>
<para>The splash screen creates a more visually appealing boot <para>The splash screen creates an alternate boot screen. The
screen compared to the original boot messages. This screen splash screen hides all the boot probe messages and service
will be displayed until a console login prompt or an X startup messages before displaying either a command line or
display manager offers a login prompt.</para> graphical login prompt.</para>
<para>There are two basic environments available in &os;. The <para>There are two basic environments available in &os;. The
first is the default legacy virtual console command line first is the default legacy virtual console command line
environment. After the system finishes booting, a console environment. After the system finishes booting, a console
login prompt is presented. The second environment is the login prompt is presented. The second environment is the
X11 Desktop graphical environment. After graphical environment provided by
<link linkend="x-install">X11</link> and one of the <link linkend="x11">Xorg</link>. Refer to that chapter for
graphical more information on how to install and configure a graphical
<link linkend="x11-wm">desktop environments</link>, such as display manager and a graphical login manager.</para>
<application>GNOME</application>,
<application>KDE</application>, or
<application>XFce</application> are installed, the X11
desktop can be launched by using
<command>startx</command>.</para>
<para>Some users prefer the X11 graphical login screen over
the traditional text based login prompt. Display managers
like <application>XDM</application> for &xorg;,
<application>gdm</application> for
<application>GNOME</application>, and
<application>kdm</application> for
<application>KDE</application> (and any other from the Ports
Collection) provide a graphical login screen in
place of the console login prompt. After a successful
login, they present the user with a graphical
desktop.</para>
<para>In the command line environment, the splash screen would
hide all the boot probe messages and task startup messages
before displaying the login prompt. In X11 environment, the
users would get a visually clearer system start up
experience resembling something closer to what a
(&microsoft; &windows; or non-unix type system) user would
experience.</para>
<sect4 id="boot-splash-function"> <sect4 id="boot-splash-function">
<title>Splash Screen Function</title> <title>Splash Screen Function</title>
<para>The splash screen function supports 256-color <para>The splash screen function supports 256-colors in the
bitmap (<filename>.bmp</filename>), ZSoft bitmap (<filename>.bmp</filename>), ZSoft
<acronym>PCX</acronym> (<filename>.pcx</filename>), or <acronym>PCX</acronym> (<filename>.pcx</filename>), or
TheDraw (<filename>.bin</filename>) files. TheDraw (<filename>.bin</filename>) formats. The splash
In addition, the splash image files must have a resolution image files must have a resolution of 320 by 200 pixels or
of 320 by 200 pixels or less to work on standard VGA less in order to work on standard VGA adapters.</para>
adapters.</para>
<para>To use larger images, up to the maximum resolution of <para>To use larger images, up to the maximum resolution of
1024 by 768 pixels, activate the <acronym>VESA</acronym> 1024 by 768 pixels, load the <acronym>VESA</acronym>
support included in &os;. This can be enabled by loading module during system boot. For a <xref
the <acronym>VESA</acronym> module during system boot, or linkend="kernelconfig">custom kernel</xref>, include the
adding a <literal>VESA</literal> kernel configuration <literal>VESA</literal> kernel configuration option.
option and building a custom kernel (see <xref Loading <acronym>VESA</acronym> support provides the
linkend="kernelconfig"/>). The <acronym>VESA</acronym> ability to display a splash screen image that fills the
support gives users the ability to display a splash screen whole display screen.</para>
image that fills the whole display screen.</para>
<para>While the splash screen is being displayed during the <para>While the splash screen is being displayed during the
booting process, it can be turned off any time by hitting booting process, it can be turned off any time by hitting
any key on the keyboard.</para> any key on the keyboard.</para>
<para>The splash screen also defaults to being a screen <para>The splash screen also defaults to being a screen
saver outside of X11. After a time period of non-use the saver outside. After a time period of non-use, the splash
screen will change to the splash screen and cycle through screen will be displayed and will cycle through steps of
steps of changing intensity of the image, from bright to a changing intensity of the image, from bright to very dark
very dark and over again. This default splash screen and over again. The configuration of the splash screen
(screen saver) behavior could be overridden by adding a saver can be overridden by adding a
<literal>saver=</literal> line to <literal>saver=</literal> line to
<filename>/etc/rc.conf</filename>. Option <filename>/etc/rc.conf</filename>. Several built-in
<literal>saver=</literal> has several built-in screen screen savers are available and described in
savers to choose from, the full list can be found in the &man.splash.4;. The <literal>saver=</literal> option only
&man.splash.4; manual page. The default screen saver is applies to virtual consoles and has no effect on graphical
called <quote>warp</quote>. Note that the display managers.</para>
<literal>saver=</literal> option specified in
<filename>/etc/rc.conf</filename> only applies to virtual
consoles. It has no effect on X11 display
managers.</para>
<para>A few boot loader messages, including the boot options <para>A few boot loader messages, including the boot options
menu and a timed wait count down prompt are displayed at menu and a timed wait count down prompt, are displayed at
boot time, even when the splash screen is enabled.</para> boot time, even when the splash screen is enabled.</para>
<para>Sample splash screen files can be downloaded from the <para>Sample splash screen files can be downloaded from the
@ -660,15 +614,14 @@ boot:</screen>
<sect4 id="boot-splash-enable"> <sect4 id="boot-splash-enable">
<title>Enabling the Splash Screen Function</title> <title>Enabling the Splash Screen Function</title>
<para>The splash screen (<filename>.bmp</filename>, <para>The splash screen <filename>.bmp</filename>,
<filename>.pcx</filename>, or <filename>.bin</filename>) <filename>.pcx</filename>, or <filename>.bin</filename>
file has to be placed on the root partition, for example image has to be placed on the root partition, for example
in the <filename class="directory">/boot</filename> in <filename class="directory">/boot</filename>.</para>
directory.</para>
<para>For default boot display resolution (256-color, 320 by <para>For the default boot display resolution of 256-colors
200 pixels, or less), edit and 320 by 200 pixels or less, edit
<filename>/boot/loader.conf</filename>, so it contains the <filename>/boot/loader.conf</filename> so it contains the
following:</para> following:</para>
<programlisting>splash_bmp_load="YES" <programlisting>splash_bmp_load="YES"
@ -685,19 +638,19 @@ splash_bmp_load="YES"
bitmap_load="YES" bitmap_load="YES"
bitmap_name="<replaceable>/boot/splash.bmp</replaceable>"</programlisting> bitmap_name="<replaceable>/boot/splash.bmp</replaceable>"</programlisting>
<para>The above assumes that <para>This example assumes that
<filename><replaceable>/boot/splash.bmp</replaceable></filename> <filename><replaceable>/boot/splash.bmp</replaceable></filename>
is used for splash screen. When a <acronym>PCX</acronym> is used for the splash screen. To use a
file is desired, use the following statements, plus the <acronym>PCX</acronym> file, use the following statements,
<literal>vesa_load="YES"</literal> line depending on the plus the <literal>vesa_load="YES"</literal> line,
resolution.</para> depending on the resolution:</para>
<programlisting>splash_pcx_load="YES" <programlisting>splash_pcx_load="YES"
bitmap_load="YES" bitmap_load="YES"
bitmap_name="<replaceable>/boot/splash.pcx</replaceable>"</programlisting> bitmap_name="<replaceable>/boot/splash.pcx</replaceable>"</programlisting>
<para>In version 8.3 another option is to use ascii art in <para>Beginning with &os;&nbsp;8.3, another option is to use
<ulink ASCII art in <ulink
url="https://en.wikipedia.org/wiki/TheDraw">TheDraw</ulink> url="https://en.wikipedia.org/wiki/TheDraw">TheDraw</ulink>
format.</para> format.</para>
@ -707,14 +660,14 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<para>The file name is not restricted to <para>The file name is not restricted to
<quote>splash</quote> as shown in the above example. It <quote>splash</quote> as shown in the above example. It
can be anything as long as it is one of the above types can be anything as long as it is one of the supported
such as, types such as,
<filename><replaceable>splash_640x400</replaceable>.bmp</filename> <filename><replaceable>splash_640x400</replaceable>.bmp</filename>
or or
<filename><replaceable>bluewave</replaceable>.pcx</filename>.</para> <filename><replaceable>bluewave</replaceable>.pcx</filename>.</para>
<para>Some other interesting <para>Other interesting
<filename>loader.conf</filename> options:</para> <filename>loader.conf</filename> options include:</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
@ -737,13 +690,13 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<para>This will replace the default words <para>This will replace the default words
<quote>&os;</quote>, which are displayed to the <quote>&os;</quote>, which are displayed to the
right of the boot options menu with the colored right of the boot options menu with the colored
beastie logo like releases in the past had.</para> beastie logo.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
<para>For more information, please see the &man.splash.4;, <para>For more information, refer to &man.splash.4;,
&man.loader.conf.5;, and &man.vga.4; manual pages.</para> &man.loader.conf.5;, and &man.vga.4;.</para>
</sect4> </sect4>
</sect3> </sect3>
</sect2> </sect2>
@ -757,10 +710,10 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<secondary>boot interaction</secondary> <secondary>boot interaction</secondary>
</indexterm> </indexterm>
<para>Once the kernel is loaded by either <link <para>Once the kernel is loaded by either the default <link
linkend="boot-loader">loader</link> (as usual) or <link linkend="boot-loader">loader</link> or by <link
linkend="boot-boot1">boot2</link> (bypassing the loader), it linkend="boot-boot1">boot2</link> which bypasses the loader,
examines its boot flags, if any, and adjusts its behavior as it examines its boot flags, if any, and adjusts its behavior as
necessary.</para> necessary.</para>
<sect2 id="boot-kernel-bootflags"> <sect2 id="boot-kernel-bootflags">
@ -778,7 +731,7 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<term><option>-a</option></term> <term><option>-a</option></term>
<listitem> <listitem>
<para>during kernel initialization, ask for the device <para>During kernel initialization, ask for the device
to mount as the root file system.</para> to mount as the root file system.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -787,7 +740,7 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<term><option>-C</option></term> <term><option>-C</option></term>
<listitem> <listitem>
<para>boot from CDROM.</para> <para>Boot from CDROM.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -795,8 +748,8 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<term><option>-c</option></term> <term><option>-c</option></term>
<listitem> <listitem>
<para>run UserConfig, the boot-time kernel <para>Run UserConfig, the boot-time kernel
configurator</para> configurator.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -804,7 +757,7 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<term><option>-s</option></term> <term><option>-s</option></term>
<listitem> <listitem>
<para>boot into single-user mode</para> <para>Boot into single-user mode.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -812,14 +765,14 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<term><option>-v</option></term> <term><option>-v</option></term>
<listitem> <listitem>
<para>be more verbose during kernel startup</para> <para>Be more verbose during kernel startup.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
<note> <note>
<para>There are other boot flags, read &man.boot.8; for more <para>Refer to &man.boot.8; for more information on the other
information on them.</para> boot flags.</para>
</note> </note>
</sect2> </sect2>
@ -848,27 +801,26 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<primary>device.hints</primary> <primary>device.hints</primary>
</indexterm> </indexterm>
<para>During initial system startup, the boot &man.loader.8; will <para>During initial system startup, the boot &man.loader.8; reads
read the &man.device.hints.5; file. This file stores kernel &man.device.hints.5;. This file stores kernel boot information
boot information known as variables, sometimes referred to as known as variables, sometimes referred to as
<quote>device hints</quote>. These <quote>device hints</quote> <quote>device hints</quote>. These <quote>device hints</quote>
are used by device drivers for device configuration.</para> are used by device drivers for device configuration.</para>
<para>Device hints may also be specified at the <para>Device hints may also be specified at the <link
<link linkend="boot-loader"> linkend="boot-loader"> Stage 3 boot loader</link> prompt.
Stage 3 boot loader</link> prompt. Variables can be added using Variables can be added using <command>set</command>, removed
<command>set</command>, removed with <command>unset</command>, with <command>unset</command>, and viewed
and viewed with the <command>show</command> commands. Variables <command>show</command>. Variables set in
set in <filename>/boot/device.hints</filename> can be <filename>/boot/device.hints</filename> can also be overridden.
overridden here also. Device hints entered at the boot loader Device hints entered at the boot loader are not permanent and
are not permanent and will be forgotten on the next will not be applied on the next reboot.</para>
reboot.</para>
<para>Once the system is booted, the &man.kenv.1; command can be <para>Once the system is booted, &man.kenv.1; can be used to dump
used to dump all of the variables.</para> all of the variables.</para>
<para>The syntax for <filename>/boot/device.hints</filename> <para>The syntax for <filename>/boot/device.hints</filename>
is one variable per line, using the standard hash is one variable per line, using the hash
<quote>#</quote> as comment markers. Lines are constructed as <quote>#</quote> as comment markers. Lines are constructed as
follows:</para> follows:</para>
@ -878,7 +830,7 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<screen><userinput>set hint.driver.unit.keyword=<replaceable>value</replaceable></userinput></screen> <screen><userinput>set hint.driver.unit.keyword=<replaceable>value</replaceable></userinput></screen>
<para><literal>driver</literal> is the device driver name, <para>where <literal>driver</literal> is the device driver name,
<literal>unit</literal> is the device driver unit number, and <literal>unit</literal> is the device driver unit number, and
<literal>keyword</literal> is the hint keyword. The keyword may <literal>keyword</literal> is the hint keyword. The keyword may
consist of the following options:</para> consist of the following options:</para>
@ -920,10 +872,10 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para>Device drivers may accept (or require) more hints not listed <para>Since device drivers may accept or require more hints not
here, viewing their manual page is recommended. For more listed here, viewing a driver's manual page is recommended.
information, consult the &man.device.hints.5;, &man.kenv.1;, For more information, refer to &man.device.hints.5;,
&man.loader.conf.5;, and &man.loader.8; manual pages.</para> &man.kenv.1;, &man.loader.conf.5;, and &man.loader.8;.</para>
</sect1> </sect1>
<sect1 id="boot-init"> <sect1 id="boot-init">
@ -944,10 +896,10 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<para>The automatic reboot sequence makes sure that the file <para>The automatic reboot sequence makes sure that the file
systems available on the system are consistent. If they are systems available on the system are consistent. If they are
not, and &man.fsck.8; cannot fix the inconsistencies, not, and &man.fsck.8; cannot fix the inconsistencies of a UFS
&man.init.8; drops the system into file system, &man.init.8; drops the system into
<link linkend="boot-singleuser">single-user mode</link> for <link linkend="boot-singleuser">single-user mode</link> so
the system administrator to take care of the problems that the system administrator can resolve the problem
directly.</para> directly.</para>
</sect2> </sect2>
@ -957,21 +909,19 @@ bitmap_name="<replaceable>/boot/splash.bin</replaceable>"</programlisting>
<indexterm><primary>single-user mode</primary></indexterm> <indexterm><primary>single-user mode</primary></indexterm>
<indexterm><primary>console</primary></indexterm> <indexterm><primary>console</primary></indexterm>
<para>This mode can be reached through the <para>This mode can be reached through the <link
<link linkend="boot-autoreboot">automatic reboot linkend="boot-autoreboot">automatic reboot sequence</link>,
sequence</link>, or by the user booting with the the user booting with <option>-s</option>, or by setting
<option>-s</option> option or setting the the <envar>boot_single</envar> variable in
<envar>boot_single</envar> variable in
<command>loader</command>.</para> <command>loader</command>.</para>
<para>It can also be reached by calling &man.shutdown.8; without <para>It can also be reached by calling &man.shutdown.8; from
the reboot (<option>-r</option>) or halt (<option>-h</option>) <link linkend="boot-multiuser">multi-user mode</link> without
options, from <link linkend="boot-multiuser">multi-user including <option>-r</option> or <option>-h</option>.</para>
mode</link>.</para>
<para>If the system <literal>console</literal> is set to <para>If the system <literal>console</literal> is set to
<literal>insecure</literal> in <filename>/etc/ttys</filename>, <literal>insecure</literal> in <filename>/etc/ttys</filename>,
then the system prompts for the <username>root</username> the system will prompt for the <username>root</username>
password before initiating single-user mode.</para> password before initiating single-user mode.</para>
<example id="boot-insecure-console"> <example id="boot-insecure-console">
@ -986,13 +936,12 @@ console none unknown off insecure</programlisting>
</example> </example>
<note> <note>
<para>An <literal>insecure</literal> console means that you <para>An <literal>insecure</literal> console means that
consider your physical security to the console to be physical security to the console is considered to be
insecure, and want to make sure only someone who knows the insecure, so only someone who knows the
<username>root</username> password may use single-user mode, <username>root</username> password may use single-user mode.
and it does not mean that you want to run your console Thus, to add this measure of security, choose
insecurely. Thus, if you want security, choose <literal>insecure</literal>, instead of the default of
<literal>insecure</literal>, not
<literal>secure</literal>.</para> <literal>secure</literal>.</para>
</note> </note>
</sect2> </sect2>
@ -1002,8 +951,8 @@ console none unknown off insecure</programlisting>
<indexterm><primary>multi-user mode</primary></indexterm> <indexterm><primary>multi-user mode</primary></indexterm>
<para>If &man.init.8; finds your file systems to be in order, or <para>If &man.init.8; finds the file systems to be in order, or
once the user has finished in <link once the user has finished their commands in <link
linkend="boot-singleuser">single-user mode</link>, the linkend="boot-singleuser">single-user mode</link>, the
system enters multi-user mode, in which it starts the system enters multi-user mode, in which it starts the
resource configuration of the system.</para> resource configuration of the system.</para>
@ -1018,14 +967,13 @@ console none unknown off insecure</programlisting>
<filename>/etc/defaults/rc.conf</filename>, and <filename>/etc/defaults/rc.conf</filename>, and
system-specific details from system-specific details from
<filename>/etc/rc.conf</filename>, and then proceeds to <filename>/etc/rc.conf</filename>, and then proceeds to
mount the system file systems mentioned in mount the system file systems listed in
<filename>/etc/fstab</filename>, start up networking <filename>/etc/fstab</filename>. It starts up networking
services, start up miscellaneous system daemons, and services, miscellaneous system daemons, then the startup
finally runs the startup scripts of locally installed scripts of locally installed packages.</para>
packages.</para>
<para>The &man.rc.8; manual page is a good reference to the <para>To learn more about the resource configuration system,
resource configuration system, as is examining the scripts refer to &man.rc.8; and examine the scripts
themselves.</para> themselves.</para>
</sect3> </sect3>
</sect2> </sect2>
@ -1038,27 +986,26 @@ console none unknown off insecure</programlisting>
<primary><command>shutdown</command></primary> <primary><command>shutdown</command></primary>
</indexterm> </indexterm>
<para>Upon controlled shutdown, via &man.shutdown.8;, <para>Upon controlled shutdown using &man.shutdown.8;,
&man.init.8; will attempt to run the script &man.init.8; will attempt to run the script
<filename>/etc/rc.shutdown</filename>, and then proceed to send <filename>/etc/rc.shutdown</filename>, and then proceed to send
all processes the <literal>TERM</literal> signal, and all processes the <literal>TERM</literal> signal, and
subsequently the <literal>KILL</literal> signal to any that do subsequently the <literal>KILL</literal> signal to any that do
not terminate timely.</para> not terminate in a timely manner.</para>
<para>To power down a FreeBSD machine on architectures and systems <para>To power down a &os; machine on architectures and systems
that support power management, use the command that support power management, use <command>shutdown -p
<command>shutdown -p now</command> to turn the power off now</command> to turn the power off immediately. To reboot a
immediately. To just reboot a FreeBSD system, just use &os; system, use <command>shutdown -r now</command>. One must
<command>shutdown -r now</command>. You need to be be <username>root</username> or a member of the
<username>root</username> or a member of <groupname>operator</groupname> group in order to run
<groupname>operator</groupname> group to run &man.shutdown.8;. &man.shutdown.8;. One can also use &man.halt.8; and
The &man.halt.8; and &man.reboot.8; commands can also be used, &man.reboot.8;. Refer to their manual pages and to
please refer to their manual pages and to &man.shutdown.8;'s one &man.shutdown.8; for more information.</para>
for more information.</para>
<note> <note>
<para>Power management requires &man.acpi.4; support in the <para>Power management requires &man.acpi.4; to be loaded as
kernel or loaded as module for.</para> a module or staticly compiled into a custom kernel.</para>
</note> </note>
</sect1> </sect1>
</chapter> </chapter>