{"id":5,"date":"2007-01-29T15:51:44","date_gmt":"2007-01-29T21:51:44","guid":{"rendered":"http:\/\/www.goodjobsucking.com\/?p=5"},"modified":"2008-09-22T10:05:48","modified_gmt":"2008-09-22T16:05:48","slug":"freebsd-upgrade-from-55-to-62","status":"publish","type":"post","link":"http:\/\/www.goodjobsucking.com\/?p=5","title":{"rendered":"FreeBSD upgrade from 5.5 to 6.2"},"content":{"rendered":"<p>It&#8217;s finally time to upgrade FreeBSD on my main server, and there doesn&#8217;t appear to be a ton of information on how to do so using sources.  Although I successfully upgraded a FreeBSD workstation using binary methods, I have a mildly customized kernel on the main box, and I generally just prefer to use source\/CVS based updates, because that&#8217;s how I keep it up to date, anyway.<\/p>\n<p>Step 1:  Synchronize the source using a 6.2 cvsup file.<\/p>\n<blockquote><p>This file resides in \/usr\/share\/examples\/cvsup\/stable-supfile; the only thing one really needs to do is replace &#8220;RELENG_5&#8221; with &#8220;RELENG_6&#8221;, and then run<br \/>\ncvsup -g -h cvsup.freebsd.org \/usr\/share\/examples\/cvsup\/stable-supfile<\/p><\/blockquote>\n<p>Step 2:  Make buildworld<\/p>\n<blockquote><p>Go to \/usr\/src and type &#8220;make -j4 buildworld&#8221;. In my case, it died because a file it was trying to build (&#8220;lsof&#8221;) already existed.  I&#8217;m not sure why this would be so &#8212; perhaps I should have started with &#8220;make clean&#8221; &#8212; but simply deleting the file allowed it to move on and build everything.<\/p>\n<p>The &#8220;-j4&#8221; part is optional, but it speeds things up by using parallel builds, so I can&#8217;t think of a good reason why not to include it.<\/p><\/blockquote>\n<p>Step 3: Build the kernel<\/p>\n<blockquote><p>There are a number of ways to do it, but this works:<\/p>\n<pre class=\"SCREEN\">make buildkernel KERNCONF=<tt class=\"REPLACEABLE\"><em>MYKERNEL<\/em><\/tt><\/pre>\n<p>It doesn&#8217;t look like kernel options have changed all that much, so I&#8217;m leaving my 5.5 kernel configuration intact.  It appears to build without a hitch.<\/p><\/blockquote>\n<p>Step 4: Install the kernel<\/p>\n<blockquote><p>This part&#8217;s easy.  &#8220;make installkernel KERNCONF=MYKERNEL&#8221;<\/p><\/blockquote>\n<p>Step 5: Merge configuration files<\/p>\n<blockquote><p>This doesn&#8217;t appear to need to be done in single-user mode, and mostly includes adding the _dhcp user and group, and the audit user.  Start by running &#8220;mergemaster -p&#8221;<\/p><\/blockquote>\n<p>Step 6: Reboot into single user mode<\/p>\n<blockquote><p>Ideally, everything works at this point.  If not, you should still have your old kernel to fall back on.  You&#8217;ll need to mount all your mountpoints in order to take care of the next step.<\/p><\/blockquote>\n<p>Step 7: Install files<\/p>\n<blockquote><p>Also straightforward &#8212; &#8220;make installworld&#8221; from the \/usr\/src directory.  The most likely trouble you&#8217;ll run into is having failed to install a required user or group.  After this step, reboot.<\/p><\/blockquote>\n<p>Step 8:  Merge configurations<\/p>\n<blockquote><p>This is probably the most tedious part of the upgrade, and pretty easy to screw up badly.  To start, su &#8211; and run &#8220;mergemaster&#8221;.  This will attempt to merge the plethora of config files from your instance and from the new distribution.  As a general rule, you&#8217;ll want to go ahead and merge anything you haven&#8217;t touched, and pay careful attention to anything you have.  It&#8217;s easy to get on a roll and let it (for example) replace your mail &#8220;aliases&#8221; file, which, if you&#8217;ve neglected to back up, can be a complete mess.<\/p>\n<p>This is made somewhat more tedious by the fact that you have to approve every change, no matter how trivial.  I don&#8217;t think there&#8217;s an easy way around this.The kernel config will have told you where the kernel build directory is, as well as reminded you to do a make cleandepend; make depend.  After that, make and make install will get the kernel installed in the proper location.<\/p><\/blockquote>\n<p>Step 9:  Reboot (again)<\/p>\n<p>That should do it &#8212; it worked for me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s finally time to upgrade FreeBSD on my main server, and there doesn&#8217;t appear to be a ton of information on how to do so using sources. Although I successfully upgraded a FreeBSD workstation using binary methods, I have a mildly customized kernel on the main box, and I generally \u2026 <a class=\"continue-reading-link\" href=\"http:\/\/www.goodjobsucking.com\/?p=5\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts\/5"}],"collection":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5"}],"version-history":[{"count":2,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":78,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts\/5\/revisions\/78"}],"wp:attachment":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}