Jump to content

Keeping your FreeBSD up to date


Recommended Posts

  • Premium

Hi guys,
 
Today I will show you how to keep your server up to date with the latest patches or upgrade to a new version. For this purpose, there exists a simple command line tool called freebsd-update.
 
Although many people consider updating their operating system a nuisance, you should be aware that there are vulnerabilities being published constantly for whichever Operating System you use, so update it with all the critical updates, be it your server or your PC at home.
 
Okay, now into the tutorial itself. First we will take a look at which are the currently supported releases of FreeBSD:

 

  • Production (Legacy) Release: Legacy release is 8.4 (launched in June 2013) - this means this is the oldest version supported at the moment. Older versions do not get updates or security patches so it's a good idea to keep your FreeBSD installation at this minimum version.
  • Production Release: The production release 9.3 (launched July 2014) is the recommended one as it's the release that the main development work is taking place on.
  • Upcoming Release: Release 10.1 (November 2014) is still quite experimental and introduces some important changes.

 
 
Installing the critical updates for your current version of FreeBSD
 
This action is, in theory, similar to running Windows Update in the Microsoft OS, or "yum update" in a RedHat/CentOs machine:

freebsd-update fetch install

Will download and install all the system and kernel updates for your current version of FreeBSD (Just press page down when you get a list of the installed files - pointing this out as some may get stuck at this point)
 
Upgrading to a newer version of FreeBSD
 
Upgrading to a newer release of FreeBSD, which we suppose should be better, is a bit more adventurous:

freebsd-update upgrade -r [release name]

Where [release name] is the name of the release you want to upgrade to. This is composed by the version number and the branch name (CURRENT, RELEASE or STABLE). I recommend choosing the RELEASE branch, so for example, if we wanted to upgrade our 8.1 installation to 8.4 we would use:

freebsd-update upgrade -r 8.4-RELEASE

Note a reboot will be required at the end to boot into the new kernel (and you may be instructed to run commands after the reboot as well). Pay attention to instructions on screen!
 
Three situations where beginners often get stuck here
 
A survival guide for FreeBSD upgrades

  • When asked if everything looks reasonable, pray and say yes
  • If a configuration file is displayed, you are in the vi editor (unless you changed your default editor, but then you probably don't need this guide). vi is an abomination of nature, so we will exit from it with :q!
  • If you are shown a long list of files, you are in the less text viewer, and you can exit and continue pressing these keys in order: '$
  • When you are asked to rebuild your ports, you can use pkg upgrade to just upgrade the binaries. Although I must confess I have no idea if this actually has the same effect, I haven't had any problems so far. If you really want to rebuild all ports you can do it this way:
     
    portsnap fetch update
    cd /usr/ports/ports-mgmt/portupgrade
    make install clean
    portupgrade -Raf
  • Love 9
Link to comment
Share on other sites

  • 5 weeks later...
  • 5 weeks later...
  • 6 months later...
  • 11 months later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.