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

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

Revision 1.22, Tue May 28 01:53:11 2019 UTC (5 years ago) by bentley
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +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.9 to 6.0</title>
<meta charset=utf-8>
<meta name="description"   content="OpenBSD Upgrade Process for 5.9 -> 6.0">
<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/upgrade60.html">
<style>
  ul { list-style: none; }
</style>

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

<blockquote><i>
Upgrades are only supported from one release to the release immediately
following it.
Read through and understand this process before attempting it.
For critical or physically remote machines, test it on an identical,
local system first.
</i></blockquote>

Boot from the install kernel, <a href="faq4.html#bsd.rd">bsd.rd</a>:
use <a href="faq4.html#MkInsMedia">bootable install media</a>, or place the 6.0
version of <code>bsd.rd</code> in the root of your filesystem and instruct the boot
loader to boot this kernel.
Once this kernel is booted, choose the <code>(U)pgrade</code> option and follow the
prompts.
Finish up by upgrading the packages: <code><b>pkg_add -u</b></code>.

<p>
Alternatively, you can use the <a href="#NoInstKern">manual upgrade process</a>.

<p>
You may wish to check the <a href="../errata60.html">errata page</a> or upgrade
to the <a href="../stable.html">stable branch</a> to get any post-release fixes.

<hr>

<h3 id="BeforeUpdate">Before rebooting into the install kernel</h3>

<ul>
  <li><b>clean out <code>/usr/share/man</code>.</b>
  Formerly, hard links were used to provide the same man page under several
  different names.
  These hard links are no longer needed and may get in the way.
  Issue <code><b>rm -rf /usr/share/man</b></code>.

  <p>
  <li><b><a href="https://man.openbsd.org/OpenBSD-6.0/softraid">softraid(4)</a>
  metadata version changed.</b>
  The current softraid metadata version has been incremented as part of
  implementing support for sector sizes other than 512 bytes. Since on-disk
  metadata is automatically updated every time a softraid volume is mounted,
  once you mount a softraid volume on a new kernel (including <code>bsd.rd</code>)
  that volume will no longer be recognized by older kernels.

  <p>
  <li><b><a href="https://man.openbsd.org/OpenBSD-6.0/iwm">iwm(4)</a> needs new
  firmware.</b>
  The iwm(4) wifi driver needs firmware with a newer major version.
  If you plan to use that device to carry out an upgrade, run
  <a href="https://man.openbsd.org/OpenBSD-6.0/fw_update">fw_update(1)</a>.
</ul>

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

<ul>
  <li><b>The <code>wxallowed</code> mount option.</b>
  <code>W^X</code> is now strictly enforced by default; a program can only violate
  it if it is located on a filesystem mounted with the <code>wxallowed</code>
  <a href="https://man.openbsd.org/OpenBSD-6.0/mount.8">mount(8)</a> option.
  This allows the base system to be more secure as long as <code>/usr/local</code>
  is a separate filesystem.

  <p>
  The base system has no <code>W^X</code>-violating programs, but the ports tree
  contains quite a few: chromium, mono, node, gnome, libreoffice, jdk, zeal,
  etc.
  If you want to run any of these ports on a regular basis, you need to add
  <code>wxallowed</code> to the mount options for <code>/usr/local</code> in
  <a href="https://man.openbsd.org/OpenBSD-6.0/fstab">fstab(5)</a>, e.g.:

  <blockquote><pre>
  01020304050607.h /usr/local ffs rw,nodev,<b>wxallowed</b> 1 2<!--
  --></pre></blockquote>

  Small disks may not have a separate partition for <code>/usr/local</code>.
  In that case, add <code>wxallowed</code> to the smallest partition containing it:
  <code>/usr</code> or <code>/</code>.

  <p>
  Starting a <code>W^X</code>-violating program from a partition without the
  <code>wxallowed</code> mount option will produce a core dump and the
  <a href="https://man.openbsd.org/OpenBSD-6.0/dmesg">dmesg(8)</a> will contain
  an entry such as <code>soffice.bin(15529): mprotect W^X violation</code>.
  You can temporarily allow <code>W^X</code>-violating ports by issuing
  <code><b>mount -uo wxallowed /usr/local</b></code>.

  <p>
  <li><b><a href="https://man.openbsd.org/OpenBSD-6.0/doas.conf">
  doas.conf(5)</a>.</b>
  The <code>keepenv { [variable ...] }</code> syntax will be deprecated in 6.1.
  Replace <code>keepenv { [variable ...] }</code> with
  <code>setenv { [variable ...] }</code> if doas prints the warning
  "keepenv with list is obsolete".

  <p>
  <li><b>rcctl(8) syntax change.</b>
  The keyword for listing enabled but stopped daemons with
  <a href="https://man.openbsd.org/OpenBSD-6.0/rcctl">rcctl(8)</a>
  has changed from <code>faulty</code> to <code>failed</code>.

  <p>
  <li><b>lpd(8) default spool directory change.</b>
  The
  <a href="https://man.openbsd.org/OpenBSD-6.0/lpd">lpd(8)</a>
  top spool directory <code>/var/spool/output</code> is now only writable by root.
  <br>
  Point the <code>sd</code> path in
  <a href="https://man.openbsd.org/OpenBSD-6.0/printcap">printcap(5)</a>
  to a subdirectory where the <code>daemon</code> group has write access.
  It defaults to <code>/var/spool/output/lpd</code>.
</ul>

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

<ul>
  <li><b>PostgreSQL</b>
  PostgreSQL had a major version update.
  Follow instructions in the pkg-readme to dump your database <b>before</b>
  upgrading to a newer OS version and restore it after the update.

  <p>
  <li><b>OpenSMTPD-extras</b>
  Most filters were removed from the OpenSMTPD-extras distribution, as they are
  not considered ready.
  People who started using filters like <code>filter-dkim-signer</code> already
  need to look for other alternatives in ports, e.g.  <code>mail/dkimproxy</code>.

  <p>
  <li><b>runit</b>
  Upstream moved the default service directory to <code>/service</code>; to
  keep on using <code>/var/service</code>, make a symlink:
  <code><b>ln -s /var/service /</b></code>
</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/OpenBSD-6.0/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/OpenBSD-6.0/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-6.0/i386/installboot">
    installboot(8)</a>, assuming <code>sd0</code> is your boot disk:
    <blockquote><pre>
    <b>installboot 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>
  <li><b>Clean out <code>/usr/share/man</code>.</b>
    Formerly, hard links were used to provide the same man page under several
    different names.
    These hard links are no longer needed and may get in the way.
    Issue
    <blockquote><pre>
    <b>rm -rf /usr/share/man</b><!--
    --></pre></blockquote>

  <li><b>Install new userland.</b>
    Save a copy of reboot(8), extract and install the release tarballs, reboot.
    Install <code>base60.tgz</code> last, because the new base system, in particular
    <a href="https://man.openbsd.org/OpenBSD-6.0/tar">tar(1)</a>,
    <a href="https://man.openbsd.org/OpenBSD-6.0/gzip">gzip(1)</a> and
    <a href="https://man.openbsd.org/OpenBSD-6.0/reboot">reboot(8)</a>,
    will not work with the old kernel.
    Either untar the needed filesets manually
    <blockquote><pre>
    <b>cp /sbin/reboot /sbin/oreboot</b>
    <b>tar -C / -xzphf xshare60.tgz</b>
    <b>tar -C / -xzphf xserv60.tgz</b>
    <b>tar -C / -xzphf xfont60.tgz</b>
    <b>tar -C / -xzphf xbase60.tgz</b>
    <b>tar -C / -xzphf man60.tgz</b>
    <b>tar -C / -xzphf game60.tgz</b>
    <b>tar -C / -xzphf comp60.tgz</b>
    <b>tar -C / -xzphf base60.tgz</b>    # Install last!
    <b>/sbin/oreboot</b><!--
    --></pre></blockquote>
    or, if you use ksh(1), you can do
    <blockquote><pre>
    <b>cp /sbin/reboot /sbin/oreboot</b>
    <b>for _f in [!b]*60.tgz base60.tgz; do tar -C / -xzphf "$_f" || break; done</b>
    <b>/sbin/oreboot</b><!--
    --></pre></blockquote>
    Note that tar(1) can expand only one archive per invocation, so a simple
    glob won't work.

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

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

  <li><b>Update system configuration files.</b>
    Run <a href="https://man.openbsd.org/OpenBSD-6.0/sysmerge">sysmerge(8)</a>:
    <blockquote><pre>
    <b>sysmerge</b><!--
    --></pre></blockquote>

  <li><b>Update firmware.</b>
    There may be new firmware for your system.
    Update it with
    <a href="https://man.openbsd.org/OpenBSD-6.0/fw_update">fw_update(1)</a>:
    <blockquote><pre>
    <b>fw_update</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.
    Remove <code><b>/sbin/oreboot</b></code> and update packages:
    <code><b>pkg_add -u</b></code>.
</ul>

<p>
<a href="index.html">[FAQ Index]</a> |
<a href="upgrade59.html">[5.8 -> 5.9]</a>
<a href="upgrade61.html">[6.0 -> 6.1]</a>

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