FreeBSD Update

Written by Michael Cole - August 13th 2015

I've been sick for a while, and then the rest of my family got sick, so posting has not been the main priority. But I'm back now. Today also happens to be a pretty big day for FreeBSD. FreeBSD 10.2 was released, so this will be my first big upgrade ever for FreeBSD.

Remember to always backup when doing updates. ZFS snapshots are great too. But especially if your data is important take every step possible to ensure your data is safe and recoverable when doing any major change.

Warning out of the way. The process was pretty simple overall. First I ran:

freebsd-update -r 10.2-RELEASE upgrade

It went ahead and did its thing. It showed me what appeared to be installed and what didn't (as in src, etc). So I hit yes, and it continued to do its output. Eventually it returned to a prompt. I then did:

freebsd-update install

It started the install and eventually completed. I then rebooted the system. freebsd update installs the kernel first and then once you boot the new kernel, you type:

freebsd-update install

again to resume/complete the install.

With that all done it was time for packages. I use all binaries so it was a simple matter of running:

pkg-static upgrade -f

This basically re-installed all the packages I had installed. That seemed to go well and all configuration seemed intact.

Now, because I am running jails with iocage, my adventure is not over, they need to be updated.

If you type iocage upgrade which will update the jail to the same version of as the host machine, you will see a message saying it can't update, because the release is missing and to run a fetch first. So I ran:

iocage fetch

And selected: 10.2-RELEASE

Then I ran:

iocage upgrade **jail name**

for all my jails. This takes a while.

Then I force upgraded all the packages in the jail. Which is the same as it was on the host machine.

It all seemed to work really well. iocage makes snapshots, don't forget to remove those when they are no longer needed.

I did notice that the packages downgraded in some cases. It looks like the FreeBSD binaries were compiled a while ago for 10.2. I guess that makes sense, as everything would need to be compiled from ports and tested to some degree. That should correct itself when the compile the new binaries for 10.2. It still seems a like a bad thing, but at least everything is working.

Update - August 13th 2015

I figured out why things were downgrading. In FreeBSD 10.2 they switched to quarterly updates for stability purposes instead of following the latest packages, which could lead to breakage. The problem is that I have a media server running plex and an iOS device that just got a new version of the plex app. It will not connect to older versions of the server. In either case the fix to make a jail, or even your main FreeBSD box download the latest like it did previously is run:

mkdir -p /usr/local/etc/pkg/repos 
echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf 

That will disable the default quarterly updates. Then add:

FreeBSDLatest: { 
             url: "pkg+${ABI}/latest", 
             mirror_type: "srv", 
             signature_type: "none", 
             fingerprints: "/usr/share/keys/pkg", 
             enabled: yes 

Now do a:

pkg upgrade -f

And boom, you are following the latest packages again.