2017年8月5日土曜日

FreeBSD 11.0から11.1へアップグレードする

たまたまFreeBSD 11.0を新規にインストールする機会があったので、FreeBSD 11.0をインストール後に、11.1へアップグレードしてみました。

以下の解説に従って作業を進めます。
17.2.3. メジャーおよびマイナーバージョンのアップグレードを行うhttps://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/updating-upgrading-freebsdupdate.html
以下は、作業のようすです。
$ sudo freebsd-update -r 11.1-RELEASE upgrade
パスワード:
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching public key from update5.freebsd.org... done.
Fetching metadata signature for 11.0-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.

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

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

Does this look reasonable (y/n)? y

Fetching metadata signature for 11.1-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system...
Fetching files from 11.0-RELEASE for merging... done.
Preparing to download files...
done.
Fetching 49972 patches.....10....20....30....  ....49960....49970. done.
Applying patches... 

Fetching 2490 files... done.
Attempting to automatically merge changes in files... done.

The following file could not be merged automatically: /etc/ntp.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...
...

Does this look reasonable (y/n)? y

The following changes, which occurred between FreeBSD 11.0-RELEASE and
FreeBSD 11.1-RELEASE have been merged into /etc/ssh/sshd_config:
...

Does this look reasonable (y/n)? y
 

The following files will be removed as part of updating to 11.1-RELEASE-p0:
/boot/kernel/hv_ata_pci_disengage.ko
/usr/include/c++/v1/__undef___deallocate
/usr/include/c++/v1/tr1/__undef___deallocate
/usr/include/netinet/ip_ipsec.h
/usr/include/netinet6/ip6_ipsec.h
/usr/include/pcap-int.h
/usr/lib/clang/3.8.0
/usr/lib/clang/3.8.0/include

...
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".

$ sudo /usr/sbin/freebsd-update install
パスワード:
Installing updates...

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

パスワード:
....
$ uname -a
FreeBSD dandelion 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
$ freebsd-version
11.0-RELEASE-p1
$ sudo freebsd-update install
パスワード:
Installing updates... done.

...
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.
$ sudo freebsd-update install
パスワード:
Installing updates... done.

$ uname -a
FreeBSD dandelion 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
dandelion$ freebsd-version
11.1-RELEASE
最後に、3回、freebsd-update installとrebootを繰り返して終了です。

念のために、再起動とfreebsd-update fetchとpkg updateを行います。
$ sudo reboot

パスワード:
....
$ sudo freebsd-update  fetchパスワード:
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 11.1-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 11.1-RELEASE-p0.
$ sudo pkg update
パスワード:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
$