Begin to incorporate repeated info within the Rebuilding World chapter.

Fix some xrefs.

Sponsored by:	iXsystems
This commit is contained in:
Dru Lavigne 2014-05-01 18:12:22 +00:00
parent 9682d6c602
commit 73eb8113ed
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44733

View file

@ -1109,7 +1109,7 @@ before running "/usr/sbin/freebsd-update install"</screen>
<secondary>compiling</secondary>
</indexterm>, read <filename>/usr/src/Makefile</filename>
very carefully and follow the instructions in
<link linkend="makeworld">Rebuilding "world"</link>.
<xref linkend="makeworld"/>.
Read the &a.current; and
<filename>/usr/src/UPDATING</filename> to stay
up-to-date on other bootstrapping procedures that
@ -1216,8 +1216,8 @@ before running "/usr/sbin/freebsd-update install"</screen>
<primary>-STABLE</primary>
<secondary>compiling</secondary>
</indexterm>, read <filename>/usr/src/Makefile</filename>
carefully and follow the instructions in <link
linkend="makeworld">Rebuilding "world"</link>. Read
carefully and follow the instructions in <xref
linkend="makeworld"/>. Read
&a.stable; and <filename>/usr/src/UPDATING</filename> to
keep up-to-date on other bootstrapping procedures that
sometimes become necessary on the road to the next
@ -1290,7 +1290,7 @@ before running "/usr/sbin/freebsd-update install"</screen>
</sect1>
<sect1 xml:id="makeworld">
<title>Rebuilding <quote>world</quote></title>
<title>Rebuilding World</title>
<indexterm>
<primary>Rebuilding <quote>world</quote></primary>
@ -1333,12 +1333,12 @@ before running "/usr/sbin/freebsd-update install"</screen>
<step>
<para>Read <filename>/usr/src/UPDATING</filename> for any
pre-buildworld steps necessary for that version of the
extra steps necessary for that version of the
source. This file contains important information about
potential problems and may specify the order to run certain
commands. Many upgrades require specific additional steps
such as renaming or deleting specific files prior to
installworld. These will be listed at the end of this file
installing the new world. These will be listed at the end of this file
where the currently recommended upgrade sequence is
explicitly spelled out. If
<filename>UPDATING</filename> contradicts any steps in this
@ -1430,20 +1430,32 @@ before running "/usr/sbin/freebsd-update install"</screen>
<para>Use the new compiler residing in <filename
class="directory">/usr/obj</filename> to build the new
kernel, in order to protect against compiler-kernel
mismatches:</para>
mismatches. This is necessary, as certain memory
structures may have changed, and programs like
<command>ps</command> and <command>top</command> will fail
to work if the kernel and source code versions are not the
same.</para>
<screen>&prompt.root; <userinput>make buildkernel</userinput></screen>
</step>
<step>
<para>Install the new kernel and kernel modules, making it
possible to boot with the newly updated kernel:</para>
possible to boot with the newly updated kernel. If
<varname>kern.securelevel</varname> has been raised above
<literal>1</literal> <emphasis>and</emphasis>
<literal>noschg</literal> or have been set on the kernel
binary, drop the system into single-user mode first.
Otherwise, this command can be run from multi-user mode
without problems. See &man.init.8; for details about
<varname>kern.securelevel</varname> and &man.chflags.1;
for details about the various file flags.</para>
<screen>&prompt.root; <userinput>make installkernel</userinput></screen>
</step>
<step>
<para>Drop the system into single user mode in order to
<para>Drop the system into single-user mode in order to
minimize problems from updating any binaries that are
already running. It also minimizes any problems from
running the old world on a new kernel.</para>
@ -1475,7 +1487,11 @@ before running "/usr/sbin/freebsd-update install"</screen>
</step>
<step>
<para>Next, perform some initial configuration file updates
<para>Remaking the world will not update certain
directories, such as <filename>/etc</filename>,
<filename>/var</filename> and <filename>/usr</filename>,
with new or changed configuration files. The next step is
to perform some initial configuration file updates
to <filename class="directory">/etc</filename> in
preparation for the new world. The following command
compares only those files that are essential for the
@ -1485,13 +1501,14 @@ before running "/usr/sbin/freebsd-update install"</screen>
last update. This is necessary so that the
<buildtarget>installworld</buildtarget> step will be able
to use any new system accounts, groups, and
scripts.</para>
scripts. Refer to <xref linkend="mergemaster"/> for more
detailed instructions about this command:</para>
<screen>&prompt.root; <userinput>mergemaster -p</userinput></screen>
</step>
<step>
<para>Install the new world from <filename
<para>Install the new world and system binaries from <filename
class="directory">/usr/obj</filename>.</para>
<screen>&prompt.root; <userinput>cd /usr/src</userinput>
@ -1532,9 +1549,9 @@ before running "/usr/sbin/freebsd-update install"</screen>
<indexterm><primary>single-user mode</primary></indexterm>
<para>If the system can have a window of down-time, consider
compiling the system in single user mode instead of compiling
compiling the system in single-user mode instead of compiling
the system in multi-user mode, and then dropping into
single user mode for the installation. Reinstalling the
single-user mode for the installation. Reinstalling the
system touches a lot of important system files, all the
standard system binaries, libraries, and include files.
Changing these on a running system, particularly one with
@ -1548,20 +1565,18 @@ before running "/usr/sbin/freebsd-update install"</screen>
<primary><filename>make.conf</filename></primary>
</indexterm>
<para>This section describes the configuration files used by the
build world process.</para>
<para>This build world process uses several configuration
files.</para>
<para>The options available to &man.make.1; are described in
<para>The options available to <command>make</command> are described in
&man.make.conf.5; and some common examples are included in
<filename>/usr/share/examples/etc/make.conf</filename>. Any
options which are added to <filename>/etc/make.conf</filename>
will control the way &man.make.1; runs and how it builds
programs. Such options take effect every time &man.make.1; is
will control the how <command>make</command> runs and builds
programs. These options take effect every time <command>make</command> is
used, including compiling applications from the Ports
Collection, compiling custom C programs, or building the &os;
operating system.</para>
<para>Changes to some settings can have far-reaching and
operating system. Changes to some settings can have far-reaching and
potentially surprising effects. Read the comments in both
locations and keep in mind that the defaults have been chosen
for a combination of performance and safety.</para>
@ -1676,7 +1691,7 @@ Script done, &hellip;</screen>
<buildtarget>buildworld</buildtarget> can be run on a machine
running in multi-user mode with no fear of ill-effects. It is
still recommended that <buildtarget>installworld</buildtarget>
be run in part in single user mode, though.</para>
be run in part in single-user mode, though.</para>
<para>Secondly, it allows NFS mounts to be used to upgrade
multiple machines on a network. If order to upgrade three
@ -1728,69 +1743,6 @@ Script done, &hellip;</screen>
&os.stable; tree, with no tricks or shortcuts used during the
process. A &os.current; tree will take somewhat
longer.</para>
</sect2>
<sect2 xml:id="new-kernel">
<title>Compile and Install a New Kernel</title>
<indexterm>
<primary>kernel</primary>
<secondary>compiling</secondary>
</indexterm>
<para>To take full advantage of the new system, recompile the
kernel. This is practically a necessity, as certain memory
structures may have changed, and programs like &man.ps.1; and
&man.top.1; will fail to work until the kernel and source code
versions are the same.</para>
<para>The simplest, safest way to do this is to build and
install a kernel based on <filename>GENERIC</filename>. While
<filename>GENERIC</filename> may not have all the necessary
devices for the system, it should contain everything necessary
to boot the system back to single user mode. This is a good
test that the new system works properly. After booting from
<filename>GENERIC</filename> and verifying that the system
works, a new kernel can be built based on a custom kernel
configuration file.</para>
<para>On &os; it is important to
<link linkend="make-buildworld">build world</link> before
building a new kernel.</para>
<note>
<para>To build a custom kernel with an existing customized
configuration file, use
<literal>KERNCONF=<replaceable>MYKERNEL</replaceable></literal>:</para>
<screen>&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make buildkernel KERNCONF=<replaceable>MYKERNEL</replaceable></userinput>
&prompt.root; <userinput>make installkernel KERNCONF=<replaceable>MYKERNEL</replaceable></userinput></screen>
</note>
<para>If <varname>kern.securelevel</varname> has been raised
above 1 <emphasis>and</emphasis> <literal>noschg</literal> or
similar flags have been set on the kernel binary, drop into
single user mode to use
<buildtarget>installkernel</buildtarget>. Otherwise, both
these commands can be run from multi user mode without
problems. See &man.init.8; for details about
<varname>kern.securelevel</varname> and &man.chflags.1; for
details about the various file flags.</para>
<para>Reboot into single user mode to test that the new kernel
works.</para>
</sect2>
<sect2 xml:id="make-installworld">
<title>Install the New System Binaries</title>
<para>Next, use <buildtarget>installworld</buildtarget> to
install the new system binaries:</para>
<screen>&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make installworld</userinput></screen>
<note>
<para>If variables were specified to
@ -1813,24 +1765,9 @@ Script done, &hellip;</screen>
</note>
</sect2>
<sect2 xml:id="post-installworld-updates">
<title>Update Files Not Updated by
<command>make installworld</command></title>
<para>Remaking the world will not update certain directories,
such as <filename>/etc</filename>,
<filename>/var</filename> and
<filename>/usr</filename>, with
new or changed configuration files.</para>
<para>The simplest way to update the files in these directories
is to use &man.mergemaster.8;. Be sure to first make a backup
of <filename>/etc</filename> in case anything goes
wrong.</para>
<sect3 xml:id="mergemaster">
<sect2 xml:id="mergemaster">
<info>
<title><command>mergemaster</command></title>
<title>Merging Configuration Files</title>
<authorgroup>
<author>
@ -1909,10 +1846,6 @@ Script done, &hellip;</screen>
it will prompt for other options. &man.mergemaster.8; may
prompt to rebuild the password file and will finish up with
an option to remove left-over temporary files.</para>
</sect3>
<sect3>
<title>Manual Update</title>
<para>To perform the update manually instead, do not just copy
over the files from
@ -2066,7 +1999,6 @@ Script done, &hellip;</screen>
<screen>&prompt.root; <userinput>mkdir /var/tmp/root-`date "+%Y%m%d"`</userinput></screen>
</tip>
</sect3>
</sect2>
<sect2 xml:id="make-delete-old">