public inbox for gentoo-server@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-server] Kernel configuration management
@ 2012-11-06 21:27 Matthias-Christian Ott
  2012-11-23 12:28 ` Jean-Francois Maeyhieux
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias-Christian Ott @ 2012-11-06 21:27 UTC (permalink / raw
  To: gentoo-user, gentoo-server

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-server] Kernel configuration management
  2012-11-06 21:27 [gentoo-server] Kernel configuration management Matthias-Christian Ott
@ 2012-11-23 12:28 ` Jean-Francois Maeyhieux
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Francois Maeyhieux @ 2012-11-23 12:28 UTC (permalink / raw
  To: gentoo-server; +Cc: gentoo-user

Hello,


    kernel deployment is really a concern for our distribution.

I don't want be long on the topic but just give my own way.
I try to use the KISS principle as often as I could.
( http://en.wikipedia.org/wiki/KISS_principle)

So I just manage one kernel for all servers.

- I use no module at all: good for security and easy for deployment, no
initrd creation and problems related.
- I have just created manually (the big part) my first kernel with all
the options I wish now and in the future. I try to stay really minimal
on hardware support.
- If I get new hardware, I add to the configuration options for this
specific hardware. Even if it's not in use on all servers.

This way, update are easy, you could use oldconfig to upgrade kernel
version and deployment is just about scp kernel,system.map files.

Since I don't use modules, specific arguments are specified on the grub
boot command line.


Few advices to test your kernel:

1) use qemu to test your firsts kernel/grub boot
   (http://en.gentoo-wiki.com/wiki/Grub2#Verifying_.28qemu.29)
  This way you don't lost your time with kvmip or vnc to reconnect to
your server console to boot on a working kernel in case of boot failure.

2) use sys-apps/kexec-tools (http://en.gentoo-wiki.com/wiki/Kexec)

To don't wait time with BIOS/RAID/BOOTP init of your server once your
base kernel boot and you want adjust some options: make a new
configuration, compile it, deploy it (I use a script to chain everything
from oldconfig to deployment) and adjust kexec config file if needed
then reboot.
Kexec just replace the reboot sequence and permit to reboot on a new
kernel really quickly since it's bypass all BIOS/RAID/BOOTP
initializations by loading the new kernel and boot on it after an init
1.  (on my servers, reboot this way take about 30s instead of 4 minutes)



That's my 2 cents.

	Jean-Francois




On Tue, 2012-11-06 at 22:27 +0100, Matthias-Christian Ott wrote:
> 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
> 




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-23 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 21:27 [gentoo-server] Kernel configuration management Matthias-Christian Ott
2012-11-23 12:28 ` Jean-Francois Maeyhieux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox