Help us understand the problem. What is going on with this article?

FreeBSD 11.2 を FreeBSD 12.0 に更新

FreeBSD12がリリースされました!
https://www.freebsd.org/releases/12.0R/announce.html

というわけでFreeBSD11.2からFreeBSD12.0にfreebsd-updateを使って更新してみます

$ sudo freebsd-update upgrade -r 12.0-RELEASE
$ sudo freebsd-update install
$ sudo reboot
$ sudo freebsd-update install
$ sudo pkg upgrade -y
$ sudo freebsd-update install
$ uname -a
FreeBSD  12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC  amd64

これでFreeBSD12.0に更新できました
各コマンドの説明も適当に書いておきます

[2019年1月9日 追記]
https://www.facebook.com/groups/freebsd.labo.japan/permalink/2493192240752658/
上記の作業だけだとntpdが動かないことがあるのでpwd_mkdbとchown実行すればntpdが動きます

# pwd_mkdb /etc/master.passwd
# chown ntpd:ntpd /var/db/ntp/{ntpd.drift,ntpd.pid}

最初の freebsd-update upgrade -r 12.0-RELEASE

ファイルのダウンロードや現在の設定との差分を修正します。
色々質問されるので答えながら進めます。ダウンロード行われるので時間がかかります。

$ sudo freebsd-update upgrade -r 12.0-RELEASE
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 11.2-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base
以下省略

次に1回目のfreebsd-update install

カーネルのインストールをします

$ sudo freebsd-update install
src component not installed, skipped
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

再起動してもう1回freebsd-update installを実行してねと言われます

再起動後のfreebsd-update install

再起動後は12.0のカーネルで起動した状態になっています
次のfreebsd-update installでユーザランドのインストールをします

# freebsd-update install
src component not installed, skipped
Installing updates...
Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run "/usr/sbin/freebsd-update install"
again to finish installing updates.

次は古いsoファイルを削除するためにports(pkg)などでインストールしたソフトのリビルドをしてねと言われます

pkg upgrade -y

今回の環境ではpkgでインストールしたソフトしかないのでpkg upgradeでまとめて更新できます
場合によってはpkgコマンドが動作しなくなる時もあるので
静的リンクされたpkg-staticを使ってpkgを再インストールします(今回は大丈夫だった)

# pkg upgrade
pkg: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    6 MiB 591.9kB/s    00:11
Processing entries: 100%
FreeBSD repository update completed. 31799 packages processed.
All repositories are up to date.
Updating database digests format: 100%
Checking for upgrades (102 candidates): 100%
Processing candidates (102 candidates): 100%
The following 102 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
    pkg-1.10.5_5 (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')
    webp-1.0.1 (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')
    vim-console-8.1.0555 (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')
以下省略

これで安心?して古いsoファイルを削除できます

freebsd-update install

soファイルを削除します

# freebsd-update install
src component not installed, skipped
Installing updates...rmdir: ///var/db/etcupdate/current/usr/share/openssl/man/en.ISO8859-1: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/openssl/man: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/openssl: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/man/en.UTF-8: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/man/en.ISO8859-1: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/man: Directory not empty
 done.

これで更新作業は終わりです

更新用ファイルの削除

/var/db/freebsd-update/files の容量が数百MBになるので
容量を気にする人は削除してしまいます

# rm -rf /var/db/freebsd-update/files
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away