DEV Community

nabbisen
nabbisen

Posted on • Updated on • Originally published at obsd.solutions

OpenBSD Upgrade 6.8 To 6.9

Summary

Next OpenBSD release, 6.9, has been published on 1 May 2021✨

[What's New] (https://www.openbsd.org/69.html#new)

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

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

In this upgrade, PostgreSQL's major version is updated from 12 (12.6) to 13 (13.2), which requires migration with pg_dumpall or pg_upgrade.


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

$ # validate available disk size of /usr is greater than 1.1GB
$ df -h
Enter fullscreen mode Exit fullscreen mode

2. Upgrade

$ doas sysupgrade
Enter fullscreen mode Exit fullscreen mode

Then, it printed like this:

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.
Enter fullscreen mode Exit fullscreen mode

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

$ doas sysmerge
Enter fullscreen mode Exit fullscreen mode

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.

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:

$ # doas syspatch
Enter fullscreen mode Exit fullscreen mode

3-3. Update packages

$ doas pkg_add -u
Enter fullscreen mode Exit fullscreen mode

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

$ doas reboot
$ # Almost done!
Enter fullscreen mode Exit fullscreen mode

4. Follow configuration changes

Check the documentation if you use some of:

5. Remove old files

$ 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
Enter fullscreen mode Exit fullscreen mode

The description is here.

6. Special packages

Check the documentaion 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:

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

...

  #ssl = off
+ ssl = on
Enter fullscreen mode Exit fullscreen mode

Reference to PostgreSQL and TLS connection:


With gratitude to the OpenBSD project and community.

Top comments (0)