# Managing Kernel configs

## gentooP4

Hello everyone,

I have a question regarding kernel configs please.

For the last year I have been copying my .config file across for revisions (r1 r2 ,etc). For numerical version updates I have been rebuilding in menuconfig using some printouts off this forum that DONAHUE kindly provided after first downloading the relevant kernel seed (thanks Pappy). 

Now that I have a new PC, I have nothing to go off apart from the original .config I have built up through googling and trial and error. I don't really want to print it out and do it the hard way (unless I have to) so is there some way to put my original .config over a new kernel seed? Therefore getting the new default options from the seed while retaining my hardware specific settings.

I know I can answer Y/N using make oldconfig but the guide doesn't seem to recommend this. Maybe just for revisions?

Can anyone advise how they manage their system? I hoping there's an easier way out there than what I'm currently doing?

thanks!

----------

## gorkypl

After all the years of building the kernel I probably know most of the options, so I always do things by hand. That means 'make menuconfig' and going through all the submenus.

It isn't that hard, really, as most options are well-documented. And if you know what hardware you have (lspci -v is everything you need) it probably won't take longer than 2-3 hours on a new machine.

When upgrading a kernel on the same machine I just make a diff between .config.old and .config generated by make, so I can see what has changed between revisions and address only these changes. 

I also look at menuconfig few times a year - when I'm very bored - to see if there isn't anything left to be tweaked  :Smile: 

----------

## Spidey

diffing configs isn't basicaly what make oldconfig does?

Also, I find difficult to configure bus options, that always bugs me. Some inboard hardware too, like the HPET, RTC (this one is easy, CMOS all the way), AGP. This very week I had to activate AGP (agpgart) to access intel's core i3 internal graphics processor. That's very odd.

----------

## gorkypl

 *Spidey wrote:*   

> diffing configs isn't basicaly what make oldconfig does?

 

Yes, but I can see it as a whole, not one by one.

 *Spidey wrote:*   

> 
> 
> Also, I find difficult to configure bus options, that always bugs me. Some inboard hardware too, like the HPET, RTC (this one is easy, CMOS all the way), AGP. This very week I had to activate AGP (agpgart) to access intel's core i3 internal graphics processor. That's very odd.

 

Yes, HPET, RTC, I2C, I2O and similar are most painful, indeed  :Smile: 

----------

## depontius

I run genkernel, largely for laziness.  I can configure, kick it off, and go away.  When I come back, it's all done.

I manage my kernel configs myself.  After a build, I copy .config into /usr/src as "20120127-321.config".  The first 8 numbers are a date stamp, and the last 3 are the kernel version.  Also being lazy, I run "genkernel --xconfig all", and load the previous config as my starting point.  On some machines, I have years of configurations.  Sometimes if I'm experimenting I'll add "-experimentName" after the previously mentioned name.

----------

## gentooP4

 *gorkypl wrote:*   

> After all the years of building the kernel I probably know most of the options, so I always do things by hand. That means 'make menuconfig' and going through all the submenus.
> 
> It isn't that hard, really, as most options are well-documented. And if you know what hardware you have (lspci -v is everything you need) it probably won't take longer than 2-3 hours on a new machine.
> 
> When upgrading a kernel on the same machine I just make a diff between .config.old and .config generated by make, so I can see what has changed between revisions and address only these changes. 
> ...

 

Sounds like I'm doing it right then, as slow as it is.  :Smile: 

----------

## Bones McCracker

I copy my last .config file to the new kernel source dir and run 'make oldconfig'.  I do this regardless of what kind of release it is, and I've never had an issue.  I've been doing this for at least five years on four machines of differing architectures.

When I build, I run 'make && make modules_install && make install'.  The 'make install' puts a uniquely-named copy of the config file in /boot along with the matching kernel.  It also manages generically-named symlink to the most recent kernel built and the previous one, so you never have to mess with your bootloader config file (which can just refer to the symlinks).

I do, however, occasionally run 'make menuconfig', and go through and tweak things.

When I set up a new machine, I bring up menuconfig on a working, similar machine, then ssh into the new machine and bring up menuconfig for the new one (with a defconfig, kernel seed, or an old config file, depending on the situation), so I have them side-by-side in front of me.  Then I walk through it in the traditional, time-consuming fashion, but I have the old one there to refer to.  Some times I have more than one old menuconfig in front of me for reference.

Naturally, differently-purposed machines will have different configs (e.g. desktop, server, router, etc.) as will different architectures.  On top of that 2-dimensional matrix, you have a 3rd dimension, which is the evolution of hardware within that arch.  Then, within that, you've got machine-specific variations.  I think that ought to lend itself to some kind of database, but for my purposes, that would be over-kill.

I also find that thinks like the arch defconfigs and kernel seeds are still quite bloated and that I'm able to disable a lot of unnecessary stuff.  I've never used genkernel.

----------

## gentooP4

Excellent info there, thanks.

----------

