# Upgrade Procedure for Custom Kernel



## tuaris (Apr 12, 2013)

The FreeBSD handbook's section on the correct procedure on how to perform a major/minor version upgrade with a custom kernel is a little confusing.

http://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html

Under "Custom Kernels with FreeBSD 9.X and Later" it says to place the generic kernel under /boot/kernel.  So I build a new GENERIC kernel as suggested.

Further down under "Performing the Upgrade" it says to "set the kernel for the next boot to the updated /boot/GENERIC".

My confusion is when did /boot/GENERIC get updated or created? And should I run [cmd=]freebsd-update install[/cmd] before rebooting to a generic kernel?

Is this command necessary with FreeBSD 9.0?
`# nextboot -k GENERIC`


----------



## wblock@ (Apr 12, 2013)

I think you're right, it's not needed for FreeBSD 9.x.  When you build a kernel, it is installed in /boot/kernel by default.

I don't know the answer for sure, but would like to update the Handbook so it is correct.


----------



## jb_fvwm2 (Apr 12, 2013)

I was wondering about missing "installkernel" in /usr/src/UPDATING procedures... it seemed to have been omitted without explanation.  Maybe that file could be revised to include an explanation [Unless I am not understanding the issue fully..]


----------



## DutchDaemon (Apr 12, 2013)

Building a kernel ([cmd=]make build|installkernel[/cmd]) puts it in /boot/kernel. However, when combining a custom kernel with *freebsd-update*, /boot/GENERIC is used to contain the GENERIC kernel (from the binary update) and /boot/kernel to contain the hand-built custom kernel (so that freebsd-update does not overwrite it).

Or am _I_ confusing things here?


----------



## wblock@ (Apr 12, 2013)

The build procedure for FreeBSD 8:

`# env DESTDIR=/boot/GENERIC make kernel __MAKE_CONF=/dev/null SRCCONF=/dev/null`

So it writes the temporary GENERIC kernel into /boot/GENERIC.  Well, the subdirectories are moved later in that procedure, but that's the end result.

The FreeBSD 9 procedure--which was written by me, I admit--just builds GENERIC as normal, overwriting the custom kernel binary in /boot/kernel.  That seems okay to me; after an update, shouldn't a custom kernel be rebuilt anyway?

I updated the procedures after a bug report.  There was some feedback, but I don't use freebsd-update(8) and have not tested this.


----------



## manilaboy1vic (Jul 16, 2013)

Has this procedure been resolved? I am running a custom kernel on 9.1 but want to be able to update with freebsd-update. I copied GENERIC over to /boot.  What would I need to do in order to update to a minor revision then?


----------

