bullseyeから更新でアップグレードしてみた。
Back
Alt+HOME
Bookwormになってから二度アップデートに失敗している。その度に新規インストールで事無きを得ているのだが、三度目の正直。
このDVMEGAによるアクセスポイントは Raspberry Pi3 A+ に DVMEGA をGPIO接続して、ircDDBGateway と DStarRepeaterで D-STAR Reflectorに接続するようにしたものです。又、USBにてNextionモニター(D*SWITCH)をドライブしています。
やってみる場合は最下行の結果を先にご覧ください。
アップデート手順
- 先ずは、bullseye の完全アップデートを実施します。
$ sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y; sudo reboot
- 次に、アップデートするための sources.list を新しいOS名に書き換えます。
$ sudo nano /etc/apt/sources.list
GNU nano 5.4 /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
bullseyeの所を bookworm に書き換えて保存します。
- (1.)で行ったアップデートを同様に繰り返します。但し今回はアップデートを見に行くリポジトリーが Bookworm となります。
なお、このアップデートファイルは1000程有り、Raspberryの性能によっては数時間かかります。
さらに、途中で既存の環境ファイルの変更をするか問い合わせが数回あります。
- 再起動して、立ち上がったら通常どおりリフレクターに接続するか確認します。
ここで、私の場合は接続できませんでした。
実際の挙動を見て、調整する
- 無線機からのコマンドは受信して、インターネット側に送り出しているようでしたので ircDDBGateway のログを見る事にしました。
$ nano /var/log/ircDDBGatewayy-2024-01-23.log
GNU nano 7.2 /var/log/ircDDBGateway-2024-01-23.log
M: 2024-01-23 06:47:19: D-Plus: REF080
M: 2024-01-23 06:47:19: D-Plus: REF085
M: 2024-01-23 06:47:19: D-Plus: REF086
M: 2024-01-23 06:47:19: D-Plus: REF087 202.125.85.134
M: 2024-01-23 06:47:20: Registered with auth.dstargateway.org using callsign JL3ZBS P
M: 2024-01-23 09:41:14: Starting ircDDB Gateway daemon - 20200621 - DEBUG
M: 2024-01-23 09:41:14: Connected 'MSG' to JL3ZBS using file - /root/message.dvtool
M: 2024-01-23 09:41:14: Connected 'WX' to JL3ZBS using file - /root/weather.dvtool
M: 2024-01-23 09:41:14: Version text set to "ircDDB GW - 20200621"
M: 2024-01-23 09:41:14: Adding JL3ZBS P to the cache as a local repeater
M: 2024-01-23 09:41:14: Reading /root/CCS_Hosts.txt
M: 2024-01-23 09:41:14: Downloading XLX reflector list from http://xlxapi.rlx.lu/api.php?do=GetXLXDMRMaster
E: 2024-01-23 09:41:14: Unable do download XLX host file, make sure wget is installed
M: 2024-01-23 09:41:14: Truncating /var/log/Links.log
M: 2024-01-23 09:41:14: Truncating /var/log/STARnet.log
M: 2024-01-23 09:41:14: Allocated UDP ports 30001-30007 to DExtra
M: 2024-01-23 09:41:14: Allocated UDP ports 20001-20007 to D-Plus
M: 2024-01-23 09:41:14: Allocated UDP ports 30051-30057 to DCS
M: 2024-01-23 09:41:14: Starting the ircDDB Gateway thread
M: 2024-01-23 09:41:14: Loaded 0 of 0 XLX reflectors from
E: 2024-01-23 09:41:14: Cannot find address for host ref001.dstargateway.org
E: 2024-01-23 09:41:14: Cannot find address for host ref002.dstargateway.org
E: 2024-01-23 09:41:14: Cannot find address for host ref003.dstargateway.org
E: 2024-01-23 09:41:14: Cannot find address for host ref004.dstargateway.org
E: 2024-01-23 09:41:14: Cannot find address for host ref005.dstargateway.org
6時台(最初の4行)で REFリフレクターのアドレスを解決しているのに、スレッドが立ち上がった後のログではFQDNを名前解決出来ていません。
- そこで、取り敢えず /usr/share/ircddbgateway/DPlus-Hosts.txt の内容を名前解決不要にすることにしました。
https://www.pistar.uk/downloads/DPlus_Hosts.txt
をクリックしてリストを表示、下図の様にコピー&ペーストします。
$ sudo nano /usr/share/ircddbgateway/DPlus_Hosts.txt
GNU nano 7.2 /usr/share/ircddbgateway/DPlus_Hosts.txt
# Prepared at ar-dns.net - Sun, 19 May 2019 12:38:29 GMT
REF001 ref001.dstargateway.org
REF002 ref002.dstargateway.org
REF003 ref003.dstargateway.org
REF004 ref004.dstargateway.org 本来はこれでREFリフレクターは繋がるはず
REF005 ref005.dstargateway.org (ネットワークの問題をチェック要)
REF006 ref006.dstargateway.org
REF007 ref007.dstargateway.org
:
:
# EOF - Sun, 19 May 2019 12:38:29 GMT
↓↓↓ 書き換えます。
# DPlus_Hosts.txt downloaded from http://www.pistar.uk/downloads/DPlus_Hosts.txt
# DPlus Hosts resolved from dstargateway.org DNS, with additional hosts
# sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname
# Please report issues at https://www.facebook.com/groups/pistarusergroup/
# File updated on Tuesday 23rd of January 2024
REF000 24.172.229.156
REF001 104.237.157.7
REF002 50.116.24.60
REF003 203.194.18.195 接続できることを確認
REF004 44.103.34.20
REF005 192.3.202.53
REF006 81.2.72.40
REF007 81.2.72.55
:
:
もう一つの XLX_Hosts についても wget コマンドは入っているし、ネットワークの問題と言っても、その他の事は出来ているし・・・。
まっ、取り敢えず必要なところは繋がったのでボチボチやろうと思います。
OS構成上の違いを把握
- ネットワーク構成上の問題
今までのシステムでは、私の場合 systemd-networkd.service と systemd-resolved.service を使用していました。
systemd-networkd については、そのまま使用できるのですが、nameserverを自動的に設定する(ネットワークの構成が変わった時)resolved はバンドルされていません。
(bookworm 標準の NetworkManager を使う限り何の問題も有りません。)
resolvd.conf を手書きして、固定的に使うことも可能ですが、テザリングで使ったりホームルータで使ったりするので、自動的に変更される必要が有ります。
そこで、resolved をインストールすることにしました。
$ sudo apt install systemd-resolved
これで テキストモードでWi-Fi接続を安定にする(Buster)のとおりに設定できました。
- bookworm移行後のアップデートの問題
アップデートを実行すると次のような警告が表示されます。
W: http://raspbian.raspberrypi.org/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
これはアップデートの時必要な暗号化キーの保存場所が以前と変更になった為表示されています。
$ cd /etc/apt
$ ls
trusted.gpg trusted.gpg.d/
$ sudo mv trusted.gpg trusted.gpg.d/
このように、trusted.gpg.d ディレクトリーの中に移動します。
これからアップデートと言う時点では、移動ではなくコピーで両フォルダに有る方が事故が無いと思います。
ここまでの改修で不具合を試してみる
- ircDDBGatewayの不具合はネットワーク不備によるダウンロード不足では?
$ cd ircDDBGateway
$ git pull
remote: Enumerating objects: 43, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 43 (delta 31), reused 43 (delta 31), pack-reused 0
Unpacking objects: 100% (43/43), 20.29 KiB | 89.00 KiB/s, done.
From https://github.com/g4klx/ircDDBGateway
a13ccff..5a489bf master -> origin/master
* [new branch] mqtt -> origin/mqtt
Updating a13ccff..5a489bf
Fast-forward
Common/APRSWriter.cpp | 4 ++++
1 file changed, 4 insertions(+)
ircDDBGatewayフォルダの中で、差分をダウンロード(git pull)してみると確かに追加されました。後はもう一度コンパイルをやり直しです。
参照 最新版 ircDDBGateway と DStarRepeater のインストール (Pi OS)
- 調整2の名前解決の不具合は、元のFQDNファイルに戻しても問題なく接続できる --> nameserverの問題と考えられる
- ここで、新たな不具合を確認。時計がずれているのを発見しました。
bullseyeまでは擬似的なクロックが動いており、問題なかったと認識していたのですが、NTPを新規に構成する必要が有るようです。
いくつかその方法を探ってみたのですが、慣れなくて手間だったので、Raspberry草創期に同様の事が有り、その時の方法を取り入れることにしました。
$ sudo apt install chrony
$ sudo nano /etc/chrony/chrony.conf
GNU nano 7.2 /etc/chrony/chrony.conf
# Welcome to the chrony configuration file. See chrony.conf(5) for more
# information about usable directives.
# Include configuration files found in /etc/chrony/conf.d.
confdir /etc/chrony/conf.d
# Use Debian vendor zone.
#pool 2.debian.pool.ntp.org iburst
pool ntp.nict.jp iburst
:
: 最終行に追加 (このRasPiを同ネットワーク内のNTPサーバにする場合のみ)
:
# アクセスを許可するクライアントのIP又はサブネット
#allow 10.0.0.0/16
# NTPサーバーとして使用しない場合
port 0
# NTPサーバーとして使用する場合(default: UDP 123 変更可)
#port 123
ポートを指定した場合、ファイアウォールが設定されていれば、穴開けを忘れないようにする。
最新のchronyはIPv6でサーバーにアクセスしようとします。IPv6は Enable にしてください。
又はchronyの起動オプションで IPv4 に限定するため、環境変数 DAEMON_OPTS="-4" を .bashrc 等で指定してください。
$ chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- ntp-b3.nict.go.jp 1 6 17 64 +479us[ +479us] +/- 8645us
^- ntp-k1.nict.jp 1 6 17 64 +3668us[+3668us] +/- 9772us
^* ntp-b2.nict.go.jp 1 6 17 64 -17us[ -618us] +/- 8956us
^+ ntp-a2.nict.go.jp 1 6 17 64 +793us[ +793us] +/- 8691us
結果として
色々やった結果、新規インストールすべしでした。 ・・と思って新規にやり直したのですが・・・
但し、次の点がクリアできているならば、コンパイルも含めた新規インストールよりは早いかも知れません。
- sources.listを書き換えた時点で、bullseyeでは /etc/apt に保存されている
trusted.gpg をもう一つ下の trusted.d ディレクトリーにコピーしておく。
- dhcpcd や systemd-networkd を使用していた場合、NetworkManager に変更しておく。
- D*SWITCHの機能の内 dmonitor は使用せず、MODE=REF でircDDBGateway+DStarRepeater のみ使用する。
(dmonitor v02.00の表示に関して D*SWITCH が動作異常を起こす原因が掴めていないため)
- なお、新規インストールをし終わって問題なく動くようになってから、そのタイミングに合わせユニットファイルのタイマー設定を調整し直したところ、
アップデートでも同様に問題なく稼働することが分かりました。
GNU nano 7.2 /etc/systemd/system/ircddbgateway.timer
[Unit]
Description=ircDDBGateway Start delay timer (20210217)
[Timer]
OnBootSec=40sec
[Install]
WantedBy=timers.target
GNU nano 7.2 /etc/systemd/system/nextion.timer
[Unit]
Description=ircDDBGateway Start delay timer (20210217)
[Timer]
OnBootSec=50sec
[Install]
WantedBy=timers.target
この例は、Pi 3クラス(Raspberry Pi 3B+ と Pi 3A+にてテスト)でのデータです。
Back
Alt+HOME
この 作品 は
クリエイティブ・コモンズ 表示 - 非営利 - 改変禁止 4.0 国際 ライセンス
の下に提供されています。
English
Powered by