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

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

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

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

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

<title>OpenBSD Upgrade Guide: 3.6 to 3.7</title>
<meta charset=utf-8>
<meta name="description"   content="OpenBSD Upgrade Process for 3.6 to 3.7">
<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/upgrade37.html">

<h2 id=OpenBSD>
<a href="../index.html">
<i>Open</i><b>BSD</b></a>
Upgrade Guide: 3.6 to 3.7
</h2>
<hr>
<p>
<a href="index.html">[FAQ Index]</a> |
<a href="upgrade36.html">[3.5 -> 3.6]</a> |
<a href="upgrade38.html">[3.7 -> 3.8]</a>

<p>

<i>Note: Upgrades are only supported from one release to the release
immediately following it.
Do not skip releases.</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 would probably
be better off reinstalling from scratch.

<h2>Before upgrading...</h2>
Before upgrading, some users choose to remove all
<a href="faq15.html">packages</a>, and installing new versions
after upgrade.
<b>If your platform is one of those that switched to gcc3 (macppc,
i386), you SHOULD probably do this.</b>


<p>
To quickly remove all packages from your system:
<blockquote><pre>
pkg_delete -q /var/db/pkg/*
</pre></blockquote>
After the upgrade, install the new versions of these applications.

<p>

Note that, with OpenBSD 3.7, the pkg tools now support in-place updating
using <code>pkg_add -r</code>.  This has been checked to work with most
packages, in particular with the CD packages available in 3.5 or 3.6.
Some important points apply:
<ul>
<li><code>pkg_add -r</code>   does not do global updates, but needs to
be told which packages to update.  Noting down the installed packages name
with pkg_info, matching each package name to its newer equivalent, and
running one <code>pkg_add -r -q list_of_new_pkgs</code> should work in
most cases.
<li>Every instance of mozilla is an exception.  All mozilla, bloatzilla,
firefox packages   MUST be updated using the old procedure: run pkg_delete
first, then run pkg_add with the new package.
</ul>

<p>
<b>i386 and macppc users:</b>
Due to the switch to gcc3, you must remove the <code>/usr/include/g++</code>
directory before upgrading, regardless whether you plan to use the install
media or not:

<blockquote><pre>
rm -rf /usr/include/g++
</pre></blockquote>

<h2>Upgrading by install media</h2>
The easiest and safest way to upgrade from binary files is to boot from
install media and follow the upgrade steps, which are very similar to
the <a href="faq4.html">install process</a>.
Afterwards, do the <a href="#etcUpdates"><code>/etc</code> updates</a> below.

<h2>Upgrading without install media</h2>
<i>This is not the recommended process.  Use the install media 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.
One can usually do this by carefully following a process similar to a
source-based upgrade:

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

<li><b>Install new kernel(s)</b>
<blockquote><pre>
cd /<i>path</i>
rm /obsd ; ln /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd
cp bsd.rd bsd.mp /
</pre></blockquote>

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.

<li><b>Install new <code>/etc/firmware</code> files:</b>
Due to the fact that some uploaded "firmware" blobs were relocated from
the kernel to files in the <code>/etc/firmware</code> directory, there are
a few drivers which will break if there is no uploadable firmware file
available when the new kernel boots.
This will impact users of only a few devices, though all
users can use this step without harm.
To extract the firmware files from <code>base37.tgz</code>, use the
following as root:

<blockquote><pre>
cd /
tar xzpf /<i>path</i>/base37.tgz "*etc/firmware/*"
</pre></blockquote>

before the next step.

<li><b>Reboot on the new kernel:</b>
This might be a tempting step to skip, but it should be done now, as
usually, the new kernel will run old userland apps (such as the soon to
be important <code>reboot</code>!), but often a new userland will NOT
work on the old kernel.

<li><b>Stop any applications which might cause problems in the following
steps.</b>

<li><b>Install new userland applications</b>
<blockquote><pre>
cd /
tar xzpf /<i>path</i>/base37.tgz
tar xzpf /<i>path</i>/comp37.tgz
tar xzpf /<i>path</i>/game37.tgz
tar xzpf /<i>path</i>/man37.tgz
tar xzpf /<i>path</i>/misc37.tgz
tar xzpf /<i>path</i>/xbase37.tgz
tar xzpf /<i>path</i>/xfont37.tgz
tar xzpf /<i>path</i>/xserv37.tgz
tar xzpf /<i>path</i>/xshare37.tgz
</pre></blockquote>
Note: 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.
Also note that the files in <code>/etc</code> are handled separately below, so
<code>etc37.tgz</code> and <code>xetc37.tgz</code> are NOT unpacked here.

<li><b>Update <code>/dev</code>.</b>
The new
<a href="https://man.openbsd.org/OpenBSD-3.8/i386/MAKEDEV">MAKEDEV</a>
file will be copied to /dev by the installation of
<code>base37.tgz</code>, so you simply need to do the following:
<blockquote><pre>
cd /dev
./MAKEDEV all
</pre></blockquote>

<li><b>Upgrade <code>/etc</code> as below</b>.

<li><b>Reboot</b>
</ul>

During this process,
<a href="https://man.openbsd.org/sendmail.8">sendmail(8)</a>
may produce some error messages like the following:
<pre>
    Nov 1 12:47:05 puffy sm-mta[16733]: filesys_update failed: No such file or directory, fs=., avail=-1, blocksize=380204
</pre>
These messages can be safely ignored, or you may wish to halt
sendmail(8) during the upgrade process.

<hr>
<p>
<h2 id="etcUpdates">Updates to <code>/etc</code></h2>

Whether you upgrade by using an install media and doing a formal
"upgrade" process, or do a "in-place" binary upgrade, there are certain
manual steps that have to be performed.

<h4 id="users">New users and groups</h4>
The FTP daemon has been reworked to drop privileges, and an OSPF daemon
has been added, so new users and groups are required.

As <i>root</i>, add the following users and groups, using
<a href="https://man.openbsd.org/useradd.8">useradd(8)</a>:

<blockquote><pre>
useradd -u84 -g=uid -c"FTP Daemon" -d/var/empty -s/sbin/nologin _ftp
useradd -u85 -g=uid -c"OSPF Daemon" -d/var/empty -s/sbin/nologin _ospfd
</pre></blockquote>

These steps will add both the new users and their corresponding groups.
Your environment may allow you to copy/paste those commands.


<h4 id="apps">Userland Applications</h4>

<p>
<b>X.org replaces XFree86:</b>
Due the XFree86 project's change of license, OpenBSD has switched to the
<a href="https://www.x.org">X.org project's</a> X Window System.
The X11 configuration files must be updated, however.
Many users can simply unpack <code>xetc37.tgz</code> without concern:

<blockquote><pre>
cd /
tar xzpf /<i>path</i>/xetc37.tgz
</pre></blockquote>

If you have made important manual changes to the files in <code>/etc/X11</code>
for any reason, you should NOT unpack the <code>xetc37.tgz</code> file as above,
but rather manually merge your changes into the new files.

<p>
If you have an <code>/etc/X11/XF86Config</code> file that works on OpenBSD
3.6, renaming it to <code>/etc/X11/xorg.conf</code> will probably give you a
fully functioning X Window system on OpenBSD 3.7.
You may also find that the newer versions of X are much more
"self-configuring" than earlier versions, and you may not need an
<code>/etc/X11/xorg.conf</code> file at all now, depending on your hardware.


<p>
<b>bgpd(8) behavior change:</b>
The new <i>rde route-age [evaluate|ignore]</i> changed behavior of bgpd.
Until now <i>evaluate</i> was the implicit default but now the default
is <i>ignore</i>.
Route age evaluation is not specified in RFC 1771 and results in non
deterministic decisions in preference for more stable links.

<p>
<b>pfsync takes syncdev instead of syncif:</b>
When configuring the
<a href="https://man.openbsd.org/pfsync.4">pfsync</a>
device, use 'syncdev' instead of the deprecated keyword 'syncif'.

<p>
<b>OpenNTPD now sets the time immediately at startup:</b>
As of OpenBSD 3.7, OpenNTPD is able to make large time corrections, so
it is no longer necessary to run rdate(8) to set the time before starting
ntpd(8).
You may wish to disable rdate(8) in your rc.conf.local (or rc.conf) file
if you had opted to do this.

<h4 id="etcfiles"><code>/etc</code> file changes</h4>
You will want to extract the <code>etc37.tgz</code> files to a temporary
location:
<blockquote><pre>
cd /tmp
tar xzpf /<i>path</i>/etc37.tgz
</pre></blockquote>


Files that can probably be copied from <code>etc37.tgz</code> "as is":

<blockquote><pre>
changelist
daily
fbtab
moduli
netstart
ospfd.conf
rc
security
services
mtree/*
</pre></blockquote>

Note that it IS possible to locally modify these files, if this has been
done, manual merging will be needed.
Here are copy/paste lines for copying these files, assuming you unpacked
<code>etc37.tgz</code> in the above recommended place:

<blockquote><pre>
cd /tmp/etc
cp changelist daily fbtab moduli netstart ospfd.conf rc security services /etc
cp mtree/* /etc/mtree/
</pre></blockquote>

<p>
Files that must be manually merged, respecting any local
changes made to them, if they were modified from the default,
otherwise, just copy them over, too:

<blockquote><pre>
ftpusers
rc.conf
spamd.conf
sysctl.conf
mail/aliases
skel/.cshrc
skel/.profile
</pre></blockquote>

Finally, use
<a href="https://man.openbsd.org/mtree.8">mtree(8)</a>
to create any new directories:
<blockquote><pre>
mtree -qdef /etc/mtree/4.4BSD.dist -p / -u
</pre></blockquote>

<p>
<a href="index.html">[FAQ Index]</a> |
<a href="upgrade36.html">[3.5 -> 3.6]</a> |
<a href="upgrade38.html">[3.7 -> 3.8]</a>

<p>
<small>$OpenBSD: upgrade37.html,v 1.31 2019/05/28 01:53:11 bentley Exp $</small>