Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2012 13:24:05 +0200
From:      Polytropon <>
To:        Brett Glass <>
Subject:   Re: How to keep freebsd-update from trashing custom kernel?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, 12 Aug 2012 20:50:43 -0600, Brett Glass wrote:
> Everyone:
> Just ran freebsd-update (fetch, then install) on a system on which 
> I run a customized kernel, and discovered that it has overwritten 
> my custom kernel... even though I'd copied the original to 
> /boot/GENERIC when I first installed the system. I was under the 
> impression that creating /boot/GENERIC, and putting the GENERIC 
> kernel in it, would cause freebsd-update to update that directory 
> rather than one's custom kernel. I now must rebuild the kernel to 
> keep the machine working.

That seems to be the default behaviour, as freebsd-update is
not supposed to be used with a custom kernel. It works with
GENERIC kernels (because it updates them by overwriting).

> What went wrong, and how do stop it from recurring?

Nothing went wrong. :-)

Just an idea, not tested: Leave the GENERIC kernel updated
by freebsd-update, and put your own kernel unter a different
name into /boot, for example:

	/boot/kernel/kernel		<- GENERIC kernel
	/boot/mykernel/kernel		<- your kernel

Then change /boot/loader.conf to contain:


See /boot/defaults/loader.conf and "man loader.conf" for details.
I'm _not_ sure freebsd-update doesn't touch that file, but if
my assumption is correct, it won't, and it will therefore only
update /boot/kernel/ containing the GENERIC kernel that matches
your binarily updated world (so it's a good fallback kernel in
case of problems!), and you boot from /boot/mykernel which still
contains your untouched kernel.

However, what you're doing seems to be "not supported", but it
would be a shame if it was impossible. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Want to link to this message? Use this URL: <>