Change wording a bit
[ikiwiki.git] / docs / newhandbook / Upgrading / index.mdwn
CommitLineData
4b333974 1## Updating the System
2
3### Supported methods
4
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.
9
10### Getting the source code
11
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 [...]
17
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).
19
20 % cd /usr/src
21 % git checkout DragonFly_RELEASE_3_0
22
23### Build and upgrade process
24
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)](http://leaf.dragonflybsd.org/cgi/web-man?command=build&section=ANY)** manpage.
26
27 % cd /usr/src
28 % make buildworld
29 % make buildkernel
30 % make installkernel
31 % make installworld
32 % make upgrade
33 (reboot)
34
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:
37<br>
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)](http://leaf.dragonflybsd.org/cgi/web-man?command=make.conf&section=ANY)** manpage.
47
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)](http://leaf.dragonflybsd.org/cgi/web-man?command=make.conf&section=ANY)** manpage.
49
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.
51
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.
53
54* <u>*make upgrade*</u> : This cleans out any files made unnecessary by this upgrade.
55
56* (reboot) : Reboot the computer to load the new kernel and use the new files installed as part of this process.
57
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](http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/master:/UPDATING)**