View previous topic :: View next topic |
Author |
Message |
miscsubbin n00b
Joined: 10 May 2012 Posts: 46
|
Posted: Sun May 13, 2012 1:38 am Post subject: New to Gentoo, trying to use genkernel |
|
|
So I'm just starting up and I realize that every time something goes wrong, I usually have to recompile the kernel with different settings. Is there a way to make a backup of the settings and use them again later (I'm assuming there has to be)? Because right now I'm memorizing the things I changed and then every time I have to add something new I run
Code: | genkernel --menu-config all |
and put in the settings I remember. This is starting to get out of hand, and I would like to just be able to modify my old settings every time. Also, is there a guide to understanding what a lot of the settings do? I would like to move away from genkernel at some point and just compile with the bare minimum of things that I need. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Sun May 13, 2012 2:42 am Post subject: |
|
|
Yes. Edit /etc/genkernel.conf and set Code: | CLEAN="no"
MRPROPER="no" | You can do this on the command line as well but it's easier to set as the default behavior by modifying the .conf file. This has the added benefit of not throwing away all of the work products each time you want to tweak one little thing.
I get the impression that most of us absorbed our kernel foo over time by reading posts, Googling, and experimenting. Perhaps someone else can point you to better tutorial material, but I don't know of it.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
miscsubbin n00b
Joined: 10 May 2012 Posts: 46
|
Posted: Sun May 13, 2012 3:04 am Post subject: |
|
|
Thanks! Is there any way I can make a backup, like if I want to try something new that I'm not sure will work and I want to make sure I can revert if I need to? I haven't run into a situation like this yet, but I can definitely see it happening. Even better would be something that makes a backup every time it runs and keeps a certain number. |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Sun May 13, 2012 3:07 am Post subject: |
|
|
You can. The config file is a plan text file located at /usr/src/linux/.config You can use cp to copy the file to wherever you want it, eg cp /usr/src/linux/.config kernel_backup.config which would place a copy in your working directory. Just don't edit it manually, that is asking for trouble. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
dlaor n00b
Joined: 27 Jan 2008 Posts: 55
|
Posted: Sun May 13, 2012 2:01 pm Post subject: |
|
|
Maybe chapter 7 of "Linux Sea" is useful as a tutorial:
http://swift.siphos.be/linux_sea/
It is written by a gentoo developer and (from the abstract): "offers a gentle yet technical (from end-user perspective) introduction to the Linux operating system, using Gentoo Linux as the example Linux distribution."
I must say I haven't read much of it myself, but that is mostly because I found out about it only some weeks ago. To me the chaper on configuring the kernel looks pretty good, explaining many options as well as pappy's kernel seeds, grub, troubleshooting etc. (not much about genkernel though).
Hope that helps! |
|
Back to top |
|
|
sgarcia Apprentice
Joined: 21 May 2003 Posts: 254 Location: Bakersfield, CA
|
Posted: Sat May 19, 2012 9:16 pm Post subject: |
|
|
True, you can back up .config.
But there is something else that you should *always* do. Make sure that these are in your config:
Code: | CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y |
I don't recall exactly where in menuconfig that lives, but it's in the setup of the kernel itself.
Then your running kernel will always have its own configuration stored in /proc/config.gz
Any time you need to recreate it, simply
Code: | cat /proc/config.gz | gunzip > /usr/src/runningconfig
genkernel --kernel-config=/usr/src/runningconfig --menuconfig all |
_________________ Ignorance killed the cat. Curiosity was framed. |
|
Back to top |
|
|
|