Change wording a bit
[ikiwiki.git] / docs / newhandbook / Upgrading / index.mdwn
4b333974 1## Updating the System
3### Supported methods
b574990b 5The only **supported** method of upgrading DragonFly BSD is by building from source code. <br><br>
6Supported upgrade process includes going from the *previous release* to *latest release*.<br>
4b333974 7
8For example, in our actual case, only the upgrade process involving <u>2.10.x up to 3.0.x</u> would be supported.
10### Getting the source code
b574990b 12There is a Makefile in /usr which will ease the task of retrieving the source tree; it needs to be run as root:
4b333974 13
14 % cd /usr
15 % make src-create
16 [...]
18And 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).
20 % cd /usr/src
21 % git checkout DragonFly_RELEASE_3_0
23### Build and upgrade process
25Build 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.
27 % cd /usr/src
28 % make buildworld
29 % make buildkernel
30 % make installkernel
31 % make installworld
32 % make upgrade
33 (reboot)
338dede9 35**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. <br>
36If 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:
4b333974 38
338dede9 39 % sysctl hw.ncpu
40 hw.ncpu: 2
4b333974 41
338dede9 42An explanation of each step follows.
4b333974 43
44* <u>*make buildworld*</u> : This command builds all userland programs and it is the most time-consuming step.<br>
45Some programs may be discarded from the build process.<br>
46For more details check **[make.conf(5)](** manpage.
48* <u>*make buildkernel*</u> : 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.
50* <u>*make installkernel*</u> This installs the kernel using the config file for your architecture or KERNCONF=file can be used to specify which one to install.
52* <u>*make installworld*</u> : 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.
54* <u>*make upgrade*</u> : This cleans out any files made unnecessary by this upgrade.
56* (reboot) : Reboot the computer to load the new kernel and use the new files installed as part of this process.
338dede9 58If 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.
4b333974 59
338dede9 60Additional upgrading instructions can be found in */usr/src/UPDATING* in the source tree. Online it can be found **[here](**