OpenBSD 6.9

Page content

OpenBSD 6.9 released

This is the 50th Release of OpenBSD ! As they release twice a Year, must be around 25y ago since the fork of NetBSD started. Wikipedia has got a Comparison of the Different BSD Operating Systems

release 6.9

Upgrade to 6.9

i upgrade my systems twice every years. there is no need to reinstall as the upgrade works fine over year. please read the official upgrade guide carefully and then you may wanna use this script below. use it on your own risk and test it somewhere before you do this on your productive environment.

Upgrade History

an example of one of my boxes

Wed Mar 28 07:44:12 2018  ---  OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018  ---
Sat Aug 11 19:25:09 2018  ---  OpenBSD 6.4-beta (GENERIC.MP) #198: Sat Aug 11 00:40:38 MDT 2018  ---
Fri Apr 26 14:18:42 2019  ---  OpenBSD 6.5 (GENERIC.MP) #3: Sat Apr 13 14:48:43 MDT 2019  ---
Thu Oct 17 17:24:43 2019  ---  OpenBSD 6.6 (GENERIC.MP) #372: Sat Oct 12 10:56:27 MDT 2019  ---
Mon May  4 22:45:20 2020  ---  OpenBSD 6.7 (GENERIC.MP) #175: Mon May  4 10:48:13 MDT 2020  ---
Sun Oct 18 22:53:51 2020  ---  OpenBSD 6.8 (GENERIC.MP) #98: Sun Oct  4 18:13:26 MDT 2020  ---
Fri Apr 30 19:43:40 2021  ---  OpenBSD 6.9 (GENERIC.MP) #473: Mon Apr 19 10:40:28 MDT 2021  ---  

Upgrade Script

as mentioned, use it on your own risk and test it somewhere before you do this on your productive environment.

cat << 'EOF' > /root/upgrade_to_69.sh
#!/usr/bin/env bash
#
# OpenBSD Upgrade Script - Upgrade from 6.8 to 6.9
#
# Copyright (c) 2021 StockerSolutions / @stoege
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# Functions
h1() {
cat << EOS

############################################################
##
## $1
##
############################################################

EOS
}

h2() {
cat << EOS

########################################
# $1
########################################

EOS
}

prepare () {

  h1 "let's upgrade to 6.9 ..."

  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

}

download() {

  local _response=$(sysupgrade -n)

  if [[ $_response == *reboot ]]; then
    h1 "\nInstalled! Let's reboot ...\n"
    rm /home/_sysupgrade/{xf,xs}*
  else
    h1 "Nothing todo ..."
  fi

}

install() {
  reboot
}

postwork() {

  h1 "let's do some postwork after upgrade to 6.9 ..."

  h2 "make dev"
  cd /dev
  ./MAKEDEV all

  h2 "install boot"
  _boot=$(mount |awk -F'[/ ]' '/ on \/ / {print $3}')
  installboot ${_boot%?}

  h2 "sysmerge"
  sysmerge

  h2 "fw_update"
  fw_update -v

  h2 "syspatch"
  syspatch

  h2 "pkg_add -Vu"
  pkg_add -Vu

  h2 "pkg_delete -a"
  pkg_delete -a

  h2 "updatedb &"
  /usr/libexec/locate.updatedb &

}

# Main
_ver=$(uname -r)

if [ "$_ver" == "6.8" ]; then

  prepare
  download
  install

elif [ "$_ver" == "6.9" ]; then

  postwork

else

  h2 "this Upgrade Script may not for you ..."
  exit 1

fi

exit 0
EOF

Usage Update Script

# Get Scripts
Copy/Paste the Script to your Server

# Set Permission
chmod 700 upgrade_to_69.sh

# Run to Upgrade
./upgrade_to_69.sh

# reboot automatically

# Run for Cleanup
./upgrade_to_69.sh

# Check dmesg, fail services, log, ...

Enjoy !

sha256: bac39bc813774785cc337e45a3ae70fcba13c130b052c03a5640dc4b0d5265d6