freebsd-update - 14.2 RELEASE → 14.3 RELEASE - 仮想環境で実験


 クラウディア


1. 概要
2. ports の更新
3. パッチをあてる
4. GENERIC boot を用意しておく
5. バージョンアップ
6. 再起動後

1. 概要

 例によって「VirtualBox」上に、「FreeBSD 14.2 RELEASE」のマシンがあります。  これを「FreeBSD 14.3 RELEASE」にアップデートするところからやってみます。  アップデート前のマシンは、いくつかのサーバアプリケーションをインストールしたものです。

2. ports の更新

 アップデートの発生している「ports」があれば、すべて更新しておきます。  今回注意しておかなければならないのは。 perl5 perl5-5.40 ruby ruby-3.3 python python311-3.11  以上へ、アップグレードしておかないと。  「FreeBSD 14.3 RELEASE」へのアップグレードや、その後の運用に差し支えますので、前もって、アップグレードしておきます。  途中、トラブルがあれば、「FreeBSD - メンテナンス・トラブルシュート - pkg・ports」や、その他のページをご参照ください。

3. パッチをあてる

 仮想マシンの現在の状況を見てみます。

$ uname -a
FreeBSD ns.vm.sing.ne.jp 14.2-RELEASE FreeBSD 14.2-RELEASE MYKERNEL amd64
 パッチがあたっていないので、パッチをあてるところから・・・。  以下、「root」ユーザ権限で。

freebsd-update fetch
 メッセージは長々と出力されるので割愛します。

Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update2.freebsd.org... done.
Fetching metadata signature for 14.2-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 318 patches.....10....20....30....40....50....60....70....80....90....100....110....120....130....140....150....160....170....180....190....200....210....220....230....240....250....260....270....280....290....300....310.... done.
Applying patches... done.
Fetching 19 files... ....10.... done.
The following files will be removed as part of updating to
14.2-RELEASE-p3:
/etc/ssl/certs/08063a00.0
/etc/ssl/certs/18856ac4.0

・・・	略	・・・

/usr/share/certs/untrusted/E-Tugra_Certification_Authority.pem
/usr/share/certs/untrusted/GeoTrust_Global_CA.pem
/usr/share/certs/untrusted/GlobalSign_Root_CA_-_R2.pem
/usr/share/certs/untrusted/Hongkong_Post_Root_CA_1.pem
/usr/share/certs/untrusted/QuoVadis_Root_CA.pem
/usr/share/certs/untrusted/Security_Communication_Root_CA.pem
:
 Spaceq で進めていきます。  プロンプトが返ってきたら。アップデート。

freebsd-update install
 下記のメッセージが、表示されます。

Creating snapshot of existing boot environment... done.
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 1804.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning /usr/share/certs/untrusted for certificates...
Scanning /usr/share/certs/trusted for certificates...
Scanning /usr/local/share/certs for certificates...
 done.
 再起動。

shutdown -r now
 再起動後に、更新を確認。

$ uname -a
FreeBSD ns.vm.sing.ne.jp 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
 「FreeBSD 14.2-RELEASE」から「FreeBSD 14.2-RELEASE-p1」へ変わっています。

4. GENERIC boot を用意しておく

 今回、マイナバージョンのアップグレードなので、「kernel」ファイルは必要ないかと思います。  もし必要になったら、以下の手順で用意します。  「.iso」ファイルをダウンロードして、それをマウントするのが手っ取り早い。  カーネルさえあればいいので、「DVD」メディアでなく、「CD」メディアで十分。  ダウンロード。

mkdir -pv /tmp/disk
cd /tmp/disk
curl https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/14.2/FreeBSD-14.2-RELEASE-amd64-disc1.iso --output FreeBSD-14.2-RELEASE-amd64-disc1.iso

5. バージョンアップ

 バージョンアップ。  「root」ユーザ権限で。

freebsd-update -r 14.3-RELEASE upgrade

Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 14.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic kernel/generic-dbg src/src world/base world/lib32

The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)?
 yEnter で答えます。  以降、メッセージはなるべく省略して、入力が必要な個所のみ記述します。  結局、今回は、入力箇所はこれだけでした。  途中、ページ送りで、中断する箇所は、Spaceq で進めていきます。  最後は、下記を出力して、プロンプトが返ってきます。

To install the downloaded upgrades, run 'freebsd-update [options] install'.
 アップグレード。

freebsd-update install

Creating snapshot of existing boot environment... done.
Installing updates...
Kernel updates have been installed.  Please reboot and run
'freebsd-update [options] install' again to finish installing updates.
 ちゅうことで、再起動。

shutdown -r now

6. 再起動後

 再起動後にログインしたときのログイン時のメッセージが

FreeBSD 14.3-RELEASE (GENERIC) releng/14.3-n271432-8c9ce319fef7
 となっております。  「root」ユーザ権限で。

freebsd-update install
 この下のメッセージの途中は、時間がかかります。

Creating snapshot of existing boot environment... done.
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 1798.
Performing sanity check on sshd configuration.
Starting sshd.
 done.
 「ports」の更新を確認します。

git -C /usr/ports pull
portsdb -Fu
portversion -v | grep '<'
 今回は、更新は、発生していませんでした。

earthcar(アースカー)
Amazonギフトカード
5G CONNECT