# [solved] Kernel built, how to find out its menuconfig

## africola

Hi,

I built some kernels last night. With different configurations in menuconfig.

I saved the kernels, but only the first one is working. Now. I want to find out, what its configuration was?

Here are some questions:

1.How can I find out now, how my menuconfig was in the first, second and third build?

2.What does make clean do, after I built a kernel. Is it only for cleaning up ""prepared data" of the last kernel compilation process?

3.If I save my menuconfig, will the saved data be uses for the next kernel compilation with make every time? Or can I reset this data to my first built (where everything worked fine)? [Im not sure, but I think that the save and load option in the menuconfig menu will do what I want for next time, but for my first kernels, I did not saved them manually, I left the application only with autosaving]

4.Can I reverse engineer a menuconfig configuration, if I receive one kernel by downloading? Is there a way out there so do this?Last edited by africola on Sat Sep 11, 2010 11:04 am; edited 1 time in total

----------

## ruivilela

1. The options selected that appear on 'make menuconfig' are read from '.config' file that is hidden. You can not see how it was before. You should save it. You have to take care of it.

There is a chance that you have the config on your boot dir. If you enabled the option on kernel

2. make clean. I only use it for saving space. Kernel sources really takes a lot of space in smaller disks.

3. When you compile other kernel. He will try to fetch the configuration of the previous (not sure how). But there is some parameters in general config. of kernel that allows you to save a copy of the running kernel to /proc. Just copy the .config file and everything will be ok.

4. Menuconfig is only a interface to configure the kernel (there are others). The .config file is the most important. Sometimes I simple copy a .config to a newer kernel. Some parameters are gone others need to be set because they are newer.

I usually only update the kernel if there is a serious security issue (like root access exploit), or a nice feature that was missing, or when is already too old (2.6.31->2.6.35).

----------

## africola

shit  :Smile: 

ok, have to be more careful next time.

thank u.

solved

----------

## krinn

https://forums.gentoo.org/viewtopic-t-812252-start-0-postdays-0-postorder-asc-highlight-sea.html

look for chapter 7

----------

## Hu

 *africola wrote:*   

> 1.How can I find out now, how my menuconfig was in the first, second and third build?

 Look at the corresponding config file that was copied to the output directory when you ran make install.  If you set CONFIG_IKCONFIG=y, then the configuration is also embedded in the kernel and can be extracted using scripts/extract-ikconfig.

 *africola wrote:*   

> 2.What does make clean do, after I built a kernel. Is it only for cleaning up ""prepared data" of the last kernel compilation process?

 It cleans out built files.  The configuration itself is a form of prepared data, but is not removed by make clean.  Use make mrproper for an even cleaner build area.  This will delete .config.

 *africola wrote:*   

> 3.If I save my menuconfig, will the saved data be uses for the next kernel compilation with make every time?

 By default, menuconfig saves its results in a file named .config.  By default, this file is used to drive the build.  You are welcome to save configurations to other names via menuconfig or by copying the generated .config elsewhere.  You can also build the kernel from an alternate configuration, but most people do not bother.  Deleting .config should reset you to the default state.

 *africola wrote:*   

> 4.Can I reverse engineer a menuconfig configuration, if I receive one kernel by downloading? Is there a way out there so do this?

 Yes, if it was built with CONFIG_IKCONFIG=y.

 *ruivilela wrote:*   

> There is a chance that you have the config on your boot dir. If you enabled the option on kernel

 The configuration should always be copied as part of make install.  It may also be present inside the kernel if the configuration requested that.

----------

