Begin to incorporate repeated info within the Rebuilding World chapter.
Fix some xrefs. Sponsored by: iXsystems
This commit is contained in:
parent
9682d6c602
commit
73eb8113ed
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44733
1 changed files with 40 additions and 108 deletions
|
@ -1109,7 +1109,7 @@ before running "/usr/sbin/freebsd-update install"</screen>
|
||||||
<secondary>compiling</secondary>
|
<secondary>compiling</secondary>
|
||||||
</indexterm>, read <filename>/usr/src/Makefile</filename>
|
</indexterm>, read <filename>/usr/src/Makefile</filename>
|
||||||
very carefully and follow the instructions in
|
very carefully and follow the instructions in
|
||||||
<link linkend="makeworld">Rebuilding "world"</link>.
|
<xref linkend="makeworld"/>.
|
||||||
Read the &a.current; and
|
Read the &a.current; and
|
||||||
<filename>/usr/src/UPDATING</filename> to stay
|
<filename>/usr/src/UPDATING</filename> to stay
|
||||||
up-to-date on other bootstrapping procedures that
|
up-to-date on other bootstrapping procedures that
|
||||||
|
@ -1216,8 +1216,8 @@ before running "/usr/sbin/freebsd-update install"</screen>
|
||||||
<primary>-STABLE</primary>
|
<primary>-STABLE</primary>
|
||||||
<secondary>compiling</secondary>
|
<secondary>compiling</secondary>
|
||||||
</indexterm>, read <filename>/usr/src/Makefile</filename>
|
</indexterm>, read <filename>/usr/src/Makefile</filename>
|
||||||
carefully and follow the instructions in <link
|
carefully and follow the instructions in <xref
|
||||||
linkend="makeworld">Rebuilding "world"</link>. Read
|
linkend="makeworld"/>. Read
|
||||||
&a.stable; and <filename>/usr/src/UPDATING</filename> to
|
&a.stable; and <filename>/usr/src/UPDATING</filename> to
|
||||||
keep up-to-date on other bootstrapping procedures that
|
keep up-to-date on other bootstrapping procedures that
|
||||||
sometimes become necessary on the road to the next
|
sometimes become necessary on the road to the next
|
||||||
|
@ -1290,7 +1290,7 @@ before running "/usr/sbin/freebsd-update install"</screen>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 xml:id="makeworld">
|
<sect1 xml:id="makeworld">
|
||||||
<title>Rebuilding <quote>world</quote></title>
|
<title>Rebuilding World</title>
|
||||||
|
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>Rebuilding <quote>world</quote></primary>
|
<primary>Rebuilding <quote>world</quote></primary>
|
||||||
|
@ -1333,12 +1333,12 @@ before running "/usr/sbin/freebsd-update install"</screen>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>Read <filename>/usr/src/UPDATING</filename> for any
|
<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
|
source. This file contains important information about
|
||||||
potential problems and may specify the order to run certain
|
potential problems and may specify the order to run certain
|
||||||
commands. Many upgrades require specific additional steps
|
commands. Many upgrades require specific additional steps
|
||||||
such as renaming or deleting specific files prior to
|
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
|
where the currently recommended upgrade sequence is
|
||||||
explicitly spelled out. If
|
explicitly spelled out. If
|
||||||
<filename>UPDATING</filename> contradicts any steps in this
|
<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
|
<para>Use the new compiler residing in <filename
|
||||||
class="directory">/usr/obj</filename> to build the new
|
class="directory">/usr/obj</filename> to build the new
|
||||||
kernel, in order to protect against compiler-kernel
|
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>
|
<screen>&prompt.root; <userinput>make buildkernel</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>Install the new kernel and kernel modules, making it
|
<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>
|
<screen>&prompt.root; <userinput>make installkernel</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<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
|
minimize problems from updating any binaries that are
|
||||||
already running. It also minimizes any problems from
|
already running. It also minimizes any problems from
|
||||||
running the old world on a new kernel.</para>
|
running the old world on a new kernel.</para>
|
||||||
|
@ -1475,7 +1487,11 @@ before running "/usr/sbin/freebsd-update install"</screen>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<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
|
to <filename class="directory">/etc</filename> in
|
||||||
preparation for the new world. The following command
|
preparation for the new world. The following command
|
||||||
compares only those files that are essential for the
|
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
|
last update. This is necessary so that the
|
||||||
<buildtarget>installworld</buildtarget> step will be able
|
<buildtarget>installworld</buildtarget> step will be able
|
||||||
to use any new system accounts, groups, and
|
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>
|
<screen>&prompt.root; <userinput>mergemaster -p</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<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>
|
class="directory">/usr/obj</filename>.</para>
|
||||||
|
|
||||||
<screen>&prompt.root; <userinput>cd /usr/src</userinput>
|
<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>
|
<indexterm><primary>single-user mode</primary></indexterm>
|
||||||
|
|
||||||
<para>If the system can have a window of down-time, consider
|
<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
|
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
|
system touches a lot of important system files, all the
|
||||||
standard system binaries, libraries, and include files.
|
standard system binaries, libraries, and include files.
|
||||||
Changing these on a running system, particularly one with
|
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>
|
<primary><filename>make.conf</filename></primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<para>This section describes the configuration files used by the
|
<para>This build world process uses several configuration
|
||||||
build world process.</para>
|
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
|
&man.make.conf.5; and some common examples are included in
|
||||||
<filename>/usr/share/examples/etc/make.conf</filename>. Any
|
<filename>/usr/share/examples/etc/make.conf</filename>. Any
|
||||||
options which are added to <filename>/etc/make.conf</filename>
|
options which are added to <filename>/etc/make.conf</filename>
|
||||||
will control the way &man.make.1; runs and how it builds
|
will control the how <command>make</command> runs and builds
|
||||||
programs. Such options take effect every time &man.make.1; is
|
programs. These options take effect every time <command>make</command> is
|
||||||
used, including compiling applications from the Ports
|
used, including compiling applications from the Ports
|
||||||
Collection, compiling custom C programs, or building the &os;
|
Collection, compiling custom C programs, or building the &os;
|
||||||
operating system.</para>
|
operating system. Changes to some settings can have far-reaching and
|
||||||
|
|
||||||
<para>Changes to some settings can have far-reaching and
|
|
||||||
potentially surprising effects. Read the comments in both
|
potentially surprising effects. Read the comments in both
|
||||||
locations and keep in mind that the defaults have been chosen
|
locations and keep in mind that the defaults have been chosen
|
||||||
for a combination of performance and safety.</para>
|
for a combination of performance and safety.</para>
|
||||||
|
@ -1676,7 +1691,7 @@ Script done, …</screen>
|
||||||
<buildtarget>buildworld</buildtarget> can be run on a machine
|
<buildtarget>buildworld</buildtarget> can be run on a machine
|
||||||
running in multi-user mode with no fear of ill-effects. It is
|
running in multi-user mode with no fear of ill-effects. It is
|
||||||
still recommended that <buildtarget>installworld</buildtarget>
|
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
|
<para>Secondly, it allows NFS mounts to be used to upgrade
|
||||||
multiple machines on a network. If order to upgrade three
|
multiple machines on a network. If order to upgrade three
|
||||||
|
@ -1728,69 +1743,6 @@ Script done, …</screen>
|
||||||
&os.stable; tree, with no tricks or shortcuts used during the
|
&os.stable; tree, with no tricks or shortcuts used during the
|
||||||
process. A &os.current; tree will take somewhat
|
process. A &os.current; tree will take somewhat
|
||||||
longer.</para>
|
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>
|
<note>
|
||||||
<para>If variables were specified to
|
<para>If variables were specified to
|
||||||
|
@ -1813,24 +1765,9 @@ Script done, …</screen>
|
||||||
</note>
|
</note>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 xml:id="post-installworld-updates">
|
<sect2 xml:id="mergemaster">
|
||||||
<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">
|
|
||||||
<info>
|
<info>
|
||||||
<title><command>mergemaster</command></title>
|
<title>Merging Configuration Files</title>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
|
@ -1909,10 +1846,6 @@ Script done, …</screen>
|
||||||
it will prompt for other options. &man.mergemaster.8; may
|
it will prompt for other options. &man.mergemaster.8; may
|
||||||
prompt to rebuild the password file and will finish up with
|
prompt to rebuild the password file and will finish up with
|
||||||
an option to remove left-over temporary files.</para>
|
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
|
<para>To perform the update manually instead, do not just copy
|
||||||
over the files from
|
over the files from
|
||||||
|
@ -2066,7 +1999,6 @@ Script done, …</screen>
|
||||||
|
|
||||||
<screen>&prompt.root; <userinput>mkdir /var/tmp/root-`date "+%Y%m%d"`</userinput></screen>
|
<screen>&prompt.root; <userinput>mkdir /var/tmp/root-`date "+%Y%m%d"`</userinput></screen>
|
||||||
</tip>
|
</tip>
|
||||||
</sect3>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 xml:id="make-delete-old">
|
<sect2 xml:id="make-delete-old">
|
||||||
|
|
Loading…
Reference in a new issue