[BACK]Return to upgrade53.html CVS log [TXT][DIR] Up to [local] / www / faq

File: [local] / www / faq / upgrade53.html (download) (as text)

Revision 1.26, Tue May 28 01:53:11 2019 UTC (5 years ago) by bentley
Branch: MAIN
CVS Tags: HEAD
Changes since 1.25: +2 -2 lines

Give FAQ pages their own HTML id, for future use.

<!doctype html>
<html lang=en id=faq>

<title>OpenBSD Upgrade Guide: 5.2 to 5.3</title>
<meta charset=utf-8>
<meta name="description"   content="OpenBSD Upgrade Process for 5.2 -> 5.3">
<meta name="viewport"      content="width=device-width, initial-scale=1">
<link rel="stylesheet"     type="text/css" href="../openbsd.css">
<link rel="canonical"      href="https://www.openbsd.org/faq/upgrade53.html">

<h2 id=OpenBSD>
<a href="../index.html">
<i>Open</i><b>BSD</b></a>
Upgrade Guide: 5.2 to 5.3
</h2>
<hr>
<p>
<a href="index.html">[FAQ Index]</a> |
<a href="upgrade52.html">[5.1 -> 5.2]</a> |
<a href="upgrade54.html">[5.3 -> 5.4]</a>

<p>

<i>Note: Upgrades are only supported from one release to the release
immediately following it.
Do not skip releases.</i>

<p><i>
It is highly recommended that you read through and fully understand
this process before attempting it.
If you are doing it on a critical or physically remote machine, it is
recommended that you test this process on an identical, local system to
verify its success before attempting on a critical or remote computer.
</i>

<p>
Upgrading is a convenient way to bring your OpenBSD system up to the most
recent version.
However, the results are not intended to precisely match the results of
a wipe-and-reload installation.
Old library files in particular are not removed in the upgrade process,
as they may be required by older applications that may or may not be
upgraded at this time.
If you REALLY wish to get rid of all these old files, you are probably
better off reinstalling from scratch.

<p>
Table of Contents:
<ul>
<li><a href="#before">Before upgrading</a>
  <ul>
  <li><a href="#updatepatch">No more updateXX.patch file</a>
  <li><a href="#radeon">Radeon X driver changes</a>
  <li><a href="#OpenSMTPD">OpenSMTPD: Ready for use!</a>
  <li><a href="#smtpd.conf">smtpd.conf syntax change</a>
  <li><a href="#pf">Packet Filter changes</a>
  <li><a href="#sndiod">sndiod(8) options change</a>
  <!-- 5.4 li><a href="#fontconfig">fontconfig update</a -->
  </ul>
<li><a href="#upgrade">The upgrade process</a>
<li><a href="#final">Final steps</a>
  <ul>
  <li><a href="#sysmerge">Merging changed files via sysmerge(8)</a>
  <li><a href="#RmFiles">Files to delete</a>
  <li><a href="#Kernchk">Checking the kernel</a>
  <li><a href="#Pkgup">Upgrading packages</a>
  </ul>
</ul>

<hr>
<p>
<h2 id="before">Before upgrading: things to think about and be aware of</h2>
This is <i>not</i> a complete list of the changes that took place
between 5.2 and 5.3, but rather some of the important things that will
impact a large number of users in the upgrade process.
For a more complete list of changes, see
<a href="../plus53.html">plus53.html</a> and the CVS change logs.

<ul>
<li id="updatepatch"><b>No more updateXX.patch file</b>
In the past, an updateXX.patch file was provided to help with the changes
in the files in <code>/etc</code> and <code>/var</code>.
We now believe that
<a href="https://man.openbsd.org/sysmerge.8">sysmerge(8)</a>
is a much better and more accurate tool for most users.
For this reason, we will no longer be providing a updateXX.patch file
as part of these upgrade instructions.

<p>
<li id="radeon"><b>Radeon X driver change:</b>
The
<a href="https://man.openbsd.org/radeon.4">radeon(4)</a>
X.Org driver has been updated to version 6.14.6 and is now selected by
default when running without an <code>xorg.conf</code> file.
To force the use of the
<a href="https://man.openbsd.org/radeonold.4">radeonold(4)</a>
driver, add the following to <code>/etc/X11/xorg.conf</code>:
<blockquote><pre><b>
Section "Device"
    Identifier "Old Radeon Card"
    Driver "radeonold"
EndSection
</b></pre></blockquote>

<p>
<li id="OpenSMTPD"><b>OpenSMTPD: Ready for use!</b>
<a href="https://www.opensmtpd.org">OpenSMTPD</a> has received a lot of
testing and use, and we now consider it ready for production.
OpenSMTPD has a number of benefits over most other mail transfer agents,
most notably the simple and concise configuration file.
A usable
<a href="https://man.openbsd.org/smtpd.conf.5">smtpd.conf(5)</a>
can be three lines.
<a href="https://man.openbsd.org/sendmail.8">Sendmail(8)</a>
is still there for now, but we encourage you to look at
<a href="https://man.openbsd.org/smtpd.8">smtpd(8)</a>
if you are using sendmail or any other mail transport agent.

<p>
<li id="smtpd.conf"><b>smtpd.conf syntax change:</b>
For users of the older versions of OpenSMTPD, the <code>"all"</code> keyword
becomes <code>"any"</code>.
You need to update your config. Be careful to really rewrite rules like:
<pre><b>	accept from all [...]</b></pre>
to
<pre><b>	accept from any [...]</b></pre>
because the former syntax is still valid, but it behaves completely
differently now and it would break your rule set.

<p>
<li id="pf"><b>pf enforces 'frags' limit:</b>
<a href="https://man.openbsd.org/pfctl.8">pfctl(8)</a>
will abort and fail to load the rule set if the 'frags' limit in pf.conf
is higher than the kern.maxclusters sysctl
This is to guard against allowing a system to run out of mbuf clusters.
If it is not set, the new default is 25% of kern.maxclusters.
<p>
<li><b>pf queue assignment is now done using "<code>set queue</code>" instead of just
"<code>queue</code>"</b>:
The new syntax is documented in
<a href="https://man.openbsd.org/pf.conf.5">pf.conf(5)</a>

<p>
<li id="sndiod"><b><a href="https://man.openbsd.org/sndiod.8">sndiod(8)</a>
options change:</b>
The rate (-r) and the encoding (-e) become per-device settings and as
such must precede the device they apply to (-f).
Example, rewrite:
<blockquote><pre><b>sndiod -frsnd/1 -r44100</b></pre></blockquote>
by
<blockquote><pre><b>sndiod -r44100 -frsnd/1</b></pre></blockquote>
MIDI thru boxes are created dynamically so -M options must be removed.
MIDI ports (-q) cannot be connected to the sndiod control port,
so an external program must be used for that (eg. aucat(1) or the
audio/midish port).
For instance, to make rmidi/5 control snd/0 do:
<blockquote><pre><b>aucat -M -mmidi -qrmidi/5 -qsnd/0</b></pre></blockquote>

<!-- 5.4 p>
<li id="fontconfig"><b>fontconfig update</b>
Fontconfig in xenocara has been updated to version 2.10.91 and has
switched to a BSD make build system.
This new version of fontconfig deprecates the use of
<code>~/.fonts.conf</code> for local configuration. Make sure the users
who have created this file move it to its new location:
<blockquote><pre><b>
mkdir -p ~/.config/fontconfig
mv ~/.fonts.conf ~/.config/fontconfig/fonts.conf
</b></pre></blockquote>
-->
</ul>

<p>
<hr>
<h2 id="upgrade">The upgrade process</h2>

<h3>Upgrading by install kernel</h3>
If you have access to the system's console, the easiest and safest way
to upgrade is to boot from the install kernel by boot media or
<a href="faq4.html#bsd.rd">bsd.rd</a> and follow the upgrade steps,
which are very similar to the <a href="faq4.html">install process</a>.

<p>
Afterwards, complete the upgrade by following the <a href="#final">final
steps</a> as detailed below.

<p>
One easy way to boot from the install kernel is to place the 5.3 version
of <i>bsd.rd</i> in the root of your boot drive, then instruct the boot loader
to boot using this new <i>bsd.rd</i> file.
On amd64 and i386, you do this by entering "<code>boot bsd.rd</code>" at the
initial <code>boot&gt;</code> prompt.

<h3>Upgrading without install kernel</h3>
<i>This is NOT the recommended process.  Use the install kernel method
if at all possible!</i>

<p>
Sometimes, one needs to do an upgrade of a machine when one can't easily
use the normal upgrade process.
The most common case is when the machine is in a remote location and you
don't have easy access to the system console.
One can usually do this by carefully following this process:

<ul>
<li><b>Place install files in a "good" location</b>.
Make sure you have sufficient space!

<p>
<li><b>Become root with ksh(1):</b>
While using
<a href="https://man.openbsd.org/sudo.8">sudo(8)</a>
before each command is generally a good practice, the sudo(8) command
will be broken by the last steps, so you should be root before starting
this process.
Also, the use of the OpenBSD
<a href="https://man.openbsd.org/ksh.1">ksh(1)</a>
shell is assumed.

<p>
<li><b>Stop any appropriate applications:</b>
During this process, all the userland applications will be replaced but
may not be runnable, and strange things may happen as a result.
If this is a concern to you, shut down any applications that may
be impacted.
There may be other applications which you wish to keep from running
immediately after the upgrade, stop and disable them as well.

<p>
<li><b>Disable package daemons and local shutdown commands:</b>
The last steps in the upgrade process may result in various commands,
especially those which are dynamically linked, being broken.
In particular, this may prevent a normal shutdown of daemons listed
in pkg_scripts, or additional commands in /etc/rc.shutdown, which may
cause the machine to hang at shutdown.
Before you proceed with the upgrade, edit /etc/rc.conf.local and
comment-out any pkg_scripts lines.
Also inspect /etc/rc.shutdown and comment-out any local shutdown commands.
These can be reinstated post upgrade.

<p>
<li><b>Check the kernel:</b>
Although <b>most people can skip this step</b>, if you had a modified kernel
in 5.2, it is likely you will need to modify the stock kernel of 5.3.
Especially when you are performing the upgrade process remotely, now is
the time to make sure the new kernel will work upon rebooting the machine.
If any changes must be made to the kernel, the safest thing to do is to
make those changes on a local 5.3 system.
This can be as simple as modifying a specific device using config(8),
or it can involve a recompilation if the option you need is not included
in the GENERIC kernel.
Please consult <a href="faq5.html">FAQ 5 - Building the system from source</a>
before deciding to recompile your kernel.

<p>
<li><b>Install new kernel(s):</b>

<ul>
<li>If using a single processor kernel:
<blockquote><pre>
<b>export RELEASEPATH=</b><i>/usr/rel</i>   <i># where you put the files</i>
<b>cd ${RELEASEPATH}</b>
<b>rm /obsd ; ln /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd</b>
<b>cp bsd.rd bsd.mp /</b>
</pre></blockquote>
(note: you will get a harmless error message if your platform doesn't
have a bsd.mp):
<p>

<li>If you are using the multiprocessor kernel:
<blockquote><pre>
<b>export RELEASEPATH=</b><i>/usr/rel</i>   <i># where you put the files</i>
<b>cd ${RELEASEPATH}</b>
<b>rm /obsd ; ln /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd</b>
<b>cp bsd.rd /</b>
<b>cp bsd /bsd.sp</b>
</pre></blockquote>
</ul>

<p>
Note the extra steps for copying over the primary kernel: those are done
to ensure that there is always a valid copy of the kernel on the disk
that the system can boot from should there be a really badly timed power
outage or system crash.

<p>
<li><b>Save a copy of reboot(8), install new userland applications.</b>
You are still running the old kernel, it is possible the new reboot
command will not run on the old kernel, so we will start by saving a
copy of the old reboot command.
<i>Do NOT install <code>etc53.tgz</code> and <code>xetc53.tgz</code> now, because
that will overwrite your current configuration files!</i>
Note that we are installing base53.tgz LAST, because it will include a new
<a href="https://man.openbsd.org/tar.1">tar(1)</a>
utility, which may or may not run on the old kernel.
We reboot immediately, as the system is probably barely runnable after
the unpacking of all the new files.

<blockquote><pre>
<b>cp /sbin/reboot /sbin/oreboot</b>
<b>tar -C / -xzphf xserv53.tgz</b>
<b>tar -C / -xzphf xfont53.tgz</b>
<b>tar -C / -xzphf xshare53.tgz</b>
<b>tar -C / -xzphf xbase53.tgz</b>
<b>tar -C / -xzphf game53.tgz</b>
<b>tar -C / -xzphf comp53.tgz</b>
<b>tar -C / -xzphf man53.tgz</b>
<b>tar -C / -xzphf base53.tgz</b> # Install last!
<b>/sbin/oreboot</b>
</pre></blockquote>

Not all file sets will need to be installed for all applications,
however if you installed a file set originally, you should certainly
upgrade it with the new file set now.

<p>
Again, the files in <code>/etc</code> are handled separately below, so
<code>etc53.tgz</code> and <code>xetc53.tgz</code> are NOT unpacked here.

<p>
<li><b>After reboot completes, upgrade <code>/dev</code>.</b>
The new
<a href="https://man.openbsd.org/OpenBSD-5.3/i386/MAKEDEV">MAKEDEV</a>
file was copied to /dev by the installation of
<code>base53.tgz</code>, so you simply need to do the following:
<blockquote><pre>
<b>cd /dev</b>
<b>./MAKEDEV all</b>
</pre></blockquote>

</ul>

<hr>
<h2 id="final">Final steps</h2>

Whether you upgrade by using an install kernel and doing a formal
"upgrade" process, or do a "in-place" binary upgrade, you need to do a
few final steps to complete the upgrade.

<p>
<h3 id="sysmerge">1. Merging changed files via sysmerge(8)</h3>

<blockquote>

<p>
The
<a href="https://man.openbsd.org/sysmerge.8">sysmerge(8)</a>
utility will compare the files that are actually on your system with
those that would be installed in a fresh install, and assist you in
merging the changes into your system.
There are no assumptions made about
what is actually on your system, so you can use sysmerge(8) to move
between more arbitrary <a href="faq5.html#Flavors">points in the
development process</a>, such as from an earlier <i>5.2-current</i> to
<i>5.3-release</i> or from one <i>-current</i> to a later one.
Sysmerge(8) compares the current files on your system with the files
that would have been installed with a new install, and what would have
been there from the last run of sysmerge.
Usually, it can figure out what to do to update your files, but if it
has difficulty, it will give you the option of keeping the old file,
installing the new file, or assisting you in the manual merging of the
old and new files, using
<a href="https://man.openbsd.org/sdiff.1">sdiff</a>.

<p>
Please read the
<a href="https://man.openbsd.org/sysmerge.8">sysmerge(8)</a>
manual page before using it on your system.
You are also advised to read the
<a href="https://man.openbsd.org/diff.1">diff(1)</a>,
<a href="https://man.openbsd.org/sdiff.1">sdiff(1)</a>
and even review
<a href="https://man.openbsd.org/more.1">more(1)</a>
manual pages before continuing.
A wide terminal window (i.e., significantly more than 80 characters), if
available, will make sdiff(1) easier to use.

<p>
Assuming the <code>etc53.tgz</code> and <code>xetc53.tgz</code> files exists in
your ${RELEASEPATH}, run it with:

<blockquote><pre>
<b>sysmerge -s ${RELEASEPATH}/etc53.tgz -x ${RELEASEPATH}/xetc53.tgz</b>
</pre></blockquote>

For the files sysmerge(8) can't resolve on its own, it will show you a
unified
<a href="https://man.openbsd.org/diff.1">diff(1)</a>,
run through your favorite $PAGER (i.e.,
<a href="https://man.openbsd.org/more.1">more(1)</a>)
and ask you if you wish to:
<blockquote><pre>
  Use 'd' to delete the temporary ./var/www/htdocs/index.html
  Use 'i' to install the temporary ./var/www/htdocs/index.html
  Use 'm' to merge the temporary and installed versions
  Use 'v' to view the diff results again

  Default is to leave the temporary file to deal with by hand
</pre></blockquote>

<p>
If you wish to retain your existing file, delete the temporary file, if
you wish to replace your existing file with the new version, install the
temporary file.
If you wish to merge the two together, choosing 'm' will put you into
<a href="https://man.openbsd.org/sdiff.1">sdiff(1)</a>,
where you can manually merge the file.
The default is to come back and deal with the file later, manually.

<p>
Sysmerge(8) saves all your replaced files into a temporary directory,
similar to <code>/var/tmp/sysmerge.24959/backups</code>, so if you accidentally
clobber something that was probably not such a good idea, you have a chance
to recover it. Note that
<a href="https://man.openbsd.org/daily.8">daily(8)</a>
cleans old files from this directory, but it will survive a reboot.

<!-- p>
<b>Sysmerge notes for 5.2 -> 5.3:</b><br>
<ul>
<li><b><code>/etc/sysctl.conf</code>:</b>
The changes to <code>sysctl.conf</code> are all commented out items, so not
installing the changed file will not directly change your system's
behavior.
Blindly installing the new default over your old, customized file
will often cause significant annoyance.
However, the new file shows the defaults and common options that are
available, so you may wish to manually merge the changes into your file,
or install the new file and put your changes back into the new file.

</ul -->
</blockquote>

<h3 id="RmFiles">2. Files to delete</h3>
A number of files should be deleted from your system.
Note that some of these may not exist on all systems; that's ok.
Copy and paste the following lines:
<blockquote><pre>
<b>rm /usr/bin/pmdb /usr/share/man/man1/pmdb.1
rm -rf /usr/X11R6/lib/X11/config
rm -f /usr/X11R6/bin/{ccmakedep,cleanlinks,imake,makeg,mergelib,mkdirhier,mkhtmlindex,revpath,xmkmf}
rm -f /usr/X11R6/man/man1/{ccmakedep,cleanlinks,imake,makeg,mergelib,mkdirhier,mkhtmlindex,revpath,xmkmf}.1
rm -r /usr/lib/gcc-lib/*-unknown-openbsd5.2</b>
</pre></blockquote>

<h3 id="Kernchk">3. Checking the kernel</h3>
Note: <b>most people can skip this step!</b>
<p>
If you followed the instructions for the upgrade process without install
kernel, you have already completed this step.
However, if you used the install kernel, and if you had a modified kernel
in 5.2, it is likely you will need to modify the stock kernel of 5.3.
This can be as simple as modifying a specific device using config(8),
or it can involve a recompilation if the option you need is not included
in the GENERIC kernel.
Please consult <a href="faq5.html">FAQ 5 - Building the system from source</a>
before considering to recompile your kernel.

<p>
<h3 id="Pkgup">4. Upgrading packages</h3>
If you installed any packages on your system, you should upgrade them
after completing the upgrade of the base system.
Be aware, however, many packages will require further setup before
and/or after upgrading the package.
Check with the application's upgrade guide for details.

<p>
The following packages are known to have significant upgrade issues that
will impact a large number of users.
The fact that a package is not on this list doesn't mean it will have a
trivial upgrade.
You must do some homework on the applications YOU use.

<ul>
<li><b>PostgresSQL:</b>
Major update to 9.2.1. A dump/restore is required.

<p>
<li><b>Squid:</b>
Major update to 3.2.7. Configuration changes may be required.
This is not available on arm, hppa, mips64, mips64el and sparc;
Squid 2.7 packages are also available for these cases but won't
be updated automatically; users of those architectures should
remove the old Squid package and reinstall (pkg_delete/pkg_add).

</ul>

<p>
The package tools support in-place updating using <code>pkg_add -u</code>.
For instance, to update all your packages, make sure <code>PKG_PATH</code> is
pointing to the 5.3 packages directory on your CD or nearest FTP mirror,
and use something like

<blockquote><pre>
<b>pkg_add -u</b>
</pre></blockquote>

where the <code>-u</code> indicates update mode;
pkg_add will prompt you for input when it encounters
some ambiguity. Read the
<a href="https://man.openbsd.org/OpenBSD-5.3/pkg_add">pkg_add(1)</a>
manual page and the <a href="faq15.html">package management</a>
chapter of the FAQ for more information.

<p>
<a href="index.html">[FAQ Index]</a> |
<a href="upgrade52.html">[5.1 -> 5.2]</a> |
<a href="upgrade54.html">[5.3 -> 5.4]</a>

<hr>
<small>$OpenBSD: upgrade53.html,v 1.26 2019/05/28 01:53:11 bentley Exp $</small>