LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-14-2004, 10:20 PM   #1
borris9
LQ Newbie
 
Registered: Jan 2004
Distribution: red hat 9
Posts: 5

Rep: Reputation: 0
Compiling Kernel information


Hi all,
What i want to know is, if i want to compile the kernel. Is there a way to keep the current kernel setting and just add to it. For example on my laptop everything is ok but i need to install the power managment module so it shuts down. so can i just add that module or compile the kernel to keep current settings and just add the power module?

Please help
 
Old 12-14-2004, 10:56 PM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Simply save your existing config file, then modify it to change the setting in question. If it doesn't work, just restore the saved copy. -- J.W.

(The current config file will be in the /boot directory)
 
Old 12-15-2004, 12:18 AM   #3
lethargo
LQ Newbie
 
Registered: Aug 2003
Location: St. Paul, Minnesota, US
Distribution: Slackware 10
Posts: 27

Rep: Reputation: 15
Are you sure that the power management stuff isn't already compiled as a module for you? If so, you might just have to load the module rather than recompile.

That said, if you really need to recompile, you could look for a file named ".config" in your kernel source directory by running "ls -a" there. That would probably have the configuration settings the kernel and kernel modules were compiled with. If you have a .config file there, I THINK you can run "make xconfig" from the kernel source directory, and it should pick up the old settings. Then you can change just the settings you need and recompile the kernel and modules with new settings.

If you don't have a .config file in your kernel source directory, you could also look for something like /proc/config.gz. (Some kernels have their configuration options compiled right in, so that you can see what they were later. /proc/config.gz is the place (a place?) you can get at that, e.g.
Code:
zcat /proc/config.gz > .config
Just be sure you don't overwrite an existing .config file you want to save.

I'm not an expert on Red Had, but I hope that helps a little bit anyway.
 
Old 12-15-2004, 04:51 AM   #4
borris9
LQ Newbie
 
Registered: Jan 2004
Distribution: red hat 9
Posts: 5

Original Poster
Rep: Reputation: 0
hey guys,
tanks for the advice but being a newbie i dont exactly know where the old kernel is. im using the new fedora core 3. i tryed to compile it and stuffed it, but i had the old one on the grub menu, so all is ok right now. so how do i find out if the module is loaded and if its not where is the original .config file to edit so i can add the power module(s)
 
Old 12-15-2004, 09:41 AM   #5
lethargo
LQ Newbie
 
Registered: Aug 2003
Location: St. Paul, Minnesota, US
Distribution: Slackware 10
Posts: 27

Rep: Reputation: 15
The "lsmod" command lists already-loaded modules. The "modprobe" command can load modules. Unfortunately those commands use somewhat cryptic (or at least very short) names for the modules (maybe you'd need something to do with acpi or apm?) Sorry, I'm only a novice at this stuff myself.

There might be graphical tools in Fedora Core 3 for adding modules, but I don't know. (If you don't get a helpful enough response here, I suppose you could try the Fedora Core forum?)

As for finding the .config file for your existing kernel, try
Code:
ls /proc
and look for something like "config.gz". If it's there, you should be able to change to the directory you are compiling the kernel from and do
Code:
zcat /proc/config.gz > .config
Zcat will spit out the uncompressed contents of /proc/config.gz, and the "> .config" will redirect it into a ".config" file in your current directory.

Also note that files that start with "." are hidden by default. Therefore, to see them in a directory listing, you have to use "ls -a" instead of just "ls".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel information TranceDude Linux - Software 3 08-13-2005 06:42 AM
Kernel resources Information rabee77 Linux - Software 2 02-21-2005 01:23 AM
Information for updates by RedHat in 2.4.21-9 EL kernel aasahi Red Hat 1 04-17-2004 02:39 PM
Kernel 2.6.2 Information DigitalVampire Linux - Newbie 4 02-10-2004 12:11 PM
kernel ip-cconfig not enough information changwoo Slackware 6 04-22-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration