Current Gentoo user

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Dec 27 03:06:16 PST 2007


On 2007-12-13 12:35, Grant <emailgrant at gmail.com> wrote:
>> After two years using Gentoo, after the first very positive
>> impression, I'm a bit tired of breaking things due to updating one
>> port.  It's also too much of a pain reconfiguring and recompiling the
>> Linux kernel.
> 
> Configuring the kernel with menuconfig is a pain.  How is it handled
> differently with FreeBSD?

We use flat text files, like `GENERIC'.  They are stored in a well
documented, standard place inside the kernel source tree, at the
`/usr/src/sys/${ARCH}/conf' directory, where `ARCH' is one of `i386',
`amd64' or another supported architecture.

All the kernel options and their dependencies are documented in a set of
plain text, easy to skim through, files:

    /usr/src/sys/conf/NOTES           # Machine independent options
    /usr/src/sys/i386/conf/NOTES      # Machine-dependent options (i386 platform)

You can either copy `GENERIC' and tweak its options, or create a minimal
kernel config file called `KERAMIDA' which contains just the text:

    include GENERIC		# Use the `GENERIC' kernel for defaults
    ident KERAMIDA		# Custom/local kernel identifier
    nooption SCHED_4BSD		# Disable the 4BSD scheduler.
    option SCHED_ULE		# Enable the ULE scheduler.

That's it.  With this short kernel config file you are building a custom
kernel which uses the `ULE' scheduler by default.  To build in a clean
checkout of the FreeBSD source tree, all it takes is[1]:

    # cd /usr/src
    # make KERNCONF='KERAMIDA' buildkernel

[1] There may be a few more steps if you are often building new kernel
and userland snapshots, but they are clearly documented in a plain text
file called `/usr/src/UPDATING' --- conveniently placed in the toplevel
directory of the source tree.

I personally find this way of working *MUCH* easier than having to
navigate a dozen sublevels of a menu, but YMMV.

>> Perhaps it's my lack of experience.  On FreeBSD, you can compile the
>> kernel every day with no trouble at all, even the whole base system
>> weekly, if you're so inclined. I can't be objective, but I think in
>> this respect FreeBSD is much, much, much better.
> 
> Can you tell me more about what you mean here?  How is it much better?
> Easier kernel management?

All the information you need to rebuild the full userland *and* kernel
of the FreeBSD base system is described in `/usr/src/UPDATING'.  That's
not all there is, however.  The FreeBSD Handbook includes a wealth of
documentation about the same process too, including a fairly detailed
description of the steps documented in `/usr/src/uPDATING'.

There is a *lot* of standard documentation and information describing
how to rebuild the base system of FreeBSD from source.  What is even
more amazing, and intriguing about FreeBSD is that the precise steps to
perform an upgrade have changed *very* *little* since the days of my
first adventures into BSD-land.  There are only minimal changes, if any,
to the upgrade process since FreeBSD 3.2 was released more than a decade
ago...  This stability of `interface' is amazing, and it's what keeps me
thrilled with FreeBSD ever since :-)

- Giorgos



More information about the freebsd-advocacy mailing list