Upgrading
Updating the System
Supported methods
The only supported method of upgrading DragonFly BSD is by building from source code. The supported upgrade process includes going from the previous release to latest release.
Getting the source code
There is a Makefile in /usr which will ease the task of retrieving the source tree; it needs to be run as root:
# cd /usr
# make src-create
[...]
This will check out (download) the source tree to /usr/src
and switch to the master branch. For the stable branch, you need to check it out with the following command (remember to replace the DragonFly_RELEASE_X_X with the appropriate branch name for the release needed).
% cd /usr/src
% git checkout DragonFly_RELEASE_X_X
To see the available remote branches:
# cd /usr/src
# git pull
# git branch -r
The leading edge (development trunk) version of the system will be the "master".
Build and upgrade process
The build process requires some time to build all the userland programs and the DragonFly BSD kernel. Once built, all remaining steps tend to go pretty quickly. No configuration files in /etc are changed by this process. More details can be found in build(7) manpage.
% cd /usr/src
% make build-all
% make install-all
% sync
% reboot
If your computer fails to boot the new kernel, you can always select 'Boot DragonFly using kernel.old' in the loader menu, so that the old kernel is loaded instead of the new one. The 'sync' is not required, but its usually a good idea (me putting my sysadmin hat on), just to make sure the filesystem is flushed before any
Once you have rebooted, if you built a major release change from your current release, you probably need to completely upgrade your packages, which you do as follows. Its usually a good idea to reboot once more afterwords, and make sure everything works as intended. When doing a major release change, the pkg upgrade operation will probably have to download all the packages so this will depend on your network speed.
% pkg upgrade -f
% sync
% reboot
Additional upgrading instructions can be found in /usr/src/UPDATING in the source tree. They can also be found online.