FreeBSD Tips and Tricks

Next: Upgrade FreeBSD 10.2 to 10.3 UP: TOC

Upgrading FreeBSD 10.1 to 10.2 takes approx 60 minutes. During this time the web applications where available except for 3 reboots which took 1 minute each. If your machine is virtualized take a snapshot before upgrading.

$ su -
Password:

# uname -a
FreeBSD ?.com 10.1-RELEASE-p16 FreeBSD 10.1-RELEASE-p16 #0: Tue Jul 28 12:04:19 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 # date Tue Aug 18 19:16:02 CEST 2015 # freebsd-update upgrade -r 10.2-RELEASE Looking up update.FreeBSD.org mirrors... 5 mirrors found. Fetching metadata signature for 10.1-RELEASE from update2.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 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 10.2-RELEASE from update2.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.1-RELEASE for merging... done. Preparing to download files... done. Fetching 11088 patches.....10....20....30....40....50........11040....11050....11060....11070....11080.... done. Applying patches... done. Fetching 5409 files... 4e817115130977397b77969d4e97ef1e17f49e0fd7601a0a718472e2a85d9730 has incorrect hash. # date Tue Aug 18 19:38:56 CEST 2015 rm /var/db/freebsd-update/4e817115130977397b77969d4e97ef1e17f49e0fd7601a0a718472e2a85d9730.gz freebsd-update upgrade -r 10.2-RELEASE Looking up update.FreeBSD.org mirrors... 5 mirrors found. Fetching metadata signature for 10.1-RELEASE from update2.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 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 10.2-RELEASE from update2.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.1-RELEASE for merging... done. Preparing to download files... done. Fetching 4303 patches.....10....20....30....40....50........4250....4260....4270....4280....4290....4300. done. Applying patches... done. Fetching 2668 files... ... 91a801a7fec1b5d8e38de971d0cedfeac3413cf9a5eb760a8808119e20228289 has incorrect hash. root@41share:~ # rm /var/db/freebsd-update/91a801a7fec1b5d8e38de971d0cedfeac3413cf9a5eb760a8808119e20228289* root@41share:~ # freebsd-update upgrade -r 10.2-RELEASE Looking up update.FreeBSD.org mirrors... 5 mirrors found. Fetching metadata signature for 10.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... 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 10.2-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... done. Fetching files from 10.1-RELEASE for merging... done. Preparing to download files... done. Fetching 1882 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....320....330....340....350....360....370....380....390....400....410....420....430....440....450....460....470....480....490....500....510....520....530....540....550....560....570....580....590....600....610....620....630....640....650....660....670....680....690....700....710....720....730....740....750....760....770....780....790....800....810....820....830....840....850....860....870....880....890....900....910....920....930....940....950....960....970....980....990....1000....1010....1020....1030....1040....1050....1060....1070....1080....1090....1100....1110....1120....1130....1140....1150....1160....1170....1180....1190....1200....1210....1220....1230....1240....1250....1260....1270....1280....1290....1300....1310....1320....1330....1340....1350....1360....1370....1380....1390....1400....1410....1420....1430....1440....1450....1460....1470....1480....1490....1500....1510....1520....1530....1540....1550....1560....1570....1580....1590....1600....1610....1620....1630....1640....1650....1660....1670....1680....1690....1700....1710....1720....1730....1740....1750....1760....1770....1780....1790....1800....1810....1820....1830....1840....1850....1860....1870....1880. done. Applying patches... done. Fetching 140 files... done. Attempting to automatically merge changes in files... done. The following files are affected by updates, but no changes have been downloaded because the files have been modified locally: /root/.login The following files will be removed as part of updating to 10.2-RELEASE-p0: /boot/kernel/cyclic.ko /boot/kernel/cyclic.ko.symbols /boot/kernel/oce.ko /boot/kernel/oce.ko.symbols /usr/include/netinet/in_gif.h /usr/include/netinet/ip_gre.h /usr/include/netinet6/in6_gif.h /usr/share/doc/ntp/driver1.html /usr/share/doc/ntp/driver10.html /usr/share/doc/ntp/driver11.html /usr/share/doc/ntp/driver12.html /usr/share/doc/ntp/driver16.html /usr/share/doc/ntp/driver18.html /usr/share/doc/ntp/driver19.html /usr/share/doc/ntp/driver2.html /usr/share/doc/ntp/driver20.html /usr/share/doc/ntp/driver22.html /usr/share/doc/ntp/driver26.html /usr/share/doc/ntp/driver27.html /usr/share/doc/ntp/driver28.html /usr/share/doc/ntp/driver29.html /usr/share/doc/ntp/driver3.html /usr/share/doc/ntp/driver30.html /usr/share/doc/ntp/driver32.html /usr/share/doc/ntp/driver33.html /usr/share/doc/ntp/driver34.html /usr/share/doc/ntp/driver35.html /usr/share/doc/ntp/driver36.html /usr/share/doc/ntp/driver37.html /usr/share/doc/ntp/driver4.html /usr/share/doc/ntp/driver5.html /usr/share/doc/ntp/driver6.html /usr/share/doc/ntp/driver7.html /usr/share/doc/ntp/driver8.html /usr/share/doc/ntp/driver9.html /usr/share/doc/ntp/ldisc.html /usr/share/doc/ntp/measure.html /usr/share/doc/ntp/mx4200data.html /usr/share/doc/ntp/notes.html /usr/share/doc/ntp/patches.html /usr/share/doc/ntp/porting.html /usr/share/man/man1/sntp.1.gz /usr/share/man/man1/svnlite.1.gz /usr/share/man/man9/NDHASGIANT.9.gz /usr/share/man/man9/sleepq_calc_signal_retval.9.gz /usr/share/man/man9/sleepq_catch_signals.9.gz /usr/share/zoneinfo/America/Montreal The following files will be added as part of updating to 10.2-RELEASE-p0: /boot/brand-fbsd.4th /boot/dtb /boot/kernel/if_cxl.ko /boot/kernel/if_cxl.ko.symbols /boot/kernel/if_ix.ko /boot/kernel/if_ix.ko.symbols /boot/kernel/if_ixv.ko /boot/kernel/if_ixv.ko.symbols /boot/kernel/if_me.ko /boot/kernel/if_me.ko.symbols /boot/kernel/if_oce.ko /boot/kernel/if_oce.ko.symbols /boot/kernel/if_vxlan.ko /boot/kernel/if_vxlan.ko.symbols /boot/kernel/mrsas_linux.ko /boot/kernel/mrsas_linux.ko.symbols /boot/kernel/pmspcv.ko /boot/kernel/pmspcv.ko.symbols /boot/kernel/uled.ko /boot/kernel/uled.ko.symbols /boot/kernel/virtio_console.ko /boot/kernel/virtio_console.ko.symbols /boot/logo-beastie.4th /boot/logo-beastiebw.4th /boot/logo-fbsdbw.4th /boot/logo-orb.4th /boot/logo-orbbw.4th /etc/autofs/special_media /etc/autofs/special_noauto /etc/devd/zfs.conf /etc/periodic/daily/510.status-world-kernel /etc/rc.d/growfs /lib/libmt.so.5 /libexec/resolvconf/pdns_recursor /rescue/sleep /usr/bin/dpv /usr/bin/pmcstudy /usr/include/atf-c /usr/include/atf-c++ /usr/include/c++/v1/__refstring /usr/include/c++/v1/experimental/__config /usr/include/c++/v1/experimental/string_view /usr/include/c++/v1/experimental/type_traits /usr/include/c++/v1/experimental/utility /usr/include/c++/v1/tr1/__refstring /usr/include/dev/acpica/acpi_hpet.h /usr/include/dev/usb/uled_ioctl.h /usr/include/dpv.h /usr/include/figpar.h /usr/include/mtlib.h /usr/include/net/if_vxlan.h ... ... ... /var/db/etcupdate/current/root/.k5login /var/db/etcupdate/current/root/.login /var/db/etcupdate/current/root/.profile /var/db/etcupdate/log /var/db/mergemaster.mtree /var/yp/Makefile.dist To install the downloaded upgrades, run "/usr/sbin/freebsd-update install". # date Tue Aug 18 20:03:52 CEST 2015 # /usr/sbin/freebsd-update install Installing updates... Installing updates... Kernel updates have been installed. Please reboot and run "/usr/sbin/freebsd-update install" again to finish installing updates. # date Tue Aug 18 20:06:16 CEST 2015 # shutdown -r now $ su - Password: # uname -a FreeBSD 41share.com 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 # date Tue Aug 18 20:08:01 CEST 2015 # /usr/sbin/freebsd-update install Installing updates... done. shutdown -r now $ su - Password: # uname -a FreeBSD 41share.com 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 # pkg update Updating FreeBSD repository catalogue... 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% 5 MiB 5.4MB/s 00:01 Processing entries: 100% FreeBSD repository update completed. 24279 packages processed. # pkg upgrade Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking for upgrades (40 candidates): 100% Processing candidates (40 candidates): 100% The following 26 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: php56-xml: 5.6.11 -> 5.6.12 php56-tokenizer: 5.6.11 -> 5.6.12 php56-simplexml: 5.6.11 -> 5.6.12 php56-session: 5.6.11 -> 5.6.12 php56-phar: 5.6.11 -> 5.6.12 php56-pgsql: 5.6.11 -> 5.6.12 php56-pdo_pgsql: 5.6.11 -> 5.6.12 php56-pdo: 5.6.11 -> 5.6.12 php56-openssl: 5.6.11 -> 5.6.12 php56-opcache: 5.6.11 -> 5.6.12 php56-mbstring: 5.6.11 -> 5.6.12 php56-json: 5.6.11 -> 5.6.12 php56-iconv: 5.6.11 -> 5.6.12 php56-hash: 5.6.11 -> 5.6.12 php56-gettext: 5.6.11 -> 5.6.12 php56-gd: 5.6.11 -> 5.6.12 php56-filter: 5.6.11 -> 5.6.12 php56-dom: 5.6.11 -> 5.6.12 php56-curl: 5.6.11 -> 5.6.12 php56-ctype: 5.6.11 -> 5.6.12 php56: 5.6.11 -> 5.6.12 pcre: 8.37_2 -> 8.37_3 nginx: 1.8.0,2 -> 1.8.0_3,2 expat: 2.1.0_2 -> 2.1.0_3 ca_root_nss: 3.19.2 -> 3.19.3 Installed packages to be REINSTALLED: libxml2-2.9.2_3 (options changed) The operation will free 80 KiB. 6 MiB to be downloaded. Proceed with this action? [y/N]: y Fetching php56-xml-5.6.12.txz: 100% 19 KiB 19.7kB/s 00:01 Fetching php56-tokenizer-5.6.12.txz: 100% 8 KiB 8.0kB/s 00:01 Fetching php56-simplexml-5.6.12.txz: 100% 22 KiB 22.5kB/s 00:01 Fetching php56-session-5.6.12.txz: 100% 30 KiB 30.4kB/s 00:01 Fetching php56-phar-5.6.12.txz: 100% 99 KiB 101.8kB/s 00:01 Fetching php56-pgsql-5.6.12.txz: 100% 41 KiB 42.3kB/s 00:01 Fetching php56-pdo_pgsql-5.6.12.txz: 100% 18 KiB 18.0kB/s 00:01 Fetching php56-pdo-5.6.12.txz: 100% 43 KiB 44.2kB/s 00:01 Fetching php56-openssl-5.6.12.txz: 100% 43 KiB 44.0kB/s 00:01 Fetching php56-opcache-5.6.12.txz: 100% 61 KiB 63.0kB/s 00:01 Fetching php56-mbstring-5.6.12.txz: 100% 707 KiB 723.8kB/s 00:01 Fetching php56-json-5.6.12.txz: 100% 16 KiB 16.5kB/s 00:01 Fetching php56-iconv-5.6.12.txz: 100% 18 KiB 18.2kB/s 00:01 Fetching php56-hash-5.6.12.txz: 100% 114 KiB 117.1kB/s 00:01 Fetching php56-gettext-5.6.12.txz: 100% 7 KiB 6.7kB/s 00:01 Fetching php56-gd-5.6.12.txz: 100% 132 KiB 135.5kB/s 00:01 Fetching php56-filter-5.6.12.txz: 100% 19 KiB 19.6kB/s 00:01 Fetching php56-dom-5.6.12.txz: 100% 54 KiB 55.2kB/s 00:01 Fetching php56-curl-5.6.12.txz: 100% 26 KiB 27.0kB/s 00:01 Fetching php56-ctype-5.6.12.txz: 100% 6 KiB 6.5kB/s 00:01 Fetching php56-5.6.12.txz: 100% 2 MiB 2.0MB/s 00:01 Fetching pcre-8.37_3.txz: 100% 1 MiB 1.1MB/s 00:01 Fetching nginx-1.8.0_3,2.txz: 100% 258 KiB 264.3kB/s 00:01 Fetching libxml2-2.9.2_3.txz: 100% 788 KiB 807.1kB/s 00:01 Fetching expat-2.1.0_3.txz: 100% 98 KiB 99.8kB/s 00:01 Fetching ca_root_nss-3.19.3.txz: 100% 333 KiB 341.0kB/s 00:01 Checking integrity... done (0 conflicting) [1/26] Reinstalling libxml2-2.9.2_3... [1/26] Extracting libxml2-2.9.2_3: 100% [2/26] Upgrading pcre from 8.37_2 to 8.37_3... [2/26] Extracting pcre-8.37_3: 100% [3/26] Upgrading php56 from 5.6.11 to 5.6.12... [3/26] Extracting php56-5.6.12: 100% [4/26] Upgrading ca_root_nss from 3.19.2 to 3.19.3... [4/26] Extracting ca_root_nss-3.19.3: 100% [5/26] Upgrading php56-pdo from 5.6.11 to 5.6.12... [5/26] Extracting php56-pdo-5.6.12: 100% [6/26] Upgrading php56-hash from 5.6.11 to 5.6.12... [6/26] Extracting php56-hash-5.6.12: 100% [7/26] Upgrading php56-xml from 5.6.11 to 5.6.12... [7/26] Extracting php56-xml-5.6.12: 100% [8/26] Upgrading php56-tokenizer from 5.6.11 to 5.6.12... [8/26] Extracting php56-tokenizer-5.6.12: 100% [9/26] Upgrading php56-simplexml from 5.6.11 to 5.6.12... [9/26] Extracting php56-simplexml-5.6.12: 100% [10/26] Upgrading php56-session from 5.6.11 to 5.6.12... [10/26] Extracting php56-session-5.6.12: 100% [11/26] Upgrading php56-phar from 5.6.11 to 5.6.12... [11/26] Extracting php56-phar-5.6.12: 100% [12/26] Upgrading php56-pgsql from 5.6.11 to 5.6.12... [12/26] Extracting php56-pgsql-5.6.12: 100% [13/26] Upgrading php56-pdo_pgsql from 5.6.11 to 5.6.12... [13/26] Extracting php56-pdo_pgsql-5.6.12: 100% [14/26] Upgrading php56-openssl from 5.6.11 to 5.6.12... [14/26] Extracting php56-openssl-5.6.12: 100% [15/26] Upgrading php56-opcache from 5.6.11 to 5.6.12... [15/26] Extracting php56-opcache-5.6.12: 100% [16/26] Upgrading php56-mbstring from 5.6.11 to 5.6.12... [16/26] Extracting php56-mbstring-5.6.12: 100% [17/26] Upgrading php56-json from 5.6.11 to 5.6.12... [17/26] Extracting php56-json-5.6.12: 100% [18/26] Upgrading php56-iconv from 5.6.11 to 5.6.12... [18/26] Extracting php56-iconv-5.6.12: 100% [19/26] Upgrading php56-gettext from 5.6.11 to 5.6.12... [19/26] Extracting php56-gettext-5.6.12: 100% [20/26] Upgrading php56-gd from 5.6.11 to 5.6.12... [20/26] Extracting php56-gd-5.6.12: 100% [21/26] Upgrading php56-filter from 5.6.11 to 5.6.12... [21/26] Extracting php56-filter-5.6.12: 100% [22/26] Upgrading php56-dom from 5.6.11 to 5.6.12... [22/26] Extracting php56-dom-5.6.12: 100% [23/26] Upgrading php56-curl from 5.6.11 to 5.6.12... [23/26] Extracting php56-curl-5.6.12: 100% [24/26] Upgrading php56-ctype from 5.6.11 to 5.6.12... [24/26] Extracting php56-ctype-5.6.12: 100% [25/26] Upgrading nginx from 1.8.0,2 to 1.8.0_3,2... ===> Creating users and/or groups. Using existing group 'www'. Using existing user 'www'. [25/26] Extracting nginx-1.8.0_3,2: 100% [26/26] Upgrading expat from 2.1.0_2 to 2.1.0_3... [26/26] Extracting expat-2.1.0_3: 100% Message for ca_root_nss-3.19.3: ********************************* WARNING ********************************* FreeBSD does not, and can not warrant that the certification authorities whose certificates are included in this package have in any way been audited for trustworthiness or RFC 3647 compliance. Assessment and verification of trust is the complete responsibility of the system administrator. *********************************** NOTE ********************************** This package installs symlinks to support root certificates discovery by default for software that uses OpenSSL. This enables SSL Certificate Verification by client software without manual intervention. If you prefer to do this manually, replace the following symlinks with either an empty file or your site-local certificate bundle. * /etc/ssl/cert.pem * /usr/local/etc/ssl/cert.pem * /usr/local/openssl/cert.pem *************************************************************************** # date Tue Aug 18 20:19:38 CEST 2015 Next: Upgrade FreeBSD 10.2 to 10.3 UP: TOC