Gentoo Archives: gentoo-user

From: fpemud <fpemud@×××××.com>
To: ott@×××××.org, gentoo-user@l.g.o
Subject: Re: [gentoo-user] Kernel configuration management
Date: Tue, 06 Nov 2012 22:44:48
Message-Id: 50999240.8050701@gmail.com
In Reply to: [gentoo-user] Kernel configuration management by Matthias-Christian Ott
1 On 11/07/2012 05:27 AM, Matthias-Christian Ott wrote:
2 > I'm planning to migrate several computers to Gentoo. At the moment I'm
3 > running two machines with ad-hoc kernel configurations based on the
4 > kernel configuration from the installation CD (which was created for
5 > 2.6.26). In order to keep the maintenance effort for the new machines
6 > low, I would like to have a unified/baseline kernel configuration with
7 > minor adjustments for some machines.
8 >
9 > I have been thinking about this for several weeks now and came to the
10 > conclusion, that there are two sub-problems: Creating a universal kernel
11 > configuration and merging and maintaining specific configurations with
12 > the baseline configuration.
13 >
14 > The second problem can be solved by simple concatenation and/or
15 > defconfigman, kccmp and make silentoldconfig. OpenWRT does this pretty
16 > much the same way.
17 >
18 > Creating the baseline configuration is much harder. So far I tried make
19 > defconfig, the installation CD configuration and kernel-seeds.org. None
20 > really satisfied my requirements and often resulted in ad-hoc changes
21 > when I simply went through a compile and reboot cycle until everything
22 > worked. I had a look at policies of other GNU/Linux distributions [1,2]
23 > and found that I need to develop or adopt a policy for my systems (the
24 > Ubuntu "modular where possible" policy seems reasonable to me and
25 > probably makes the curent ad-hoc configuration unnecessary). I also
26 > thought about reusing kernel configurations from other distributions,
27 > but have some doubts about kernel version mismatches (i.e. the kernel
28 > versions of Gentoo and the other distribution differ) and about
29 > unintended implications of kernel options that I don't fully understand.
30 >
31 > The mailing list archives show that this topic has been partly discussed
32 > before (especially whether Gentoo should have a default kernel
33 > configuration like other distributions), so I don't want to start a
34 > lengthy discussion about this here. I'm more interested in what other
35 > people do for larger deployments/installations on heterogeneous hardware.
36 >
37 > Regards,
38 > Matthias-Christian
39 >
40 > [1] https://wiki.ubuntu.com/Kernel/Dev/KernelConfig
41 > [2] https://wiki.linaro.org/KernelConfigPolicyDraft
42 >
43 >
44
45 I'm not an enterprise user, I use gentoo at home.
46 I have 4 computers to maintain, 2 workstations, 1 notebook, 1 htpc
47
48 I'm encountering the same problem.
49 all the machine have similar but different config (including the kernel
50 config).
51 remember and sync them costs me some time.
52 there's some tool to COPY config between machines, but none can deal
53 with SIMILARITY smoothly.
54
55 for the kernel config, I'm starting to write a
56 policy-based-dot-config-auto-generating tool.
57 the policy is like:
58 10-no-debug: Select "n" for any debug item, but with some exceptions
59 10-no-deprecate: Select n for any deprecated item, with exceptions
60 10-no-experimental: Select n for any experimental item, with exceptions
61 40-no-drv-rare: Select n for some rare driver i will never use
62 40-no-drv-with-deep-selects: select n for some driver that has too deep
63 selets
64 50-all-net: select all the item in "Network support"
65 60-mod-all-drv: select m for all the drivers, like ubuntu
66 70-yes-key-items: select y for some key items
67
68 every policy comprises code(python?) and data.
69 I think every user has to write his own policy, which means writing some
70 script, more work than writing config file, really.
71
72 For me, I will make all my machines share the same policy code, but have
73 different policy data.
74 Sync only the policy data is easier and clearer.
75
76 For you, I think the policy structure could be "policy code" + "global
77 policy data" + "adjustment policy data".
78 And another pro is you don't need to inspect the "unified/baseline
79 kernel configuration" between kernel version updates.
80
81 I'm starting to write a tool syncing other cfg between my machines
82 either, it's another topic.
83
84 relative links (this project really just starts):
85 https://github.com/fpemud/fpemud-buildkernel
86 https://github.com/ulfalizer/Kconfiglib
87 http://forums.gentoo.org/viewtopic-t-933726-highlight-fpemud.html