トップ 履歴 一覧 カテゴリ ソース 検索 ヘルプ RSS ログイン

OpenBSD/Upgrade/69-armv7

INDEX

OpenBSD のアップグレード (6.8 to 6.9 ARMv7 on BBB 版)

BeagleBone Black に入れた OpenBSD 6.8 (Released Oct 18, 2020) から 6.9 (Released May 1, 2021) にアップグレードした際のメモ書き。

お決まりなのだけど、重要なサーバや物理サーバでリモート接続している場合は、最初に同一のローカルシステムで試すことを推奨。まっ、そんな環境ないので、必要なファイルをバックアップした上で、えぃやぁかな。アップグレードでなきゃ、インストールし直しするつもりなので。

OpenBSD 6.6 からは、sysupgrade(8) でアップグレードができる。このアップグレードは一つ次のリリースへのみがサポートされる。諸注意や詳細は、 OpenBSD Upgrade Guide: 6.8 to 6.9 を参照。

sysupgrade(8) を使用した 無人アップグレード 以外に、各アーキテクチャ用のRAMディスクカーネル bsd.rd を取得して、このカーネルが起動したら (U)pgrade を選択して、プロンプトの指示に従って行う インタラクティブ アップグレード 、完全に手動でファイルを更新する マニュアル アップグレード がある。

アップグレード

 アップグレードする前に

ダウンロードミラーサイトの設定

/etc/installurl に記載されたURLのサーバから取得される。インストール時に ftp や http を使用していれば、その時の設定が記載されている。

bbb# cat /etc/installurl
https://ftp.jaist.ac.jp/pub/OpenBSD

ディスク空き容量

sysupgrade(8) がダウンロードしたファイルを置く /home/_sysupgrade および、インストール先となる /usr の空き容量を確認する。足りないと失敗する。

/usr には、1.1G 必要とのこと。/home/_sysupgrade は、インストールセットの 300MB かな…。

bbb# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd1a     13.4G    6.2G    6.5G    49%    /

横着して、1パーティションで構成してた…

 アップグレード

bbb# uname -a
OpenBSD bbb.intranet 6.8 GENERIC#337 armv7

sysupgrade コマンド自体は、SSH上でも可能。ただし、アップグレードが完了して立ち上がるまではつなげないので、様子を確認できない。

bbb# sysupgrade
Fetching from https://ftp.jaist.ac.jp/pub/OpenBSD/6.9/armv7/
SHA256.sig   100% |*************************************|  1875       00:00    
Signature Verified
INSTALL.armv7 100% |************************************| 36453       00:00    
base69.tgz   100% |*************************************|   123 MB    01:10    
bsd          100% |*************************************|  6631 KB    00:02    
bsd.rd       100% |*************************************| 12808 KB    00:05    
comp69.tgz   100% |*************************************| 42059 KB    00:28    
game69.tgz   100% |*************************************|  2688 KB    00:02    
man69.tgz    100% |*************************************|  7561 KB    00:05    
xbase69.tgz  100% |*************************************| 22918 KB    00:15    
xfont69.tgz  100% |*************************************| 39352 KB    00:23    
xserv69.tgz  100% |*************************************|  7448 KB    00:03    
xshare69.tgz 100% |*************************************|  4504 KB    00:01    
Verifying sets.
Fetching updated firmware.
Upgrading.

ここで再起動される。↑はSSH、↓はCOMコンソール

 :≪前略≫
OpenBSD/armv7 (bbb.intranet) (console)

login:
syncing disks... done
rebooting...

U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC2
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **
 :≪中略≫
## Starting EFI application at 82000000 ...
disks: sd0* sd1
>> OpenBSD/armv7 BOOTARM 1.15
upgrade detected: switching to /bsd.upgrade
boot>
 :≪中略≫
pmap Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2021 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.9 (RAMDISK) #341: Tue Apr 20 04:59:54 MDT 2021
    deraadt@armv7.openbsd.org:/usr/src/sys/arch/armv7/compile/RAMDISK
 :≪中略≫
bootfile: sd0a:/bsd.upgrade
boot device: sd0
root on rd0a swap on rd0b dump on rd0b
WARNING: CHECK AND RESET THE DATE!
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/armv7 6.9 installation program.
Performing non-interactive upgrade...
Terminal type? [vt220] vt220
Available disks are: sd1.
Which disk is the root disk? ('?' for details) [sd1] sd1
Checking root filesystem (fsck -fp /dev/sd1a)... OK.
Mounting root filesystem (mount -o ro /dev/sd1a /mnt)... OK.
Force checking of clean non-root filesystems? [no] no
/dev/sd1a (4cd804583c526979.a) on /mnt type ffs (rw, local, noatime, wxallowed)

Let's upgrade the sets!
Location of sets? (disk http nfs or 'done') [http] disk
Is the disk partition already mounted? [yes] yes
Pathname to the sets? (or 'done') [6.9/armv7] /home/_sysupgrade/

Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'.
    [X] bsd           [X] comp69.tgz    [X] xbase69.tgz   [X] xserv69.tgz
    [X] bsd.rd        [X] man69.tgz     [X] xshare69.tgz
    [X] base69.tgz    [X] game69.tgz    [X] xfont69.tgz
Set name(s)? (or 'abort' or 'done') [done] done
Directory does not contain SHA256.sig. Continue without verification? [no] yes
Installing bsd          100% |**************************|  6631 KB    00:04
Installing bsd.rd       100% |**************************| 12808 KB    00:07
Installing base69.tgz   100% |**************************|   123 MB    03:39
Installing comp69.tgz   100% |**************************| 42059 KB    02:38
Installing man69.tgz    100% |**************************|  7561 KB    00:55
Installing game69.tgz   100% |**************************|  2688 KB    00:05
Installing xbase69.tgz  100% |**************************| 22918 KB    00:48
Installing xshare69.tgz 100% |**************************|  4504 KB    00:35
Installing xfont69.tgz  100% |**************************| 39352 KB    01:30
Installing xserv69.tgz  100% |**************************|  7448 KB    00:10
Location of sets? (disk http nfs or 'done') [done] done
Making all device nodes... done.
Relinking to create unique kernel... done.

CONGRATULATIONS! Your OpenBSD upgrade has been successfully completed!

syncing disks... done
rebooting...

U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC2
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **
 :≪中略≫
## Starting EFI application at 82000000 ...
disks: sd0* sd1
>> OpenBSD/armv7 BOOTARM 1.17
boot>
 :≪中略≫
pmap [ using 905912 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2021 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.9 (GENERIC) #386: Tue Apr 20 04:06:48 MDT 2021
    deraadt@armv7.openbsd.org:/usr/src/sys/arch/armv7/compile/GENERIC
 :≪中略≫
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (4cd804583c526979.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
Automatic boot in progress: starting file system checks.
/dev/sd0a (4cd804583c526979.a): file system is clean; not checking
pf enabled
net.inet.esp.enable: 1 -> 0
net.inet.ah.enable: 1 -> 0
starting network
reordering libraries: done.
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
running rc.sysmerge
===> Updating /etc/login.conf
===> Updating /etc/ssl/cert.pem
===> Installing /etc/X11/twm/system.twmrc
===> Installing /etc/X11/xenodm/GiveConsole
===> Installing /etc/X11/xenodm/TakeConsole
===> Installing /etc/X11/xenodm/Xreset
===> Installing /etc/X11/xenodm/Xresources
===> Installing /etc/X11/xenodm/Xservers
===> Installing /etc/X11/xenodm/Xsession
===> Installing /etc/X11/xenodm/Xsetup_0
===> Installing /etc/X11/xenodm/Xstartup
===> Installing /etc/X11/xenodm/xenodm-config
===> Installing /etc/X11/xinit/xinitrc
===> Installing /etc/X11/xsm/system.xsm
===> Linking /etc/fonts/conf.d/10-scale-bitmap-fonts.conf
===> Linking /etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf
===> Linking /etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf
===> Linking /etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf
===> Linking /etc/fonts/conf.d/20-unhint-small-vera.conf
===> Linking /etc/fonts/conf.d/30-lucida-aliases.conf
===> Linking /etc/fonts/conf.d/30-metric-aliases.conf
===> Linking /etc/fonts/conf.d/30-urw-aliases.conf
===> Linking /etc/fonts/conf.d/31-nonmst.conf
===> Linking /etc/fonts/conf.d/40-nonlatin.conf
===> Linking /etc/fonts/conf.d/42-luxi-mono.conf
===> Linking /etc/fonts/conf.d/45-latin.conf
===> Linking /etc/fonts/conf.d/49-sansserif.conf
===> Linking /etc/fonts/conf.d/50-user.conf
===> Linking /etc/fonts/conf.d/51-local.conf
===> Linking /etc/fonts/conf.d/60-latin.conf
===> Linking /etc/fonts/conf.d/65-fonts-persian.conf
===> Linking /etc/fonts/conf.d/65-nonlatin.conf
===> Linking /etc/fonts/conf.d/69-unifont.conf
===> Linking /etc/fonts/conf.d/80-delicious.conf
===> Linking /etc/fonts/conf.d/90-synthetic.conf
===> Updating /var/unbound/etc/unbound.conf
starting network daemons: sshd smtpd httpd sndiod.
running rc.firsttime
Path to firmware: http://firmware.openbsd.org/firmware/6.9/
No devices found which need firmware files to be downloaded.
starting SoftEther VPN Server
The SoftEther VPN Server service has been started.
starting local daemons: cron.
Mon Sep 20 22:39:53 JST 2021

OpenBSD/armv7 (bbb.intranet) (console)

login:

CPUの性能とかにもよるだろうけど、完了するまで15分から20分くらい。

アップデートの中で、 sysmerge(8)fw_update(1) が実行される模様。

 アップグレード後

bbb# uname -a
OpenBSD bbb.intranet 6.9 GENERIC#386 armv7

設定ファイルの更新

アップデートの中で実行されるので、基本は不要。

bbb# sysmerge

ファームウェアの更新

アップデートの中で実行されるので、基本は不要(下記コマンドは確認のみ)。

bbb# fw_update -v -n
Path to firmware: http://firmware.openbsd.org/firmware/6.9/
No devices found which need firmware files to be downloaded.

バイナリパッチのアップデート

リリース直後であればほどんとない。

bbb# syspatch -c
syspatch: Error retrieving https://ftp.jaist.ac.jp/pub/OpenBSD/syspatch/6.9/armv7/SHA256.sig: 404 Not Found

メモ

比較的簡単にできる。特に何もなければ、コマンドを実行して2,30分で完了する。

1点、問題は、ディスプレイをつなげるつもりがないので、インストール時には X を入れてない。ただ、sysupgrade を行うとすべてのインストールセットが入ってしまう模様。インストールセットの選択ってどうやるんだろう…

/usr/sbin/sysupgrade のスクリプトを直して、セットリストから不要なものを削除する。sysupgrade -n で再起動しないように止めて、/home/_sysupgrade にダウンロードされたファイルから不要なものを削除する。または、/auto_upgrade.conf の Set name(s) を修正する。

あたりかな…

最終更新時間:2021年11月23日 12時16分52秒 指摘や意見などあればSandBoxのBBSへ。