Updating the System
The only supported method of upgrading DragonFly BSD is by building from source code.
Supported upgrade process includes going from the previous release to latest release.
For example, in our actual case, only the upgrade process involving 2.10.x up to 3.0.x would be supported.
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 [...]
And that will effectively checkout the source tree on
/usr/src and switch to master branch. For stable branch you need to check it out with the following command (remember to replace the DragonFly_RELEASE_3_0 with the appropriate branch name for the release needed).
% cd /usr/src % git checkout DragonFly_RELEASE_3_0
Build and upgrade process
Build process requires some time to build all the userland programs and the DragonFly BSD kernel. Once built, next step is to install everything and make the upgrade target. No configuration files in /etc are changed by this process. More details can be found in build(7) manpage.
% cd /usr/src % make buildworld % make buildkernel % make installkernel % make installworld % make upgrade (reboot)
Note: You may use a concurrent build if you have a SMP (a machine with several cores or CPUs). You may specify -j x parameter to make where x is the number of CPUs + 1.
If you run DragonFly 2.12 or higher the kernel will auto-detect the number of CPUs your computer has and activate them all if possible. To find out how many CPUs your computer has:
% sysctl hw.ncpu hw.ncpu: 2
An explanation of each step follows.
make buildworld : This command builds all userland programs and it is the most time-consuming step.
Some programs may be discarded from the build process.
For more details check make.conf(5) manpage.
make buildkernel : This builds the kernel using the config file by default for your architecture. You may also specify a different kernel configuration file using KERNCONF=configfile. More details on make.conf(5) manpage.
make installkernel This installs the kernel using the config file for your architecture or KERNCONF=file can be used to specify which one to install.
make installworld : This copies all the files built in the buildworld step (i.e. everything that is not the kernel) to the proper places in the filesystem.
make upgrade : This cleans out any files made unnecessary by this upgrade.
(reboot) : Reboot the computer to load the new kernel and use the new files installed as part of this process.
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.
Additional upgrading instructions can be found in /usr/src/UPDATING in the source tree. Online it can be found here