FreeBSD Upgrade to new release

  FreeBSD

I’m still learning about this, but here are my latest instructions that seem to work well for me.
I am going to show you how to upgrade from a 10.0 to 10.1 release.

You can check what you are running by –
uname -a
Firstly, we need to upgrade to the latest version we are using. I do this by the simple –
freebsd-update fetch
then –
freebsd-update install
reboot

Now, we are using the latest 10.0 (EOL in March 2015).
To perform a new release upgrade, we need to run the following command –

freebsd-update -r 10.1-RELEASE upgrade
This will take a while, depending on what you have installed on your machine. I run mailscanner and sendmail and a bunch of tools to filter spam etc. I would say mine takes about 20 minutes.
You will need to accept the changes.

When this finishes it will go through some file changes, from the 10.0 system to the new 10.1 system. You should delete the 10.0 stuff and keep the 10.1 stuff. Make sure you remove any instances of <<<< and >>>> or when you bring the system back up, your services, like sendmail etc, will complain. It’s not a problem, as you can rebuild them, but it might save you some time to make sure the files are correct in the first place.

Once this is complete, run the following command –
freebsd-update install

Then;

reboot

Once the machine comes back up, you will need to run the install command again –
freebsd-update install

At this point, you need to upgrade all your ports and pkg’s. BUT, before you do that, you should read the UPDATING file –
less /usr/ports/UPDATING

I start with my ports, so –

cd /usr/ports
portsnap fetch extract
cd /usr/ports/ports-mgmt/portmaster
make install clean

I then use portmaster to update all ports and there is a bunch of ways you can do this. I like the following command, as I like to see what’s going on –

portmaster -af
You can give it more options, for example -G command prevents all the config options from displaying, but again I need these so I can check I have everything set properly.

If you have packages, then you can run the following command to update these also –

pkg-static upgrade -f

But you might want to upgrade pkg, if you haven’t done so already, to pkgng –

cd /usr/ports/ports-mgmt/pkg
make
make install clean
pkg2ng

Once you are happy, you’ll need to finish off by running the install command for the final time –

freebsd-update install
reboot

When the machine comes back you can run
uname -a

And you should see your new 10.1 release!

Thanks!

LEAVE A COMMENT