Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to change settings in Kernel?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
vcmota
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2017
Posts: 141

PostPosted: Thu Jul 06, 2017 1:40 pm    Post subject: [SOLVED] How to change settings in Kernel? Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2642

PostPosted: Thu Jul 06, 2017 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
vcmota
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2017
Posts: 141

PostPosted: Thu Jul 06, 2017 2:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2642

PostPosted: Thu Jul 06, 2017 2:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43387
Location: 56N 3W

PostPosted: Thu Jul 06, 2017 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
ChrisADR
n00b
n00b


Joined: 06 Jul 2017
Posts: 11
Location: Peru

PostPosted: Fri Jul 07, 2017 3:14 am    Post subject: Reply with quote

Another option is

Code:
genkernel --menuconfig all


If you emerged genkernel or genkernel-next during the installation

Hope it helps
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2522
Location: Canada

PostPosted: Fri Jul 07, 2017 3:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum