16.4. Saving, reusing your kernel configuration files

The kernel configuration is saved in the file /usr/src/linux/.config. It is highly recommended that you make a backup copy of this file, for example in the /root directory, so that you can not only reuse it later, but also save configurations for different kernels, as this is just a matter of giving different names to configuration files.

One possibility is to name configuration files after the kernel version. Say you have modified your kernel version as shown Configuring the kernel, then you can do:

$ cp .config /root/config-2.4.10-foo

If you decide to upgrade to 2.4.12 (for example), you will be able to reuse this file, as the differences between the configuration of these two kernels will be very small. Just use the backup copy:

$ cp /root/config-2.4.10-foo .config

But copying back the file doesn't mean that the kernel is ready to be compiled just yet. You have to invoke make menuconfig (or whatever else you chose to use) again, because some files needed in order for the compile to succeed are created and/or modified by these commands.

However, apart from the chore of going through all the menus again, you can possibly miss some interesting new option. You can avoid this by using make oldconfig. It has two advantages:

  1. it's fast,

  2. if a new option appears in the kernel and wasn't present in your configuration file, it will stop and wait for you to enter your choice.

Next, time for compilation.


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2001.
http://www.mandrakelinux.com/