# Using your old kernel .config to configure a new one

## PhiJ

I would really like to use my old config to configure a new one, but the upgrade guide says it is a bad idea.  Every time I end up going through every option in the kernel config, and half of them I have to check to see if I need them (I don't know what most of them mean), but the instructions are okay, and most (all?) kernels that I have build have worked for me.  It's just too time consuming.  Make oldconfig is silly because you don't get the chance to find out what all the new options mean.

So I have an idea which is probably incredibly stupid and bad, but might be okay.  I thought I'd ask.

If I copy my old config into '/usr/src/linux/.config', and then run make menuconfig, it should display all the items which I haven't selected y/n/m for as NEW (does it?  It looks like it might)  I can then just look at what the new ones mean and make the changes.

I can, of course, see problems with this, like maybe the meaning of a config option will change slightly from revision to revision - if that happens it wont work at all.  Also I'll have to keep an eye out for DEPRECIATED tags.  And somehow note down which options I haven't selected because they are marked EXPERIMENTAL.

So would it work?

[Edit] Okay, so I've just realised that the kernel upgrade guide does say you can do this at the end, so I need to look harder, but the finer points of my question still stand, like will it always say NEW on the ones not in my config, can I do it between revision numbers without risking doing something stupid, and will menu options change their meaning slightly between revisions [/edit]

----------

## Section_8

I've been using make oldconfig for several years now with no major problems although sometimes options seem to move to diffierent sections and I have to track them down.  If you enter "?" at oldconfig's prompts for new kernel options, it gives you the same description you get in menuconfig.

----------

## albright

I confess to copying /proc/config.gz to my new

/usr/src/linux, copying the resulting config to

.config and going from there. I've only been bitten

a couple of times (IIRC, the switch to SATA was

... troublesome). For small kernel upgrades, it

seems OK. But I'm ready to be corrected  :Smile: 

----------

## krinn

personnally as a real lazy person i love 

make allmodconfig

then pickup my few criticals options i need (cpu type and disk driver so it will boot) and let udev do all the bad work for me.

if you don't care about kernel build time of course, but lazyness as its price.

free hint: make help, kernel build options are hide there.

----------

## swimmer

Just 

```
make oldconfig
```

after copying your current .config ...

----------

## platojones

As everyone else has said, as long as we aren't talking about a huge jump...'make oldconfig' is a very easy, clean way to upgrade your .config.  I always upgrade as soon as gentoo-sources does, and, using this method, I have never had a problem.  It's so simple...

----------

## hypernova2718

I've done the make menuconfig after copying the old .config file way for major version changes e.g. 2.6.26 to 2.6.27, and haven't had any problems so far.

----------

## pappy_mcfae

Using the terms "clean" and make oldconfig together in the same sentence is serious oxymoron in action. After a couple jumps from major version to major version, you pick up all kinds of mismatch errors. That is anything but clean. It works, but after a while, it's best to refresh your kernel with a more or less virgin kernel.

A part of your migration strategy has to also include make xconfig or make menuconfig to double check the settings. 

If you'd like, you can also check out one of my Kernel Seeds. They come configured for speed, stability, and consistency. Plug in your devices and you're on your way.

Blessed be!

Pappy

----------

## PhiJ

okay, I'll give it a go then.

One question though.  What's a mismatch error?  Is that when an old config option has been removed and isn't recognised by the new kernel compile attempt?

Wow /proc/config.gz looks like a really handy thing to know about.  'Specially when fixing other people's computers.  

Thanks for the help people!

----------

## pappy_mcfae

A mismatch error is where the .config has a setting that's not in it's proper place in the list. While this can be innocuous and more irritation than source of problems, sometimes the opposite happens. A bad setting gets locked in place, and stuck where it is. That can cause all kinds of problems...problems that can be difficult to trace. I've had that happen. So, now whenever I set up a new .config for my systems, I start with a Kernel Seed. Yes, I do use my own products.  :Smile: 

Hope that clears up the issue.

Blessed be!

Pappy

----------

