Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] Kernel configuration management

13 views
Skip to first unread message

Matthias-Christian Ott

unread,
Nov 6, 2012, 4:40:01 PM11/6/12
to
I'm planning to migrate several computers to Gentoo. At the moment I'm
running two machines with ad-hoc kernel configurations based on the
kernel configuration from the installation CD (which was created for
2.6.26). In order to keep the maintenance effort for the new machines
low, I would like to have a unified/baseline kernel configuration with
minor adjustments for some machines.

I have been thinking about this for several weeks now and came to the
conclusion, that there are two sub-problems: Creating a universal kernel
configuration and merging and maintaining specific configurations with
the baseline configuration.

The second problem can be solved by simple concatenation and/or
defconfigman, kccmp and make silentoldconfig. OpenWRT does this pretty
much the same way.

Creating the baseline configuration is much harder. So far I tried make
defconfig, the installation CD configuration and kernel-seeds.org. None
really satisfied my requirements and often resulted in ad-hoc changes
when I simply went through a compile and reboot cycle until everything
worked. I had a look at policies of other GNU/Linux distributions [1,2]
and found that I need to develop or adopt a policy for my systems (the
Ubuntu "modular where possible" policy seems reasonable to me and
probably makes the curent ad-hoc configuration unnecessary). I also
thought about reusing kernel configurations from other distributions,
but have some doubts about kernel version mismatches (i.e. the kernel
versions of Gentoo and the other distribution differ) and about
unintended implications of kernel options that I don't fully understand.

The mailing list archives show that this topic has been partly discussed
before (especially whether Gentoo should have a default kernel
configuration like other distributions), so I don't want to start a
lengthy discussion about this here. I'm more interested in what other
people do for larger deployments/installations on heterogeneous hardware.

Regards,
Matthias-Christian

[1] https://wiki.ubuntu.com/Kernel/Dev/KernelConfig
[2] https://wiki.linaro.org/KernelConfigPolicyDraft

fpemud

unread,
Nov 6, 2012, 5:50:01 PM11/6/12
to
I'm not an enterprise user, I use gentoo at home.
I have 4 computers to maintain, 2 workstations, 1 notebook, 1 htpc

I'm encountering the same problem.
all the machine have similar but different config (including the kernel config).
remember and sync them costs me some time.
there's some tool to COPY config between machines, but none can deal with SIMILARITY smoothly.

for the kernel config, I'm starting to write a policy-based-dot-config-auto-generating tool.
the policy is like:
10-no-debug: Select "n" for any debug item, but with some exceptions
10-no-deprecate: Select n for any deprecated item, with exceptions
10-no-experimental: Select n for any experimental item, with exceptions
40-no-drv-rare: Select n for some rare driver i will never use
40-no-drv-with-deep-selects: select n for some driver that has too deep selets
50-all-net: select all the item in "Network support"
60-mod-all-drv: select m for all the drivers, like ubuntu
70-yes-key-items: select y for some key items

every policy comprises code(python?) and data.
I think every user has to write his own policy, which means writing some script, more work than writing config file, really.

For me, I will make all my machines share the same policy code, but have different policy data.
Sync only the policy data is easier and clearer.

For you, I think the policy structure could be "policy code" + "global policy data" + "adjustment policy data".
And another pro is you don't need to inspect the "unified/baseline kernel configuration" between kernel version updates.

I'm starting to write a tool syncing other cfg between my machines either, it's another topic.

relative links (this project really just starts):
https://github.com/fpemud/fpemud-buildkernel
https://github.com/ulfalizer/Kconfiglib
http://forums.gentoo.org/viewtopic-t-933726-highlight-fpemud.html

cov...@ccs.covici.com

unread,
Nov 6, 2012, 6:50:02 PM11/6/12
to
Well, I have most things in modules and a lot of them, I don't have the
hardware for, but it was very handy when I was able to take my configs
over to a vm from regular hardware and it booted up right away. I am
also using an initrd.

HOpe that helps.

--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
cov...@ccs.covici.com
0 new messages