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

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

Revision 1.36, Mon Aug 31 07:06:03 2020 UTC (3 years, 8 months ago) by bentley
Branch: MAIN
CVS Tags: HEAD
Changes since 1.35: +2 -2 lines

We don't sell CDs anymore.

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

<title>OpenBSD Upgrade Guide: 5.8 to 5.9</title>
<meta charset=utf-8>
<meta name="description"   content="OpenBSD Upgrade Process for 5.8 -> 5.9">
<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/upgrade59.html">
<style>
  ul { list-style: none; }
</style>

<h2 id=OpenBSD>
<a href="../index.html">
<i>Open</i><b>BSD</b></a>
Upgrade Guide: 5.8 to 5.9
</h2>
<hr>
<p>
<a href="index.html">[FAQ Index]</a> |
<a href="upgrade58.html">[5.7 -> 5.8]</a>
<a href="upgrade60.html">[5.9 -> 6.0]</a>
<p>

<blockquote><i>
Note: Upgrades are only supported from one release to the release immediately
following it. </i>
<p>
<i>
It is highly recommended that you read through and fully understand this process
before attempting it.
Especially for critical or physically remote machines, it is recommended that
you test it on an identical, local system first.
</i></blockquote>

Boot from the install kernel, <a href="faq4.html#bsd.rd">bsd.rd</a>.
This can be done by booting from an
install CD, or other
<a href="faq4.html#MkInsMedia">bootable install media</a>.
Alternatively, you can place the 5.9 version of <code>bsd.rd</code> in the root of
your file system and instruct the boot loader to boot this kernel instead
of your usual kernel -- on amd64 and i386:
<code>boot&gt; <b>boot bsd.rd</b></code>

<p>
Once this kernel is booted, choose the <code>(U)pgrade</code> option and follow the
prompts.
The upgrade process retains all your configuration info.
If you absolutely have to, you can follow the
<a href="#NoInstKern">manual upgrade process</a> instead.

<p>
Final steps:
<ol>
  <li id="sysmerge">
    Run <a href="https://man.openbsd.org/sysmerge">sysmerge(8)</a>
    as root: <code># <b>sysmerge</b></code>
    <p>
    The <a href="https://man.openbsd.org/sysmerge">sysmerge(8)</a>
    utility will compare the files that are currently on your system with
    those that would be installed in a fresh install.
    It will assist you in merging the changes into your system, using
    <a href="https://man.openbsd.org/sdiff">sdiff(1)</a>.
    <p>
    The section on <a href="#ConfigChanges">configuration changes</a> lists
    some important cases that need extra care.
  <li>
    <a href="#RmFiles">Remove some files</a>.
    <p>
  <li id="pkg_add-u">
    Upgrade your packages using
    <a href="https://man.openbsd.org/pkg_add">pkg_add(1)</a>:
    <code># <b>pkg_add -u</b></code>
    <p>
    In many cases, that will be all you need to do.
    Check the <a href="#SpecPkg">section below</a> to see if any of your
    installed packages require workarounds to upgrade.
</ol>

<hr>

<h3 id="ConfigChanges">Configuration changes</h3>

<ul>
  <li><b><a href="https://man.openbsd.org/ntpd.conf">ntpd.conf(5)</a>:</b>
    The <code>rtable</code> option was removed from <code>server</code> and
    <code>servers</code>.
    Users of <code>server * rtable X</code> will need to switch to launching
    ntpd with
    <blockquote><pre>
    # <b>route -T X exec /usr/sbin/ntpd</b>
    </pre></blockquote>

  <li><b><a href="https://man.openbsd.org/pf.conf">pf.conf(5)</a>:</b>
    <code>set debug</code> no longer accepts the <code>none</code>, <code>urgent</code>,
    <code>misc</code> and <code>loud</code> arguments, which were deprecated several
    releases ago.
    Use <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>err</code>,
    <code>warning</code>, <code>notice</code>, <code>info</code> or <code>debug</code> instead.
    Change this before updating, or your pf.conf will not load.

  <p>
  <li><b><a href="https://man.openbsd.org/smtpd.conf">
    smtpd.conf(5)</a>:</b>
    The <code>pki</code> keyword no longer accepts a <code>ca</code> parameter.
    Custom CA certificates must be declared using the new <code>ca</code> keyword:
    <blockquote><pre>
    ca mail.example.org certificate "/etc/mail/CA.pem"
    </pre></blockquote>

  <li><b><a href="https://man.openbsd.org/netstart">netstart(8)</a>:</b>
    Options <code>multicast_host</code> and <code>multicast_router</code> have been
    merged into a single <code>multicast</code> option.
    In order to enable multicast the following line should be added in
    <a href="https://man.openbsd.org/rc.conf.local">rc.conf.local(8)</a>:
    <blockquote><pre>
    multicast=YES
    </pre></blockquote>
    If you previously set these options to something other than <code>YES</code> or
    the interface carrying the default route, you will also need to add a static
    route for <code>224.0.0.0/4</code>.

  <p>
  <li><b><a href="https://man.openbsd.org/tun">tun(4)</a>:</b>
    This was previously a "dual mode" device.
    By default it would act as a layer-3 "routed" device, but by use
    of the <code>link0</code> flag it would change to a layer-2 "ethernet" mode.
    This layer-2 mode has now been has been split off to a separate
    <a href="https://man.openbsd.org/tap">tap(4)</a>
    device.
    <p>
    For some use cases (e.g. ssh tunnel-forwarding run as a non-root user),
    permissions on the device nodes would have been modified; these should
    be applied to the new device nodes as necessary.
    <code>hostname.tun*</code> files using the <code>link0</code> flag should be moved
    to <code>hostname.tap*</code> instead, and the flag should be removed.
    Other configuration may need to be adjusted to use the new device
    name, for example for software like QEMU, OpenVPN or SIMH.
    Networking configuration (bridges, PF) referring to these devices
    may also need to change.
</ul>

<h3 id="RmFiles">Files to delete</h3>

<blockquote><pre>
rm -f /usr/libexec/smtpd/makemap

# People requiring these backends should install the opensmtpd-extras main package.
rm -f /usr/libexec/smtpd/table-ldap
rm -f /usr/libexec/smtpd/table-passwd
rm -f /usr/libexec/smtpd/table-sqlite
rm -f /usr/share/man/man5/table_passwd.5

rm -f /usr/share/misc/termcap.db /usr/share/misc/terminfo.db

rm -f /usr/X11R6/include/intel_*.h
rm -f /usr/X11R6/include/r600_pci_ids.h
rm -f /usr/X11R6/include/radeon_*.h

rm -f /usr/include/malloc.h

rm -f /usr/libexec/auth/login_tis
rm -f /etc/rc.d/yppasswdd /usr/sbin/rpc.yppasswdd

cd /usr/X11R6/include/freetype2
rm -rf config
rm -f freetype.h ftadvanc.h ftbbox.h ftbdf.h ftbitmap.h ftbzip2.h \
          ftcache.h ftcffdrv.h ftchapters.h ftcid.h fterrdef.h \
          fterrors.h ftfntfmt.h ftgasp.h ftglyph.h ftgxval.h ftgzip.h \
          ftimage.h ftincrem.h ftlcdfil.h ftlist.h ftlzw.h ftmac.h \
          ftmm.h ftmodapi.h ftmoderr.h ftotval.h ftoutln.h ftpfr.h \
          ftrender.h ftsizes.h ftsnames.h ftstroke.h ftsynth.h \
          ftsystem.h fttrigon.h fttypes.h ftwinfnt.h t1tables.h \
          ttnameid.h tttables.h tttags.h ttunpat.h
</pre></blockquote>

<h3 id="SpecPkg">Special packages</h3>

<ul>
  <li><b>php-fpm:</b>
    To allow installing multiple versions of php-fpm on the same system,
    the rc script has been renamed to include the version number.
    Modify references to <code>php_fpm</code> in
    <code>/etc/rc.conf.local</code> to e.g. <code>php56_fpm</code>.
  <p><li><b>gophernicus:</b>
    <code>in.gophernicus</code> moved from <code>/usr/local/sbin/</code> to
    <code>/usr/local/libexec</code>.
    Update your <code>/etc/inetd.conf</code> accordingly.
  <p>
  <li><b>puppetboard:</b>
    The default configuration file (<code>default_settings.py</code>) format has
    changed and needs to be merged with <code>default_settings.py.dist</code>
    before restarting the <code>puppetboard</code> service.
  <p>
  <li><b>cfs:</b>
    The security/cfs port has been removed.
    Users are encouraged to use another data encryption method.
    Possible alternatives are:
    softraid(4) crypto, encrypted vnd(4) devices or the security/encfs port.
    Delete the package with <code># <b>pkg_delete cfs</b></code>
  <p>
  <li>
    <b>node modules:</b>
    All modules for lang/node have been removed in favor of directly using npm.
    Native modules need to be built with <code>-std=gnu++0x</code>, so npm
    internally sets <code>CXX=eg++</code> when building native modules.
    To remove any installed modules:
    <blockquote><pre>
    for i in node-always node-async node-bcrypt node-bindings \
            node-buffer-writer node-canvas node-cloned node-daemon \
            node-expresso node-fibers node-generic-pool node-gir \
            node-java node-mnm node-pg node-rmdir node-sqlite3 \
            node-syslog node-typescript coffeescript;
            do
                    pkg_delete $i
            done
    </pre></blockquote>
</ul>

<hr>
<h2 id="NoInstKern">Upgrade without the install kernel</h2>

<b style="color:#e00000">This is NOT the recommended process.
Use the install kernel method if at all possible!</b>

<p>
Sometimes, you need to do an upgrade of a machine for which the normal upgrade
process is not possible.
The most common case is a machine in a remote location and there is no easy
access to the system console.

<h3>Preparation</h3>

<ul>
  <li><b>Place install files in a good location.</b>
    Make sure you have sufficient space!
    Running out of space on a remote upgrade could be...unfortunate.
    Note that using softdeps can exaggerate the situation as deleted and
    overwritten files do not release their space immediately.
    Consider disabling the <code>softdep</code> mount option in <code>/etc/fstab</code>
    and rebooting before undertaking a manual upgrade.
    Having at least 200MB free on <code>/usr</code> would be recommended.

  <p>
  <li><b>Becoming root.</b>
    While using
    <a href="https://man.openbsd.org/doas">doas(1)</a>
    before each command is generally a good practice, the command will likely
    be broken by the last steps, so you should become root before starting
    this process.
    It might be good to verify your access to root using a method other than
    doas at this point, i.e., direct login or using
    <a href="https://man.openbsd.org/su">su(1)</a>.

  <p>
  <li><b>Stop and/or disable 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.
    You may also have issues with DNS resolution during the first reboot, so
    PF rules and NFS mounts dependent upon DNS may cause boot-up problems.
    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>Install new boot blocks.</b>
    This should actually be done at the end of any upgrade.
    If this has been neglected, then failure to do this now may break serial
    console or other things, depending on your platform.
    Use <a href="https://man.openbsd.org/OpenBSD-5.9/i386/installboot">
    installboot(8)</a>,
    assuming <code>sd0</code> is your boot disk:

    <blockquote><pre>
    <b>installboot -v sd0</b>
    </pre></blockquote>
</ul>

<h3>Upgrading manually</h3>

<ul>
  <li><b>Install new kernels.</b>
    The extra steps for copying over the primary kernel are done
    to ensure that there is always a valid kernel on the disk.
    <p>
    If using the multiprocessor kernel:
    <blockquote><pre>
    <b>cd /usr/rel</b>    # where you put the release files
    <b>ln -f /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd</b>
    <b>cp bsd.rd /</b>
    <b>cp bsd /bsd.sp</b>
    </pre></blockquote>
    If using the single processor kernel:
    <blockquote><pre>
    <b>cd /usr/rel</b>    # where you put the release files
    <b>ln -f /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd</b>
    <b>cp bsd.rd bsd.mp /</b>    # may give a harmless warning
    </pre></blockquote>

  <p>
  <li><b>Install new userland.</b>
    Save a copy of reboot(8), extract and install the release tarballs, reboot.
    Install <code>base59.tgz</code> last, because the new base system, in particular
    <a href="https://man.openbsd.org/tar">tar(1)</a> and
    <a href="https://man.openbsd.org/reboot">reboot(8)</a>,
    will not work with the old kernel.

    <blockquote><pre>
    <b>cp /sbin/reboot /sbin/oreboot</b>
    <b>tar -C / -xzphf xserv59.tgz</b>
    <b>tar -C / -xzphf xfont59.tgz</b>
    <b>tar -C / -xzphf xshare59.tgz</b>
    <b>tar -C / -xzphf xbase59.tgz</b>
    <b>tar -C / -xzphf game59.tgz</b>
    <b>tar -C / -xzphf comp59.tgz</b>
    <b>tar -C / -xzphf man59.tgz</b>
    <b>tar -C / -xzphf base59.tgz</b>    # Install last!
    <b>/sbin/oreboot</b>
    </pre></blockquote>

  <p>
  <li><b>After reboot, upgrade <code>/dev</code>.</b>
    Run
    <a href="https://man.openbsd.org/OpenBSD-5.9/i386/MAKEDEV">
    MAKEDEV(8)</a>:
    <blockquote><pre>
    <b>cd /dev</b>
    <b>./MAKEDEV all</b>
    </pre></blockquote>

  <li><b>Upgrade boot loader.</b>
    Still assuming <code>sd0</code> is your boot disk:
    <blockquote><pre>
    <b>installboot -v sd0</b>
    </pre></blockquote>

  <li><b><a href="#sysmerge">Run sysmerge</a>.</b>
    Now is a good time to do
    <blockquote><pre>
    <b>sysmerge</b>
    </pre></blockquote>

  <li><b>Upgrade firmware.</b>
    There may be new firmware for your system.
    Update it with
    <a href="https://man.openbsd.org/fw_update">fw_update(1)</a>:
    <blockquote><pre>
    <b>fw_update -v</b>
    </pre></blockquote>

  <li><b>Finish up.</b>
    Review the console output from boot (using <code><b>dmesg -s</b></code>)
    and correct any failures as necessary.
    Proceed by <a href="#RmFiles">removing some files</a> -- don't forget
    <code>/sbin/oreboot</code> -- and <a href="#pkg_add-u">upgrading packages</a>.
</ul>

<p>
<a href="index.html">[FAQ Index]</a> |
<a href="upgrade58.html">[5.7 -> 5.8]</a>
<a href="upgrade60.html">[5.9 -> 6.0]</a>

<hr>
<small>$OpenBSD: upgrade59.html,v 1.36 2020/08/31 07:06:03 bentley Exp $</small>