# Questions about freebsd-update



## robE (Feb 23, 2016)

I am still relatively new to FreeBSD so I hope this is not a dumb question.  I was running 10.2-RELEASE-p9 and after running `freebsd-update fetch` I was told that I can upgrade to 10.2-RELEASE-p12.  However if I run the upgrade I encounter problems.


```
# freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 10.2-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files will be updated as part of updating to 10.2-RELEASE-p12:
/boot/kernel/kernel
# freebsd-update -r 10.2-RELEASE-p12 upgrade
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 10.2-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic src/src world/base world/doc world/games world/lib32

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)? y

Fetching metadata signature for 10.2-RELEASE-p12 from update4.freebsd.org... failed.
Fetching metadata signature for 10.2-RELEASE-p12 from update6.freebsd.org... failed.
Fetching metadata signature for 10.2-RELEASE-p12 from update5.freebsd.org... failed.
Fetching metadata signature for 10.2-RELEASE-p12 from update3.freebsd.org... failed.
No mirrors remaining, giving up.
```

I have been having this problem for a while now and after doing some reading I figured maybe I should make sure I have a proper GENERIC kernel to be upgraded.  I updated the source and recompiled the kernel from the instructions in the handbook.  After doing this I still receive the same error.  I finally was able to get it to install by running `freebsd-update install` and it booted into the new p12 kernel.  Just to check I tried running another `freebsd-update fetch` and it said I still had updates.  This time when I install and reboot I am back into the 10.2-RELEASE-p9 kernel. 


```
# freebsd-version -k -u
10.2-RELEASE-p9
10.2-RELEASE-p12
```

To check if I was loading the correct kernel I did this.


```
find /boot | xargs grep 10.2-RELEASE-p12
Binary file /boot/kernel.old/kernel matches
```

Ok, so I figured I didn't load the correct kernel.  I rebooted into the new kernel and confirmed this.


```
# freebsd-version -k -u
10.2-RELEASE-p12
10.2-RELEASE-p12
```

Running `freebsd-update fetch` again shows updates and if it is ran successfully I am right back where I started at p9.  What exactly am I doing wrong and why does it keep downgrading to p9 after I am at p12?  Also is using the `freebsd-update upgrade -r` the correct way to do this?  I have upgraded PCBSD systems in the past using this method and it usually worked.  Any help or insight is greatly appreciated.


----------



## SirDice (Feb 24, 2016)

No, `freebsd-update -r <version> upgrade` is for upgrading from 10.1 to 10.2 for example. You use it to upgrade from one version to another. You need a `freebsd-update fetch` followed by `freebsd-update install`. Or in one go `freebsd-update fetch install`.


----------



## cpm@ (Mar 3, 2016)

Note that /usr/src was updated by freebsd-update(8), so it would be a good time to build a fresh copy of your own kernel.

Read 8.5. Building and Installing a Custom Kernel.


----------

