仮想マシンの FreeBSD を 10.3-RELEASE から 11.0-RELEASE にした話

たまたま BSDsec を見たら11.0-RELEASE のコピーが FTP に乗ってるけどまだ正式アナウンスじゃないからアップグレードするなよって記事が9月28日に出てたので、我慢できずにアップグレードしちゃいました。
良い子は10月5日頃にあるという正式アナウンスを待ってアップグレードしましょう。

アップグレードした FreeBSDdebian 上で動作する仮想マシンにインストールしたものです。
カーネルは自前でコンパイルしたものではなく、デフォルトでインストールされたものに freebsd-update で更新を続けたものになります。
この FreeBSD は hubot をいくつか実行しているだけの仮想マシンになります。docker でやれって話ですが。

アップグレード前のバージョンを確認

$ freebsd-version 
10.3-RELEASE-p9

適宜バックアップを取っておかないと悲惨なことになるかもしれません。
ログのかなりの部分を記録しているので長いです。

まずは freebsd-update を使って 11.0-RELEASE を取ってきます。

$ sudo freebsd-update -r 11.0-RELEASE upgrade
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... none found.
Fetching metadata signature for 10.3-RELEASE from update.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 world/base world/lib32
                 
The following components of FreeBSD do not seem to be installed:
world/doc world/games
                 
Does this look reasonable (y/n)? y

Fetching metadata signature for 11.0-RELEASE from update.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Fetching files from 10.3-RELEASE for merging... done.
Preparing to download files... done.
Fetching 11223 patchess.....10....20....30....40....50....
<snip>
11210....11220. done.
Applying patches... done.
Fetching 1167 files... done.
Attempting to automatically merge changes in files... done.
                 
The following changes, which occurred between FreeBSD 10.3-RELEASE and
FreeBSD 11.0-RELEASE have been merged into /etc/group:
--- current version
+++ new version  
@@ -1,6 +1,6 @@  
-# $FreeBSD: releng/10.3/etc/group 256366 2013-10-12 06:08:18Z rpaulo $
+# $FreeBSD: releng/11.0/etc/group 294896 2016-01-27 06:28:56Z araujo $
 #               
 wheel:*:0:root  
<snip>
Does this look reasonable (y/n)? y
                 
The following changes, which occurred between FreeBSD 10.3-RELEASE and
FreeBSD 11.0-RELEASE have been merged into /etc/master.passwd:
--- current version
+++ new version  
@@ -1,15 +1,15 @@
-# $FreeBSD: releng/10.3/etc/master.passwd 256366 2013-10-12 06:08:18Z rpaulo $
+# $FreeBSD: releng/11.0/etc/master.passwd 299365 2016-05-10 12:47:36Z bcr $
 #  
<snip>
Does this look reasonable (y/n)? y
                 
The following changes, which occurred between FreeBSD 10.3-RELEASE and
FreeBSD 11.0-RELEASE have been merged into /etc/passwd:
--- current version
+++ new version  
@@ -1,15 +1,15 @@
-# $FreeBSD: releng/10.3/etc/master.passwd 256366 2013-10-12 06:08:18Z rpaulo $
+# $FreeBSD: releng/11.0/etc/master.passwd 299365 2016-05-10 12:47:36Z bcr $
 #
<snip>
Does this look reasonable (y/n)? y
                 
The following files will be removed as part of updating to 11.0-RELEASE-p0:
/boot/kernel/aac.ko.symbols
/boot/kernel/aacraid.ko.symbols
/boot/kernel/accf_data.ko.symbols
/boot/kernel/accf_dns.ko.symbols
/boot/kernel/accf_http.ko.symbols
/boot/kernel/acl_nfs4.ko.symbols
/boot/kernel/acl_posix1e.ko.symbols
/boot/kernel/acpi_asus.ko.symbols
/boot/kernel/acpi_asus_wmi.ko.symbols
/boot/kernel/acpi_dock.ko.symbols
/boot/kernel/acpi_fujitsu.ko.symbols
/boot/kernel/acpi_hp.ko.symbols
/boot/kernel/acpi_ibm.ko.symbols
/boot/kernel/acpi_panasonic.ko.symbols
/boot/kernel/acpi_sony.ko.symbols
/boot/kernel/acpi_toshiba.ko.symbols
/boot/kernel/acpi_video.ko.symbols
/boot/kernel/acpi_wmi.ko.symbols
/boot/kernel/aesni.ko.symbols
/boot/kernel/agp.ko.symbols
/boot/kernel/aha.ko.symbols
/boot/kernel/ahc.ko.symbols
/boot/kernel/ahc_eisa.ko
/boot/kernel/ahc_eisa.ko.symbols
/boot/kernel/ahc_isa.ko.symbols
/boot/kernel/ahc_pci.ko.symbols
/boot/kernel/ahci.ko.symbols
/boot/kernel/ahd.ko.symbols
/boot/kernel/aibs.ko.symbols
/boot/kernel/aio.ko
/boot/kernel/aio.ko.symbols
/boot/kernel/alias_cuseeme.ko.symbols
/boot/kernel/alias_dummy.ko.symbols
/boot/kernel/alias_ftp.ko.symbols
                 
The following files will be added as part of updating to 11.0-RELEASE-p0:
/boot/kernel/bcma.ko
/boot/kernel/bcma_bhndb.ko
/boot/kernel/bhnd.ko
/boot/kernel/bhnd_chipc.ko
/boot/kernel/bhnd_pci.ko
/boot/kernel/bhnd_pci_hostb.ko
/boot/kernel/bhnd_pcib.ko
/boot/kernel/bhndb.ko
/boot/kernel/bhndb_pci.ko
/boot/kernel/callout_test.ko
/boot/kernel/cc_dctcp.ko
/boot/kernel/cloudabi.ko
/boot/kernel/cloudabi64.ko
/boot/kernel/cuse.ko
/boot/kernel/cxgbei.ko
/boot/kernel/cyapa.ko
/boot/kernel/g_audio.ko
/boot/kernel/g_keyboard.ko
/boot/kernel/g_modem.ko
/boot/kernel/g_mouse.ko
/boot/kernel/gpiobus.ko
/boot/kernel/gpioiic.ko
/boot/kernel/gpioled.ko
/boot/kernel/gpiospi.ko
/boot/kernel/gsched_delay.ko
/boot/kernel/if_bwn_pci.ko
/boot/kernel/if_cs.ko
/boot/kernel/if_enc.ko
/boot/kernel/if_ep.ko
                 
The following files will be updated as part of updating to 11.0-RELEASE-p0:
/.cshrc          
/.profile        
/COPYRIGHT       
/bin/[           
/bin/cat         
/bin/chflags     
/bin/chio        
/bin/chmod       
/bin/cp          
/bin/csh         
/bin/date        
/bin/dd          
/bin/df          
/bin/domainname
/bin/echo        
/bin/ed          
/bin/expr        
/bin/freebsd-version
/bin/getfacl     
/bin/hostname    
/bin/kenv        
/bin/kill        
/bin/link        
/bin/ln          
/bin/ls          
/bin/mkdir       
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".

freebsd-update install しろと言われるので実行します。
フルパスで指定されたのでフルパスで実行しました。

$ sudo /usr/sbin/freebsd-update install
Password:        
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.

再起動してもっかい freebsd-update install するそうです。

$ sudo reboot
$ sudo /usr/sbin/freebsd-update install
Password:        
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.

とりあえずカーネルはこれで OK っぽいですが、 ports でインストールしたものをリビルドしろと言われますのでおとなしく更新した方がいいと思います。

$ freebsd-version 
11.0-RELEASE