Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Easier way to configure 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
Moondhum
n00b
n00b


Joined: 26 Jan 2017
Posts: 14

PostPosted: Thu Jan 26, 2017 5:24 pm    Post subject: Easier way to configure kernel? Reply with quote

Hello
I installed gentoo about 3 days earlier and since then I have been trying to configure my kernel but not yet successful. lscpi -k shows my ethernet kernel module is not present, It's starting to get little frustrating at this point. I tried using modprobed_db but seems it doesn't work properly. Is there more easier way to configure kernel than doing it manually, maybe some alternative to modprobed_db?


Last edited by Moondhum on Fri Jan 27, 2017 6:50 am; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10261
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Jan 26, 2017 6:14 pm    Post subject: Reply with quote

Yes, and it's described right in the Handbook. Search for "genkernel".

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Thu Jan 26, 2017 8:15 pm    Post subject: Reply with quote

I don't like genkernel.

I use a script I wrote which requires 2 config files. I've been tempted to rewrite so that it can use just a single config file but it works well and I haven't had time to do the change.

Script kcheck:
Code:

#!/bin/bash

echo "Watched:"
cat .config \
| grep -f /root/kernel.grepf \
| grep -vf /root/kernel.grepv

echo "Not Found:"
cat .config \
| grep -Lf /root/kernel.grepf


The config files are almost mirrors of each other, but the first one contains only the kernel settings I care about, usually followed by a regex \> end-of-word matcher.
Code:

CONFIG_64BIT\>
CONFIG_9P_FS\>
CONFIG_9P_FS_POSIX_ACL\>
CONFIG_BRIDGE_EBT_MARK_T\>
CONFIG_BRIDGE_EBT_T_NAT\>
CONFIG_BRIDGE_EBT_VLAN\>
...


The second file contains the setting with the value I want.
Code:

CONFIG_64BIT=y
CONFIG_9P_FS_POSIX_ACL=y
CONFIG_9P_FS=y
CONFIG_BRIDGE_EBT_MARK_T=y
CONFIG_BRIDGE_EBT_T_NAT=y
CONFIG_BRIDGE_EBT_VLAN=y
...


The way this works, I need to be in my new kernel source directory. I copy the running kernel's .config file into the directory and then 'make oldconfig'. Once I finish that, I run 'kcheck' and hope for no CONFIG lines in the output. If something prints then it's a change I need to make. The row printed will be the value which should be in the config, not the one that's there.

Also if a CONFIG shows up after 'Not Found:' that means that the module has disappeared from the new kernel config and I need to figure out what happened to it. Rows showing up here means that the kernel has changed relevant to the printed lines, maybe the module name changed or it's become obsolete. At any rate since the values in my config files are what is required to run the box in the capacity I want then any misconfiguration or absent value means that I'll have a nonfunctional box if I run the new kernel without fixing it.

I know there are some things I could do better with this script, but you're welcome to mess with it if you want.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Jan 26, 2017 8:28 pm    Post subject: Reply with quote

In my early years I used a binary distro kernel (or genkernel when it boots) config and slimmed it down.

genkernel may work (still bloatware)

Some ebuilds will tell you to enable something in the kernel, and than you can improve your kernel.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Fri Jan 27, 2017 2:41 am    Post subject: Reply with quote

Boot a livecd or other environment where your hardware works and build the kernel using "make localyesconfig" to make the loaded drivers permanent.
Back to top
View user's profile Send private message
Moondhum
n00b
n00b


Joined: 26 Jan 2017
Posts: 14

PostPosted: Fri Jan 27, 2017 4:05 am    Post subject: Reply with quote

It was really helpful, thank you all for your suggestions.
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