## 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, the 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)](http://leaf.dragonflybsd.org/cgi/web-man?command=build§ion=7) manpage. **Note:** Use -j N to parallelize the build targets. We don't recommend -j N (and there is no need for it either) for the install targets. Example shown below. % sysctl hw.ncpu hw.ncpu: 2 % cd /usr/src % make -j 3 buildworld % make -j 3 buildkernel # make installkernel # make installworld # make upgrade # reboot **Note** Since 5.8 "make build-all install-all" replaces the previous 5 make lines adjusting automatically to the number of cpu cores where needed. An explanation of each step follows. * *make buildworld* : This command builds all userland programs; it is the most time-consuming step of the process. Some programs may be discarded from the build process. For more information, see [make.conf(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=make.conf§ion=ANY) manpage. * *make buildkernel* : This builds the kernel by default, it uses the config file for your architecture. You may also specify a different kernel configuration file using `KERNCONF=`. For more information, see [make.conf(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=make.conf§ion=ANY) manpage. * *make installkernel* This installs the kernel using the config file for your architecture; again, `KERNCONF=` 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 their proper places in the file system. * *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. They can also be found [online](http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/master:/UPDATING).