Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New to Gentoo, trying to use genkernel
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
miscsubbin
n00b
n00b


Joined: 10 May 2012
Posts: 46

PostPosted: Sun May 13, 2012 1:38 am    Post subject: New to Gentoo, trying to use genkernel Reply with quote

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
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Sun May 13, 2012 2:42 am    Post subject: Reply with quote

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
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
miscsubbin
n00b
n00b


Joined: 10 May 2012
Posts: 46

PostPosted: Sun May 13, 2012 3:04 am    Post subject: Reply with quote

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
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1266

PostPosted: Sun May 13, 2012 3:07 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
dlaor
n00b
n00b


Joined: 27 Jan 2008
Posts: 38

PostPosted: Sun May 13, 2012 2:01 pm    Post subject: Reply with quote

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


Joined: 21 May 2003
Posts: 249
Location: Bakersfield, CA

PostPosted: Sat May 19, 2012 9:16 pm    Post subject: Reply with quote

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
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