View previous topic :: View next topic |
Author |
Message |
Moondhum n00b
Joined: 26 Jan 2017 Posts: 14
|
Posted: Thu Jan 26, 2017 5:24 pm Post subject: Easier way to configure kernel? |
|
|
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 |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10730 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Jan 26, 2017 6:14 pm Post subject: |
|
|
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 |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Thu Jan 26, 2017 8:15 pm Post subject: |
|
|
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 |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Thu Jan 26, 2017 8:28 pm Post subject: |
|
|
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 |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Jan 27, 2017 2:41 am Post subject: |
|
|
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 |
|
|
Moondhum n00b
Joined: 26 Jan 2017 Posts: 14
|
Posted: Fri Jan 27, 2017 4:05 am Post subject: |
|
|
It was really helpful, thank you all for your suggestions. |
|
Back to top |
|
|
|