How to upgrade FreeBSD 11 to 12
Pertama catat versi FreeBSD yang running dengan menjalankan perintah:
freebsd-version
uname -mrs
contoh hasil:
11.3-RELEASE-p3
Update Base OS
Fetch dan update package base os:
freebsd-update fetch install
contoh outputs:
11.3-RELEASE-p3:
/boot/kernel/kernel
/boot/kernel/mqueuefs.ko
/boot/kernel/sound.ko
/boot/kernel/vmm.ko
/usr/lib/debug/boot/kernel/kernel.debug
/usr/lib/debug/boot/kernel/mqueuefs.ko.debug
/usr/lib/debug/boot/kernel/sound.ko.debug
/usr/lib/debug/boot/kernel/vmm.ko.debug
Installing updates... done.
Selanjutnya update paket juga, jalankan perintah:
pkg update && pkg upgrade
Upgrade FreeBSD 11.3 ke 12.0 dengan metode paket binary.
Jalankan dengan perintah:
freebsd-update -r 12.0-RELEASE upgrade
perintah freebsd-update akan mengevaluasi konfigurasi file dan kita akan review satu persatu serta merge configuration file seperti berikut:
Does this look reasonable (y/n) y
....
...
/bin/rmail
/bin/rmdir
/bin/setfacl
/bin/sh
/bin/sleep
/bin/stty
/bin/sync
/bin/tcsh
/bin/test
/bin/unlink
/bin/uuidgen
/boot
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
Setelah semuanya terdownload paket tersebut akan diinstall ke dalam disk. jalankan perintah:
freebsd-update install
contoh outputs:
Installing updates...
Kernel updates have been installed. Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.
untuk reboot jalankan perintah:
reboot
Setelah up lagi, jalankan ulang perintah freebsd-update
untuk menghapus semua shared libraries dan object files yg lama:
freebsd-update install
Contoh outputs:
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.
sekarang sistem telah diupdate. untuk update semua paket binary jalankan perintah:
pkg-static install -f pkg
pkg update
pkg upgrade
Contoh outputs:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (39 candidates): 100%
Processing candidates (39 candidates): 100%
The following 42 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
gdb: 8.2
expat: 2.2.6_1
libiconv: 1.14_11
Installed packages to be UPGRADED:
ca_root_nss: 3.40.1 -> 3.41
Installed packages to be REINSTALLED:
sudo-1.8.25p1 (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')
sqlite3-3.25.1 (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')
readline-7.0.3_1 (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')
.....
...
....
binutils-2.30_5,1 (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')
Number of packages to be installed: 3
Number of packages to be upgraded: 1
Number of packages to be reinstalled: 38
The process will require 53 MiB more space.
145 MiB to be downloaded.
Proceed with this action? [y/N]: y
[1/42] Fetching sudo-1.8.25p1.txz: 100% 682 KiB 698.3kB/s 00:01
[2/42] Fetching sqlite3-3.25.1.txz: 100% 1 MiB 266.6kB/s 00:05
....
..
...
[42/42] Fetching libiconv-1.14_11.txz: 100% 601 KiB 615.9kB/s 00:01
Checking integrity... done (0 conflicting)
[1/42] Reinstalling indexinfo-0.3.1...
[1/42] Extracting indexinfo-0.3.1: 100%
[2/42] Reinstalling readline-7.0.3_1...
[2/42] Extracting readline-7.0.3_1: 100%
[3/42] Reinstalling libffi-3.2.1_2...
....
..
...
By default panic reports will be sent to root with instructions to forward
them if they do not contain any sensitive information. To automatically
submit panic reports directly, add
panicmail_autosubmit="YES"
to your /etc/rc.conf in addition.
Message from gcc6-6.4.0_8:
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using
-Wl,-rpath=/usr/local/lib/gcc6
For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.
satu kali lagi jalankan:
/usr/sbin/freebsd-update install
Verifikasi version:
uname -mrs
freebsd-version
Jika ada services lain, maka package services tersebut jika akan terupgrade: