View previous topic :: View next topic |
Author |
Message |
vcmota Apprentice

Joined: 19 Jun 2017 Posts: 157
|
Posted: Thu Jul 06, 2017 1:40 pm Post subject: [SOLVED] How to change settings in Kernel? |
|
|
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 attent
Last edited by vcmota on Thu Jul 13, 2017 10:21 pm; edited 1 time in total |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 2799
|
Posted: Thu Jul 06, 2017 2:15 pm Post subject: |
|
|
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 ... |
|
Back to top |
|
 |
vcmota Apprentice

Joined: 19 Jun 2017 Posts: 157
|
Posted: Thu Jul 06, 2017 2:43 pm Post subject: |
|
|
Hi charles17, thank you for your answer.
But how do I do that? I mean, which is the syntax? Would it be something like
Code: | make menuconfig --config |
Is that correct? |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 2799
|
Posted: Thu Jul 06, 2017 2:50 pm Post subject: |
|
|
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 .config
Last edited by charles17 on Thu Jul 06, 2017 2:51 pm; edited 1 time in total |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 44153 Location: 56N 3W
|
Posted: Thu Jul 06, 2017 2:51 pm Post subject: |
|
|
vcmota,
Code: | cd /usr/src/<kernel>
make menuconfig |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
ChrisADR Retired Dev

Joined: 06 Jul 2017 Posts: 11 Location: Peru
|
Posted: Fri Jul 07, 2017 3:14 am Post subject: |
|
|
Another option is
Code: | genkernel --menuconfig all |
If you emerged genkernel or genkernel-next during the installation
Hope it helps |
|
Back to top |
|
 |
dmpogo Advocate

Joined: 02 Sep 2004 Posts: 2542 Location: Canada
|
Posted: Fri Jul 07, 2017 3:40 pm Post subject: |
|
|
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 |
|
Back to top |
|
 |
|