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.

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.

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

# mv /boot/kernel/SMP /boot/kernel/kernel

remove the "bootfile="SMP"" line from /boot/loader.conf, and

reboot

before running the upgrade script. Note: This almost certainly
only affects people who used FreeBSD Update to obtain a FreeBSD 6.0 SMP
kernel.

Extract the tarball and run the script.

# tar -xzf upgrade-6.0-to-6.1.tgz
# cd upgrade && ./upgrade.sh

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.

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.