OpenBSD Upgrade 6.8 to 6.9

Table of contents

Summary Summary

Next OpenBSD (opens in a new tab) release, 6.9 (opens in a new tab), has been published on 1 May 2021✨

openbsd release

The 6.9 Song is “Vetera Novis”, which means “old new” in Latin.

Almost all what to do is thankfully managed by sysupgrade (opens in a new tab) (which appeared in 6.6) and its automatic process.

In this upgrade, PostgreSQL (opens in a new tab)’s major version is updated from 12 (12.6) to 13 (13.2), which requires migration with pg_dumpall (opens in a new tab) or pg_upgrade (opens in a new tab).


Tutorial Tutorial

Here is a step-by-step guide for the upgrade with a set of the commands to run.

  1. Pre-upgrade
  2. Upgrade
  3. Post-upgrade
  4. Follow configuration changes
  5. Remove old files
  6. Special packages
🌼 🦔 🌼

1. Pre-upgrade 1. Pre-upgrade

Validate available disk size of /usr is greater than 1.1GB:

console
$ df -h

2. Upgrade 2. Upgrade

console
$ doas sysupgrade

Then, it printed like this:

console
Fetching from https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/
SHA256.sig   100% |**************************************************|  2144       00:00    
Signature Verified
INSTALL.amd64 100% |*************************************************| 43523       00:00    
base69.tgz   100% |**************************************************|   291 MB    00:11    
bsd          100% |**************************************************| 20423 KB    00:02    
bsd.mp       100% |**************************************************| 20515 KB    00:02    
bsd.rd       100% |**************************************************|  4107 KB    00:00    
comp69.tgz   100% |**************************************************| 85958 KB    00:05    
game69.tgz   100% |**************************************************|  2741 KB    00:00    
man69.tgz    100% |**************************************************|  7560 KB    00:01    
xbase69.tgz  100% |**************************************************| 29789 KB    00:02    
xfont69.tgz  100% |**************************************************| 39342 KB    00:03    
xserv69.tgz  100% |**************************************************| 18351 KB    00:02    
xshare69.tgz 100% |**************************************************|  4502 KB    00:00    
Verifying sets.
Fetching updated firmware.
Upgrading.

It rebooted the machine automatically, and the sysupgrade process continued. After all, the login message was shown, saying “OpenBSD 6.9 (GENERIC)”.

3. Post-upgrade 3. Post-upgrade

3-1. sysmerge 3-1. sysmerge

console
$ doas sysmerge

rc.sysmerge ran automatically in the previous process. But running this command may be necessary. It sometimes requires merging conf files such as:

  • /etc/fstab
  • /etc/mail/smtpd.conf
  • /etc/pf.conf
  • /etc/login.conf

In each merging, these options (and more) are shown:

  • i: to overwrite with new file.
  • d: to preserve current file.
  • m: to merge these two files manually.

In my case, merging /etc/login.conf was necessary in a server which used Dovecot (opens in a new tab).

3-2. syspatch 3-2. syspatch

sysupgrade also ran this command and printed was “syspatch: Error retrieving https://cdn.openbsd.org/pub/OpenBSD/syspatch/6.9/amd64/SHA256.sig: 404 Not Found”. As of it, it might not be necessary:

console
$ # doas syspatch

3-3. Update packages 3-3. Update packages

console
$ doas pkg_add -u

What to do after pkg_add -u is due to servers. For example, in one of my servers, running doas crontab -u _mailman /usr/local/lib/mailman/cron/crontab.in was required to update /var/cron/tabs/_mailman.

If postgresql-server is used, confirmation to proceed is shown. Enter “n” to update it later following the official tutorial in /usr/local/share/doc/pkg-readmes/postgresql-server.

3-4. Reboot 3-4. Reboot

console
$ doas reboot
$ # Almost done!

4. Follow configuration changes 4. Follow configuration changes

Check the documentation (opens in a new tab) if you use some of:

5. Remove old files 5. Remove old files

console
$ doas rm -f /usr/bin/podselect \
          /usr/lib/libperl.so.20.0 \
          /usr/libdata/perl5/*/CORE/dquote_inline.h \
          /usr/libdata/perl5/*/Tie \
          /usr/libdata/perl5/*/auto/Tie \
          /usr/libdata/perl5/Pod/Find.pm \
          /usr/libdata/perl5/Pod/InputObjects.pm \
          /usr/libdata/perl5/Pod/ParseUtils.pm \
          /usr/libdata/perl5/Pod/Parser.pm \
          /usr/libdata/perl5/Pod/PlainText.pm \
          /usr/libdata/perl5/Pod/Select.pm \
          /usr/libdata/perl5/pod/perlce.pod \
          /usr/libdata/perl5/unicore/Heavy.pl \
          /usr/libdata/perl5/unicore/lib/Lb/EB.pl \
          /usr/libdata/perl5/unicore/lib/Perl/_PerlNon.pl \
          /usr/libdata/perl5/unicore/lib/Sc/Armn.pl \
          /usr/libdata/perl5/utf8_heavy.pl \
          /usr/share/man/man1/podselect.1 \
          /usr/share/man/man3p/Pod::Find.3p \
          /usr/share/man/man3p/Pod::InputObjects.3p \
          /usr/share/man/man3p/Pod::ParseUtils.3p \
          /usr/share/man/man3p/Pod::Parser.3p \
          /usr/share/man/man3p/Pod::PlainText.3p \
          /usr/share/man/man3p/Pod::Select.3p

The description is here (opens in a new tab).

6. Special packages 6. Special packages

Check the documentaion (opens in a new tab) if you use some of:

  • databases/postgresql
  • games/multimc
  • security/yubiserve
  • www/rt

In my case, I had to modify /var/postgresql/data/postgresql.conf to enable TLS connection:

diff
  #listen_addresses = 'localhost' ...
+ listen_addresses = '*'

...

  #ssl = off
+ ssl = on

Here is a related post about PostgreSQL and TLS connection I made.


With gratitude to the OpenBSD project and community.

More on: Upgrade and maintain OpenBSD

OBSD Solutions

OBSD Solutions: OpenBSD consulting and support by Scqr, Reflerd Inc. (opens in a new tab)

Comments and feedback are welcome.