Chapter 11. Binary Upgrade

Table of Contents
11.1. Preparation
11.2. Getting started
11.3. Decide what to upgrade
11.4. Mount existing partitions
11.5. Upgrade backup locations
11.6. Choose media
11.7. After the upgrade
11.8. Using freebsd-update
11.9. FreeBSD Snapshots

11.1. Preparation

This article is a walkthrough with screenshots for a binary upgrade of an older version of FreeBSD using sysinstall(8).

11.1.1. Sysinstall version

These notes assume that you are using the version of sysinstall(8) supplied with the version of FreeBSD to which you intend to upgrade.

WarningUsing a mismatched version of sysinstall(8) is almost guaranteed to cause problems and has been known to leave systems in an unusable state. The most commonly made mistake in this regard is the use of an old copy of sysinstall(8) from an existing installation to upgrade to a newer version of FreeBSD. This is not recommended.

11.1.2. Backup your data

Several tasks need to be performed on the existing installation before you start the upgrade process. Of course, you should always have important data backed up.

WarningThere is always a chance that data could be lost in the event of an unsuccessful upgrade. It is recommended that proper backups of data be made before you begin. We can not be responsible for lost data.

11.1.3. Verify disk partitioning

You will need to know how your disk is partitioned in order to mount them properly during the upgrade. Use mount(8) to determine the mount points:

% mount
/dev/ad0s1a on / (ufs, local)
/dev/ad0s1f on /usr (ufs, local)
/dev/ad0s1e on /var (ufs, local)
procfs on /proc (procfs, local)

Make a note of where each filesystem is mounted.

11.1.4. Remove existing sources

If you do not have the sources installed, this step can be skipped.

Sysinstall will not install new sources during the upgrade if /usr/src exists. In order to build a custom kernel later that is synchronized with the rest of the system, new sources are required. If the old sources are not removed, the following error will display:

                            Message
Warning: /usr/src exists and sources were selected as upgrade
targets.  Unfortunately, this is not the way to upgrade your
sources - please use CTM or CVSup or some other method which
handles "deletion events', unlike this particular feature.

Your existing /usr/src will not be affected by this upgrade.

                            [ OK ]
                   [ Press enter or space ]

If you have a custom kernel configuration file in /usr/src/sys/i386/conf/, it should be copied to some location that will be preserved during the upgrade. Some location in the /usr directory would work:

# mv /usr/src/sys/i386/conf/MYKERNEL /usr/home/someusername/MYKERNEL

After you have backed up anything in the sources that you wish to save, then remove the existing sources:

# rm -rf /usr/src

11.1.5. Remove the existing ports tree

If you are using cvsup or some other means to keep your ports tree updated, this step should be skipped.

You may wish to preserve files in /usr/ports/distfiles by moving them to a location which will not be affected by the upgrade.

If you want to install the ports tree associated with the release, the existing ports tree should be removed:

# rm -rf /usr/ports