{"id":8655,"date":"2021-04-15T08:35:22","date_gmt":"2021-04-15T05:35:22","guid":{"rendered":"https:\/\/kifarunix.com\/?p=8655"},"modified":"2024-03-19T08:18:38","modified_gmt":"2024-03-19T05:18:38","slug":"upgrade-freebsd-12-to-13","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/upgrade-freebsd-12-to-13\/","title":{"rendered":"Upgrade FreeBSD 12 to 13"},"content":{"rendered":"\n<p>With FreeBSD 13 having been released, it might be the right time to upgrade your FreeBSD 12 box to 13. Follow through this guide to learn how to upgrade FreeBSD 12 to 13.<\/p>\n\n\n\n<p>You can read more about <a aria-label=\"FreeBSD 13.0-RELEASE (opens in a new tab)\" href=\"https:\/\/www.freebsd.org\/releases\/13.0R\/relnotes\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">FreeBSD 13.0-RELEASE<\/a> notes.<\/p>\n\n\n\n<p>Before you can proceed, ensure that you backup all your data just in case something goes south with upgrades.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrading FreeBSD 12 to 13<\/h2>\n\n\n\n<p>In our setup, we have FreeBSD 12.2 RELEASE version installed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-version<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>12.2-RELEASE<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Apply System Security Patches<\/h3>\n\n\n\n<p><code><strong>freebsd-update<\/strong><\/code> command can be used download and install security patches on FreeBSD systems.<\/p>\n\n\n\n<p>To download system security patches, run the commands below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-update fetch<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>src component not installed, skipped\nLooking up update.FreeBSD.org mirrors... 3 mirrors found.\nFetching public key from update1.freebsd.org... done.\nFetching metadata signature for 12.2-RELEASE from update1.freebsd.org... done.\nFetching metadata index... done.\nFetching 2 metadata files... done.\nInspecting system... done.\nPreparing to download files... done.\nFetching 114 patches.....10....20....30....40....50....60....70....80....90....100....110.. done.\nApplying patches... done.\nFetching 1 files...  done.\nThe following files will be removed as part of updating to\n12.2-RELEASE-p6:\n...<\/code><\/pre>\n\n\n\n<p>Next, you need to install downloaded security patches by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-update install<\/code><\/pre>\n\n\n\n<p>You can simply execute both commands at the same time by running;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-update fetch install<\/code><\/pre>\n\n\n\n<p>Once the command above completes, you need to check if the system requires a reboot to apply the kernel patches, if at all it was patched.<\/p>\n\n\n\n<p>To know if the system requires a reboot compare the output of the commands, <code><strong>freebsd-version -k<\/strong><\/code> and <strong><code>uname -r<\/code><\/strong> (to check the kernel versions);<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-version -k<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>12.2-RELEASE-p6<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>uname -r<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>12.2-RELEASE<\/code><\/pre>\n\n\n\n<p>In such a scenario, the system requires a reboot since the kernel was upgraded. Hence, execute the command below to reboot your FreeBSD box;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>shutdown -r now<\/code><\/pre>\n\n\n\n<p>When you check the outputs of the commands above after reboot, they should be same;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-version -k<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>12.2-RELEASE-p6<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>uname -r<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>12.2-RELEASE-p6<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Upgrading FreeBSD 12 to FreeBSD 13<\/h3>\n\n\n\n<p>Once you have downloaded and installed security patches, you can then proceed to perform a major version upgrade of FreeBSD 12 to 13;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-update -r 13.0-RELEASE upgrade<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>src component not installed, skipped\nLooking up update.FreeBSD.org mirrors... 3 mirrors found.\nFetching metadata signature for 12.2-RELEASE from update1.freebsd.org... done.\nFetching metadata index... done.\nInspecting system... done.\n\nThe following components of FreeBSD seem to be installed:\nkernel\/generic kernel\/generic-dbg world\/base world\/doc world\/lib32\n\nThe following components of FreeBSD do not seem to be installed:\nworld\/base-dbg world\/lib32-dbg\n\nDoes this look reasonable (y\/n)? y\n\nFetching metadata signature for 13.0-RELEASE from update1.freebsd.org... done.\nFetching metadata index... done.\nFetching 1 metadata patches. done.\nApplying metadata patches... done.\nFetching 1 metadata files... done.\nInspecting system... done.\nFetching files from 12.2-RELEASE for merging... done.\nPreparing to download files... done.\nFetching 10109 patches.....10....20....30...\n...\n\/bin\/pwait\n\/bin\/pwd\n\/bin\/realpath\n\/bin\/red\n\/bin\/rm\n\/bin\/rmail\n\/bin\/rmdir\nTo install the downloaded upgrades, run \"\/usr\/sbin\/freebsd-update install\".<\/code><\/pre>\n\n\n\n<p>Depending on your internet speed, this might take sometime to complete.<\/p>\n\n\n\n<p>Once the command above completes, proceed to install the downloaded upgrades by running the command;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-update install<\/code><\/pre>\n\n\n\n<p>Sample command output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>src component not installed, skipped\nInstalling updates...\nKernel updates have been installed.  Please reboot and run\n\"\/usr\/sbin\/freebsd-update install\" again to finish installing updates.<\/code><\/pre>\n\n\n\n<p>So reboot and reinstall the updates;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>shutdown -r now<\/code><\/pre>\n\n\n\n<p>Once the system boots, rerun the updates installation command;<\/p>\n\n\n\n<pre id=\"block-981fdd4f-82ed-42fb-b5e4-878372d642e5\" class=\"wp-block-preformatted\">freebsd-update install<\/code><\/pre>\n\n\n\n<p>At this stage, you have successfully upgraded FreeBSD 12.2 to FreeBSD 13.0;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-version<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>13.0-RELEASE<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Upgrade Packages After a Major Version Upgrade<\/h3>\n\n\n\n<p>It is recommended that after a major version upgrade, all system packages be upgraded as well since &#8220;<em>Major versions use different Application Binary Interfaces (ABIs), which will break most third-party applications. After a major version upgrade, all installed packages and ports need to be upgraded<\/em>&#8220;.<\/p>\n\n\n\n<p>Hence, execute the commands below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pkg-static upgrade -f<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pkg bootstrap -f<\/code><\/pre>\n\n\n\n<p>Once the package upgrades are complete, finalize the upgrade process by running;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>freebsd-update install<\/code><\/pre>\n\n\n\n<p>Reboot once more;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>shutdown -r now<\/code><\/pre>\n\n\n\n<p>Verify OS details after reboot;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pkg install neofetch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>neofetch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>```                        `       root@freebsd \n  ` `.....---.......--.```   -\/    ------------ \n  +o   .--`         \/y:`      +.   OS: FreeBSD 13.0-RELEASE amd64 \n   yo`:.            :o      `+-    Uptime: 3 mins \n    y\/               -\/`   -o\/     Packages: 6 (pkg) \n   .-                  ::\/sy+:.    Shell: csh tcsh 6.21.00 \n   \/                     `--  \/    Terminal: \/dev\/pts\/0 \n  `:                          :`   CPU: Intel i7-10510U (1) @ 2.304GHz \n  `:                          :`   GPU: SVGA II Adapter \n   \/                          \/    Memory: 108MiB \/ 990MiB \n   .-                        -.\n    --                      -.                             \n     `:`                  `:`                              \n       .--             `--.\n          .---.....----.<\/code><\/pre>\n\n\n\n<p>And that is it on how to upgrade FreeBSD 12 to FreeBSD 13. Enjoy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/easily-install-mariadb-10-5-on-freebsd-12-1\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Easily Install MariaDB 10.5 on FreeBSD<\/a><\/p>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-php-7-4-on-freebsd-12\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install PHP 7.4 on FreeBSD<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-or-uninstall-software-on-freebsd-12-using-ports-collection\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install or Uninstall Software on FreeBSD using Ports Collection<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With FreeBSD 13 having been released, it might be the right time to upgrade your FreeBSD 12 box to 13. Follow through this guide to<\/p>\n","protected":false},"author":1,"featured_media":8664,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[280,121,2959],"tags":[278,3439,3438,3435,3434,3437,3436],"class_list":["post-8655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-freebsd","category-howtos","category-os","tag-freebsd-12","tag-freebsd-13","tag-freebsd-13-release","tag-how-to-upgrade-freebsd","tag-upgrade-freebsd-12-to-13","tag-upgrade-freebsd-12-to-freebsd-13","tag-upgrade-freebsd-to-major-release-version","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8655"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=8655"}],"version-history":[{"count":3,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8655\/revisions"}],"predecessor-version":[{"id":21845,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8655\/revisions\/21845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/8664"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=8655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=8655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=8655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}