# Updating existing FreeBSD 11.0 Kernel, World



## economicpygmy (Mar 13, 2018)

I have a few questions regarding the process of updating an entire system after reading the FreeBSD manual and hacking my way through a few problems.
https://www.freebsd.org/doc/handbook/updating-upgrading.html

If I understand correctly:

kernel is the core operating system running in privileged mode.
world is the base system except kernel and not anything in /etc, /var and /usr
userland is a term to describe world (?)
packages and ports are both methods used to install the same applications to the same location.

*Updating Kernel and Userland*
I would like to update a FreeBSD box from 11.0 to the latest RELEASE. To determine the version I used:

```
# freebsd-version -k    show kernel version/revision.
# freebsd-version -u    show userland version/revision.
```

One issue is that the above display different versions, 11.1 for kernel and 11.0 for userland. I presume this is because the update has not completed.

From what I read the following process should be enough to update kernel/userland.

```
# freebsd-update fetch       1. - fetch updates   
# freebsd-update install     2. - updates the kernel
# shutdown -r now            3. - reboot
# freebsd-update install     4. - update userland
# freebsd-update install     5. - clean up
```

If this is incorrect; how many times and in what order should these commands be issued?
Presumably the above 5 steps would update to the latest RELEASE i.e. 11.1 and the following command is to upgrade to a specific version?

```
# freebsd-update -r 9.1-RELEASE upgrade
```


----------



## SirDice (Mar 13, 2018)

economicpygmy said:


> One issue is that the above display different versions, 11.1 for kernel and 11.0 for userland. I presume this is because the update has not completed.


Correct. It looks like `freebsd-update install` was ran only once. It will need to be run a couple of times.



economicpygmy said:


> If this is incorrect; how many times and in what order should these commands be issued?


It's correct, only the first command should be something like `freebsd-update -r 11.1-RELEASE upgrade` instead of `freebsd-update fetch`. The latter command only downloads patches for your current version. For those you don't need to run the install multiple times, once will suffice. It's only an _upgrade_ that requires the install part to be run multiple times.

Besides these minor details you appear to understand the process perfectly.


----------



## ShelLuser (Mar 13, 2018)

economicpygmy said:


> kernel is the core operating system running in privileged mode.
> world is the base system except kernel and not anything in /etc, /var and /usr
> userland is a term to describe world (?)
> packages and ports are both methods used to install the same applications to the same location.


World is the base system but that includes /etc, /var and /usr. Usually it's /usr/local where everything which is not part of the base system gets installed.

Userland is a description for the virtual environment where software gets executed outside kernel space. A process which runs within kernel space has far wider access than something outside of that, in userspace. For example: there's a huge difference if /bin/ls gets run as root or nobody. But that distinction does not exist within kernel space. As such.. userland.

Packages and ports... yes. The same location being /usr/local. The main difference between the two is that ports can be fully configured whereas packages always follow the default configuration.


----------

