LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2008, 09:24 PM   #1
khaos83
Member
 
Registered: Dec 2007
Posts: 97

Rep: Reputation: 15
How to generate a .config file based on the current or initial installtion/kernel


If lsmod is to see all the modules that are loaded at the instance, and during menuconfig, we can choose which to be compiled into the kernel(y) or as modules(m).

.config files is only created when make menuconfig or similar is run and saved.

If there is TOTALLY NO existing .config file from the initial installation, how do i generate a .config file based on the current or initial installation?

This will be a BIG help if possible.
Best to be done in commands, not through GUI
thanks in advance.
 
Old 01-17-2008, 10:54 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
If you are lucky then you'll find it in /proc/config.gz.
 
Old 01-17-2008, 10:57 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There is often a config-<version>.gz file saved in /boot that matches an installed pre-configured and compiled kernel. Also check if /proc/config.gz exists.

This psuedo file is generated by the kernel if the kernel option to generate it was enabled in a 2.6 kernel. Running "make oldconfig" will use this file to create a new .config file based on the current options and prompt you for any new options in a newer kernel source. This is a good baseline to use before running "make xconfig" where you can tweak it as desired.
 
Old 01-18-2008, 12:56 AM   #4
khaos83
Member
 
Registered: Dec 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Code:
make oldconfig
ooohhhhhh.....

thats a something i have never seen b4 ...
thanks a million. i will try all the solution out!!!
 
Old 01-18-2008, 12:57 AM   #5
khaos83
Member
 
Registered: Dec 2007
Posts: 97

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post

This psuedo file is generated by the kernel if the kernel option to generate it was enabled in a 2.6 kernel.
Which option, how and where do i choose or activate this option ?
 
Old 01-18-2008, 01:29 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you don't have a /proc/config.gz file, then the kernel wasn't compiled with that option. It is something that I think you would need to recompile the kernel to enable. Also make sure that you have a 2.6 kernel and not a 2.4 kernel.

On my kernel, I think these options are:
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
 
Old 01-18-2008, 08:18 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by khaos83 View Post
Code:
make oldconfig
ooohhhhhh.....

thats a something i have never seen b4 ...
thanks a million. i will try all the solution out!!!
Dear khaos83, whatever you build from sources, always read README file.
 
Old 01-18-2008, 10:17 AM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by Emerson View Post
Dear khaos83, whatever you build from sources, always read README file.
You mean, you're suppose to actually read those files called README?
 
Old 01-18-2008, 01:03 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by trickykid View Post
You mean, you're suppose to actually read those files called README?
Yes, sir! There is no other way to find out why they call them README.
 
Old 01-18-2008, 02:09 PM   #10
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Yet another option to get it directly from the bzimage, again if it's compiled in the kernel: On my system
<code>
cd /usr/src/linux

./scripts/extract-ikconfig /boot/vmlinuz-huge-2.6.21.5
</code>

Last edited by Looking_Lost; 01-18-2008 at 02:13 PM. Reason: Formatting, don't like tags much lol
 
Old 01-20-2008, 05:55 PM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by trickykid View Post
You mean, you're suppose to actually read those files called README?
I bet more people would read a DONTREADME file then a README file.
 
Old 01-22-2008, 09:53 AM   #12
shahak
LQ Newbie
 
Registered: Jan 2008
Location: India
Distribution: Fedora
Posts: 8

Rep: Reputation: 0
Sir,
While you all are at the README , I have been going through the documentation for the last few days and am lost in the maze of files! There are a number of xxxxxx.config files - may I use xxxxxx686.config to start with?(The source rpm was downloaded from the fedora update site)

There are a number of patches also - I sincerely hope that I do not need them!

I have installed the sources properly with the last command being mrproper in the README (I hope!). I seem to have all the tools with Fedora7 and kernel-2.6.23.8 installed, I have dared to run 'make menuconfig' and the shell had a lot to tell, when I fled without saving. It was using the configuration from /boot and had to report a lot of things (config options) that were not available with the 2.6.23.12 kernel sources. May I Ignore those options and continue further and save the .config .

With regards,

P.S.
I seemed to have all the necessary 'system requirements' as detailed in 'linux_sources/Documentation/Changes' but was not sure - the great utility script in 'linux_sources/scripts/ver_linux' has now made me confident that I have everything required. The inclusion of a reference to this script in the 'Software Requirements' section of the "README" would be a great help to beginners like me.

Last edited by shahak; 01-25-2008 at 10:17 AM. Reason: addition
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vmware and other modules compiled based on current kernel kpachopoulos Linux - General 2 06-24-2007 10:37 AM
need to check the current kernel .config file jimi_j Red Hat 1 06-28-2004 06:17 PM
finding current kernel config? reetep Linux - Newbie 2 12-31-2003 05:43 AM
How can I find/generate a kernel .config file? David Reid Linux - Newbie 5 08-08-2002 05:30 AM
Where can I see current kernel config? kernelclink Linux - Newbie 3 03-07-2002 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:28 PM.

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