Custom kernel and freebsd-update world (same minor version)

Hi there,

I have a webserver in production to which I have no physical access nor KVM (but can netboot to rescue mode) so I am a bit cautious about compiling kernel and especially world from source. Finally I have to do it since I absolutely need ALTQ.

How necessary is it really to buildworld in addition to buildkernel when staying on the same minor version?

Is it possible to only buildkernel and then get away with freebsd-update for world? (supposing that the kernel update part will just fail on a custom kernel)

My install/upgrade path to date:

Install 9.1 RELEASE p0
freebsd-update to 9.1-RELEASE-p5

I realise that I should to get to grips with this some day although I would probably go for a parallel new server install for any major version update.

Cheers
 
I don't quite get why you are afraid of doing buildworld/ installworld when you are still ready to "jump off a cliff" with buildkernel/ installkernel. Both are equally dangerous if something goes wrong. I would in your place just do the full source based install cycle for both world and kernel, doing the update/upgrade the recommended way minimises the chanches of triggering a hidden problem in the update tools that could render your system unbootable.
 
Doing only a buildkernel/ installkernel to use a custom kernel configuration works fine for me. I update the rest of the system using freebsd-update. The only thing to look out for is, starting with 9.0, freebsd-update will overwrite your custom kernel! So after running freebsd-update, you need to run a make buildkernel/ installkernel.
 
As far as I know, freebsd-update will always replace the kernel (/boot/kernel/kernel) when it needs to, whether it is a generic or a custom kernel. If you're running a custom kernel, you're supposed to rebuild and install that kernel right after the update, using the sources that freebsd-update installed. That's not new.
 
Thanks for the answers.

@kpa, you have a point there and I jumped in following the handbook but skipped single user mode. Instead I disabled as many services as possible. That went fine even if buildworld is going to be quite a pain for each patch level even on a big system. The kernel overhead for ALTQ seems to be peanuts. It is a pity it is not included by default. pfctl -nvf /etc/pf.conf could simply croak if the driver is not yet supported.

@adri, I might fall back to that option although admittedly the upgrade path should be make buildworld/ buildkernel/ installkernel/ reboot/ installworld. So that the kernel is built on a possibly updated compiler. Which is what DutchDaemon is saying too. The risk I see is rebooting all the changes at once instead of doing just kernel first.

BTW, maybe editing /etc/freebsd-update.conf would avoid overwriting?
Code:
# Components of the base system which should be kept updated.
Components src world
 
Last edited by a moderator:
Back
Top