FreeBSD 6.0 to FreeBSD 6.1 binary upgrade

In the course of my work on FreeBSD Update and other security-related FreeBSD development, I realized that I had accumulated most of the bits (both code and data) which I would need to construct a very easy-to-use script for performing binary upgrades between FreeBSD versions.

In the past I have provided instructions on performing a binary upgrade from FreeBSD 4.8 to FreeBSD 4.11, a binary upgrade from FreeBSD 5.3 to FreeBSD 5.4, and a binary upgrade from FreeBSD 5.4 to FreeBSD 6.0, but they have all involved multiple steps and some understanding on the part of the user. Using my newly written script should make FreeBSD 6.0 to FreeBSD 6.1 upgrades a bit easier; and since this script uses patches generated by bsdiff it uses far less bandwidth -- around 15-20MB, compared to 650MB for downloading a complete release ISO image.

Note that this script only works for the i386 platform. It will refuse to run on alpha, amd64, pc98, or sparc64 systems.

  1. As root, download the script and check that it has the right hash:

    # cd /usr/
    # fetch
    # sha256 upgrade-6.0-to-6.1.tgz
    The hash displayed should be 29075fc5711e0b20d879c69d12bbe5414c1c56d597c8116da7acc0d291116d2f.

    Note: This script needs quite a lot of disk space (anywhere from a couple hundred MB to almost a GB, depending upon which parts of FreeBSD you have installed), so if you decide not to download and extract it in /usr/, make sure you pick somewhere which has lots of free space.

  2. UPDATE, 2006-07-03: If you are running an SMP kernel located in /boot/kernel/SMP, the upgrade script will refuse to upgrade your system (it expects the kernel to be /boot/kernel/kernel). Assuming you want to have an SMP kernel installed, you should before running the upgrade script. Note: This almost certainly only affects people who used FreeBSD Update to obtain a FreeBSD 6.0 SMP kernel.
  3. Extract the tarball and run the script.

    # tar -xzf upgrade-6.0-to-6.1.tgz
    # cd upgrade && ./
  4. Follow the instructions provided by the script. You will be asked to confirm that what the script plans to do looks reasonable -- it is very unlikely that the script will get anything wrong, but you should read its plans before telling it to go ahead.

    If the script has trouble merging your configuration files with changes which occurred between FreeBSD 6.0 and FreeBSD 6.1, it will ask you to perform the merge manually. This isn't likely to happen unless you've modified lots of files in /etc which people don't often touch.

  5. When the script finishes, you can delete /usr/upgrade-6.0-to-6.1.tgz and everything in /usr/upgrade and reboot into FreeBSD 6.1-RELEASE. I recommend using FreeBSD Update to apply security updates once you've done this, but you must reboot before running FreeBSD Update on your newly upgraded system.