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

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

Revision 1.28, Tue May 28 01:53:11 2019 UTC (5 years ago) by bentley
Branch: MAIN
CVS Tags: HEAD
Changes since 1.27: +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.5 to 3.6</title>
<meta charset=utf-8>
<meta name="description"   content="OpenBSD Upgrade Process for 3.5 to 3.6">
<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/upgrade36.html">

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

<p>

<i>Note: Upgrades are only supported from release to release, it
is recommended that you NOT skip releases.</i>

<h2>Before upgrading...</h2>
Before upgrading, some users choose to remove all
<a href="faq8.html#Packages">packages</a>, and installing
new versions after upgrade.

<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.

<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.

<p>
<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>Reboot on the new kernel</b><br>
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>/base36.tgz
tar xzpf /<i>path</i>/comp36.tgz
tar xzpf /<i>path</i>/game36.tgz
tar xzpf /<i>path</i>/man36.tgz
tar xzpf /<i>path</i>/misc36.tgz
tar xzpf /<i>path</i>/xbase36.tgz
tar xzpf /<i>path</i>/xfont36.tgz
tar xzpf /<i>path</i>/xserv36.tgz
tar xzpf /<i>path</i>/xshare36.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 sets now.
Also note that <code>etc36.tgz</code> and <code>xetc36.tgz</code> are NOT
unpacked here, as they are handled separately.

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

<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>
A number of daemons have been reworked to drop privilege or use
privilege separation, thus 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 -u77 -g=uid -c"DHCP programs" -d/var/empty -s/sbin/nologin _dhcp
useradd -u78 -g=uid -c"MOP Daemon" -d/var/empty -s/sbin/nologin _mopd
useradd -u79 -g=uid -c"TFTP Daemon" -d/var/empty -s/sbin/nologin _tftpd
useradd -u80 -g=uid -c"rbootd Daemon" -d/var/empty -s/sbin/nologin _rbootd
useradd -u81 -g=uid -c"afs Daemon" -d/var/empty -s/sbin/nologin _afs
useradd -u82 -g=uid -c"PPP utilities" -d/var/empty -s/sbin/nologin _ppp
useradd -u83 -g=uid -c"NTP Daemon" -d/var/empty -s/sbin/nologin _ntp
</pre></blockquote>

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

<h4 id="devices">Devices</h4>
Due to the new handling of
<a href="https://man.openbsd.org/pty.4">pty(4)</a>
there will be some old devices that should be deleted:
<blockquote><pre>
cd /dev && rm -f [pt]ty[rq]*
</pre></blockquote>
or on the VAX platform:
<blockquote><pre>
cd /dev && rm -f [pt]tyr*
</pre></blockquote>

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

The
<a href="https://man.openbsd.org/cksum.1">cksum(1)</a>
utility has moved from <code>/usr/bin</code> to <code>/bin</code>.
<blockquote><pre>
rm -f /usr/bin/cksum /usr/bin/sum
</pre></blockquote>

<p>Users of
<a href="https://man.openbsd.org/authpf">authpf(8)</a>
must change their anchor rule in the main ruleset from
<blockquote><pre>
anchor authpf
</pre></blockquote>
to
<blockquote><pre>
anchor "authpf/*"
</pre></blockquote>

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


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

<blockquote><pre>
changelist
magic
netstart
ntpd.conf
pf.os
protocols
rc
rc.securelevel
services
mtree/*
systrace/*
</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>etc36.tgz</code> in the above recommended place:

<blockquote><pre>
cd /tmp/etc
cp changelist magic netstart ntpd.conf pf.os protocols rc rc.securelevel services /etc
cp mtree/* /etc/mtree/
cp systrace/* /etc/systrace/
</pre></blockquote>

<p>
Files that must be manually merged, respecting any local
changes made to them:
<blockquote><pre>
bgpd.conf
ftpusers
inetd.conf
login.conf
lynx.cfg
rc.conf
rc.local
remote
sysctl.conf
ttys
</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="upgrade35.html">[3.4 -> 3.5]</a> |
<a href="upgrade37.html">[3.6 -> 3.7]</a>

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