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

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

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

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

<p>
The upgrade process may overwrite some X configuration files, you may
wish to backup your <code>/etc/X11</code> directory before upgrading.

<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 that 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 /
</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>/base35.tgz
tar xzpf /<i>path</i>/comp35.tgz
tar xzpf /<i>path</i>/game35.tgz
tar xzpf /<i>path</i>/man35.tgz
tar xzpf /<i>path</i>/misc35.tgz
tar xzpf /<i>path</i>/xbase35.tgz
tar xzpf /<i>path</i>/xfont35.tgz
tar xzpf /<i>path</i>/xserv35.tgz
tar xzpf /<i>path</i>/xshare35.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>etc35.tgz</code> is NOT unpacked here, as it is handled
separately.

<li><b>Update <code>/dev</code>.</b>
The new
<a href="https://man.openbsd.org/OpenBSD-3.5/i386/MAKEDEV">MAKEDEV</a>
file will be copied to /dev by the installation of
<code>base35.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 -u74 -g=uid -c"pflogd privsep" -d/var/empty -s/sbin/nologin _pflogd
useradd -u75 -g=uid -c"BGP Daemon" -d/var/empty -s/sbin/nologin _bgpd
useradd -u76 -g=uid -c"tcpdump" -d/var/empty -s/sbin/nologin _tcpdump
</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="etcfiles"><code>/etc</code> file changes</h4>
You will want to extract the <code>etc35.tgz</code> files to a temporary
location:
<blockquote><pre>
cd /tmp
tar xzpf /<i>path</i>/etc35.tgz
</pre></blockquote>


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

<blockquote><pre>
bgpd.conf
changelist
locate.rc
moduli
netstart
pf.os
protocols
rc
security
sensorsd.conf
services
var/named/standard/root.hint
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>etc35.tgz</code> in the above recommended place:

<blockquote><pre>
cd /tmp/etc
cp bgpd.conf changelist locate.rc moduli netstart pf.os \
 protocols rc security sensorsd.conf services /etc
cp mtree/* /etc/mtree/
cp ../var/named/standard/root.hint /var/named/standard
</pre></blockquote>

<p>
Files that must be manually merged, respecting any local
changes made to them:
<blockquote><pre>
ftpusers
inetd.conf
login.conf
lynx.cfg
newsyslog.conf
rc.conf
rc.local
remote
sysctl.conf
ttys
mail/*
</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>

After the final reboot, you should have a fully functional 3.5 system.
At this point, you can <a href="upgrade36.html">upgrade to 3.6</a> if
desired.

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

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