question about building a custom kernel

Bruce Cran bruce at
Sat Dec 19 23:33:11 UTC 2009

On Sat, 19 Dec 2009 14:46:27 -0500
"illoai at" <illoai at> wrote:

> You aren't going to gain much in speed or size savings, so
> do take care to understand what you hope to gain.  If you
> wish to shorten kernel compile times and reduce the size of
> /boot, have a look at the MODULES_OVERRIDE and
> WITHOUT_MODULES variables in /etc/make.conf.  That
> said, good luck, I haven't had any serious problems and I've
> been using custom kernels since FreeBSD 4.1 or so.

While I agree in principle that compiling a custom kernel isn't usually
worth it on modern machines, I recently gained a 65% disk space saving
over GENERIC by bulding a custom kernel. Granted that was achieved
because it's installed on a router with just 128MB RAM so I removed
things like wifi and usb support, opted for "device mii" and added the
PHY drivers I knew were used and added pf support, but it does show that
substantial savings are still possible.  Another reason for building a
custom kernel is to add functionality that isn't available through
modules, such as support for DTrace.

Bruce Cran

More information about the freebsd-questions mailing list