{"id":2616,"date":"2013-01-09T10:15:36","date_gmt":"2013-01-09T16:15:36","guid":{"rendered":"http:\/\/icesquare.com\/wordpress\/?p=2616"},"modified":"2016-05-19T17:14:13","modified_gmt":"2016-05-19T22:14:13","slug":"upgrade-freebsd-8-to-9","status":"publish","type":"post","link":"https:\/\/icesquare.com\/wordpress\/upgrade-freebsd-8-to-9\/","title":{"rendered":"How to Upgrade FreeBSD from 8 to 9"},"content":{"rendered":"<p>Upgrading FreeBSD is very easy. Thanks for the simple architecture design and the disconnection between the kernel and the applications (ports), the whole process takes around 15 to 45 minutes. The coolest thing is that the system down time is very short. In my case, the down time was only about 3 minutes.<\/p>\n<p>This table will help you to estimate the whole process and system down time:<\/p>\n<style>\n.tableHeader{\n   border:1px dashed #666;\n   padding:5px;\n   font-weight:normal;\n   font-size:15px;\n}\n<\/style>\n<table style=\"border:1px dashed #666; padding:5px; margin:10px; margin-top:50px;\">\n<tr>\n<td class=\"tableHeader\"><strong>Action<\/strong><\/td>\n<td class=\"tableHeader\"><strong>Down Time?<\/strong><\/td>\n<td class=\"tableHeader\"><strong>Approximate Duration<\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"tableHeader\">Download the update files<\/td>\n<td class=\"tableHeader\">None<\/td>\n<td class=\"tableHeader\">5 to 15 minutes<\/td>\n<\/tr>\n<tr>\n<td class=\"tableHeader\">Installing the update<\/td>\n<td class=\"tableHeader\">None<\/td>\n<td class=\"tableHeader\">5 to 15 minutes<\/td>\n<\/tr>\n<tr>\n<td class=\"tableHeader\">Helping FreeBSD to set up the system configurations<\/td>\n<td class=\"tableHeader\">None<\/td>\n<td class=\"tableHeader\">1 to 3 minutes<\/td>\n<\/tr>\n<tr>\n<td class=\"tableHeader\">Reboot<\/td>\n<td class=\"tableHeader\">Yes<\/td>\n<td class=\"tableHeader\">1 to 3 minutes<\/td>\n<\/tr>\n<tr>\n<td class=\"tableHeader\">Installing the update<\/td>\n<td class=\"tableHeader\">None<\/td>\n<td class=\"tableHeader\">1 to 2 minutes<\/td>\n<\/tr>\n<tr>\n<td class=\"tableHeader\">Reboot (Optional)<\/td>\n<td class=\"tableHeader\">Yes<\/td>\n<td class=\"tableHeader\">1 to 3 minutes<\/td>\n<\/tr>\n<\/table>\n<p>Notice that this tutorial only works for i386 or amd64. For other CPU architectures such as Sparc, you will either reinstall the whole thing or <a href=\"http:\/\/www.surlyjake.com\/2009\/03\/how-to-update-my-sparc-freebsd-install\/\" target=\"_blank\">rebuild the whole world<\/a> (i.e., make buildworld). One way or the other, that&#8217;s a very time-consuming process.<\/p>\n<p>First, I am assuming that your FreeBSD is up-to-date in your current version. You can do it by running the following command:<\/p>\n<p>First, make sure that your ports are up to date.<\/p>\n<pre>\r\n#Download the latest ports\r\nsudo portsnap fetch update\r\n\r\n#Upgrade the old ports:\r\nsudo portmaster -Da\r\n<\/pre>\n<p>Next, we want to upgrade the FreeBSD. Currently, the latest version is 9.1:<\/p>\n<pre>\r\nsudo freebsd-update upgrade -r 9.1-RELEASE\r\n<\/pre>\n<p>FreeBSD will try to download files for you. Just say yes.<\/p>\n<pre>\r\nLooking up update.FreeBSD.org mirrors... 4 mirrors found.\r\nFetching metadata signature for 8.2-RELEASE from update5.FreeBSD.org... done.\r\nFetching metadata index... done.\r\nFetching 1 metadata files... done.\r\nInspecting system... done.\r\n\r\nThe following components of FreeBSD seem to be installed:\r\nkernel\/generic world\/base world\/manpages\r\n\r\nThe following components of FreeBSD do not seem to be installed:\r\nsrc\/base src\/bin src\/cddl src\/contrib src\/crypto src\/etc src\/games\r\nsrc\/gnu src\/include src\/krb5 src\/lib src\/libexec src\/release src\/rescue\r\nsrc\/sbin src\/secure src\/share src\/sys src\/tools src\/ubin src\/usbin\r\nworld\/catpages world\/dict world\/doc world\/games world\/info world\/lib32\r\nworld\/proflibs\r\n\r\nDoes this look reasonable (y\/n)? y\r\n<\/pre>\n<p>Next, it will download the patches. Depending on your internet connection speed, it may take 1 to 10 minutes:<\/p>\n<pre>\r\n...\r\nApplying patches... done.\r\nFetching 1962 files... done.\r\nAttempting to automatically merge changes in files... done.\r\n<\/pre>\n<div class=\"alignright\" style=\"margin-left:20px;\"><\/div>\n<p style=\"margin-top:30px; margin-left:20px; padding-right:20px;\">Now, FreeBSD will try to check whether your configuration is compatible with the new version or not. It may need your help to merge the configuration files manually. Notice that it uses VI, a standard (and very old, not really user-friendly) editor in Unix. If you&#8217;ve never used vi before, here are some simple commands:<\/p>\n<div style=\"margin-bottom:70px;\"> <\/div>\n<pre>\r\n#By default, a document is opened in read-only mode. To switch to a wrote mode:\r\ni\r\n\r\n#To set the mode to read only\r\nPress the ESC key\r\n\r\n#Delete a character\r\nx\r\n\r\n#Delete the whole line\r\ndd\r\n\r\n\r\n#Save a file\r\n:w\r\n\r\n#To quite vi\r\n:q\r\n\r\n#To save and quite\r\n:wq\r\n<\/pre>\n<p>After some file editing, FreeBSD will give you a summary of what files will be changed. Just hit either ESC or q to end the list.<\/p>\n<pre>\r\n...\r\n\/usr\/share\/man\/man3\/lwres_addr_parse.3.gz\r\n\/usr\/share\/man\/man3\/lwres_buffer.3.gz\r\n\/usr\/share\/man\/man3\/lwres_buffer_add.3.gz\r\n\/usr\/share\/man\/man3\/lwres_buffer_back.3.gz\r\n\/usr\/share\/man\/man3\/lwres_buffer_clear.3.gz\r\n\/usr\/share\/man\/man3\/lwres_buffer_first.3.gz\r\n\/usr\/share\/man\/man3\/lwres_buffer_forward.3.gz\r\n\/usr\/share\/man\/man3\/lwres_buffer_getmem.3.gz\r\n<\/pre>\n<p>At this point, FreeBSD finish the upgrade plan. (It hasn&#8217;t made any change to your system.) Now we need to give a green light to FreeBSD to start upgrade the system.<\/p>\n<pre>\r\nsudo freebsd-update install\r\n<\/pre>\n<pre>\r\n...Please reboot and run \"\/usr\/sbin\/freebsd-update install\" again to finish installing updates.\r\n<\/pre>\n<p>After the reboot, run the command again to update the userland components:<\/p>\n<p><pre>\r\nsudo freebsd-update install\r\n<\/pre>\n<p><\/p>\n<pre>\r\nInstalling updates...\r\nCompleting this upgrade requires removing old shared object files.\r\nPlease rebuild all installed 3rd party software (e.g., programs\r\ninstalled from the ports tree) and then run \"\/usr\/sbin\/freebsd-update install\"\r\nagain to finish installing updates.\r\n<\/pre>\n<\/p>\n<p>Reboot the computer again to finish the upgrade.<\/p>\n<pre>\r\nsudo reboot\r\n<\/pre>\n<p>Now, we need to upgrade all of the ports. Notice that this step is <strong>optional<\/strong>. You don&#8217;t need to do it unless you found any problem after the upgrade.<\/p>\n<pre>\r\n#Upgrade all the installed ports\r\nsudo portmaster -fa\r\n<\/pre>\n<p>Reboot the computer again to finish the upgrade.<\/p>\n<pre>\r\nsudo reboot\r\n<\/pre>\n<p>Make sure that FreeBSD is running on the latest version:<\/p>\n<pre>\r\n# uname -a\r\nFreeBSD 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:\/usr\/obj\/usr\/src\/sys\/GENERIC  amd64\r\n<\/pre>\n<p>Have fun with FreeBSD.<\/p>\n<p>&#8211;Derrick<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Upgrading FreeBSD is very easy. Thanks for the simple architecture design and the disconnection between the kernel and the applications (ports), the whole process takes around 15 to 45 minutes. <a class=\"more-link\" href=\"https:\/\/icesquare.com\/wordpress\/upgrade-freebsd-8-to-9\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1604,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[94,7,144,6,69],"tags":[171],"class_list":["post-2616","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-problems-computer-help-pc-support","category-freebsd","category-sever-problem","category-technology","category-troubleshooting-technology","tag-freebsd"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-Gc","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2181,"url":"https:\/\/icesquare.com\/wordpress\/freebsd-updateinstalling-updates-install-usrsrcliblibcgenlibc_dlopen-c-no-such-file-or-directory\/","url_meta":{"origin":2616,"position":0},"title":"[FreeBSD-update]Installing updates&#8230;install: \/\/\/usr\/src\/lib\/libc\/gen\/libc_dlopen.c: No such file or directory","author":"Derrick","date":"December 23, 2011","format":false,"excerpt":"When I tried to upgrade my FreeBSD system today, I received a last minute Christmas gift from the FreeBSD team. :-) #sudo freebsd-update fetch Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching metadata signature for 8.2-RELEASE from update4.FreeBSD.org... done. Fetching metadata index... done. Inspecting system... done. Preparing to download files...\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4128,"url":"https:\/\/icesquare.com\/wordpress\/dropbox-with-freebsd\/","url_meta":{"origin":2616,"position":1},"title":"Dropbox on FreeBSD","author":"Derrick","date":"June 6, 2016","format":false,"excerpt":"I put my personal websites on a FreeBSD server. One of my websites is a photo album, which I want to read the content from a Dropbox. That Dropbox primarily runs on Mac, iPhone and iPad. I was trying to explore the possibilities to set up a Dropbox on FreeBSD.\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/icesquare.com\/wordpress\/wp-content\/uploads\/2016\/06\/Dropbox_logo.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":923,"url":"https:\/\/icesquare.com\/wordpress\/freebsd-or-linux\/","url_meta":{"origin":2616,"position":2},"title":"FreeBSD or Linux in 6 Simple Questions","author":"Derrick","date":"February 18, 2016","format":false,"excerpt":"FreeBSD or Linux FreeBSD or Linux (Ubuntu\/RHEL)? This is a very old question. It's like asking iPhone or Android. There is no short answer. It all depends on your situation. To make things easier, I am going to break it down into six simple questions to help you making decision.\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2646,"url":"https:\/\/icesquare.com\/wordpress\/php-imagecreatefrompng-error\/","url_meta":{"origin":2616,"position":3},"title":"[PHP]imagecreatefrompng Error (After upgrading FreeBSD)","author":"Derrick","date":"January 25, 2012","format":false,"excerpt":"Today, I found that one of my PHP scripts stop working. After some investigations, I found that it was the function, imagecreatefrompng, which caused the problem. Interestingly, other similar functions such as imagecreatefromgif and imagecreatefromjpeg were completely working fine. The program stopped working when calling imagecreatefrompng only. [ad#adbrite-square] Initially, I\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3295,"url":"https:\/\/icesquare.com\/wordpress\/freebsdproblem-to-update-curl-7-31-0\/","url_meta":{"origin":2616,"position":4},"title":"[FreeBSD]Problem to Update cURL-7.31.0","author":"Derrick","date":"August 6, 2013","format":false,"excerpt":"When I tried to update the cURL to cURL 7.31.0 today for my FreeBSD, it stopped and gave the following error messages: configure: using CFLAGS: -O2 -pipe -DLDAP_DEPRECATED -fno-strict-aliasing configure: CFLAGS error: CFLAGS may only be used to specify C compiler flags, not macro definitions. Use CPPFLAGS for: -DLDAP_DEPRECATED configure:\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":500,"url":"https:\/\/icesquare.com\/wordpress\/installing-from-freebsd-ports-without-prompt\/","url_meta":{"origin":2616,"position":5},"title":"Installing from FreeBSD ports without prompt","author":"Derrick","date":"December 13, 2009","format":false,"excerpt":"When I configure my FreeBSD box, I like to install the applications from the ports instead of using pkg_add, because I can customize the configurations and optimize the compile process for my systems. However, if an application comes with lots of dependencies, it will take me a long time because\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"https:\/\/icesquare.com\/wordpress\/wp-content\/uploads\/2011\/09\/FreeBSDIcon.png","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2616"}],"version-history":[{"count":35,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2616\/revisions"}],"predecessor-version":[{"id":4127,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2616\/revisions\/4127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media\/1604"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}