# [SOLVED] How to change settings in Kernel?

## vcmota

I have a question which looks simple to me but I did not find anything on it in the documentation... 

I have compliled my kernel without the proper selinux settings indicated here https://wiki.gentoo.org/wiki/SELinux/Installation and without the proper iptables settings indicated here https://wiki.gentoo.org/wiki/Iptables#Kernel. However I am more than happy with all the other settings, which took some time and a lot of reading of the documentation to set in the manual configuration (make menuconfig). In other words except for Selinux and Iptables I have successfully costumized my Gentoo to my needs. Is it possible to load make menuconfig making sure all previous settings I have set or unset are preserved? My idea is to recompile the kernel with the proper selinux and iptables settings, but without all the work of making again all the other settings which right now are ok for me. Although I do not want to use genkernel, I know there is an option to pass an old config file to it, but the one time I did try this in another install it just could not read the config file.

Thank you all for your attentLast edited by vcmota on Thu Jul 13, 2017 10:21 pm; edited 1 time in total

----------

## charles17

The .config file in /usr/src/linux-<your version>-gentoo is what carries all the settings.  "make menuconfig" reads from that file. Save it in a safe place ...

----------

## vcmota

Hi charles17, thank you for your answer. 

But how do I do that? I mean, which is the syntax? Would it be something like

```
make menuconfig --config
```

Is that correct?

----------

## charles17

 *vcmota wrote:*   

> Is that correct?

 

No. just "make menuconfig"  In case an .config file doesn't exist, it will be created by menuconfig's save command.

If you want to restore from an older .config, drop it in the linux-<your version>-gentoo directory, then "make clean" && "make"

And always keep a copy of .configLast edited by charles17 on Thu Jul 06, 2017 2:51 pm; edited 1 time in total

----------

## NeddySeagoon

vcmota,

```
cd /usr/src/<kernel>

make menuconfig
```

----------

## ChrisADR

Another option is 

```
genkernel --menuconfig all 
```

If you emerged genkernel or genkernel-next during the installation 

Hope it helps

----------

## dmpogo

If by chance you do not have .config  file anymore, and, being lucky, your running  kernel has been compiled with an appropriate option,  you can find

the running kernel config in

/proc/config.gz

----------

