public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to know current Kernel Configuration?
@ 2003-09-16  5:29 jeremyjin
  2003-09-16  7:06 ` Stuart Longland
  0 siblings, 1 reply; 3+ messages in thread
From: jeremyjin @ 2003-09-16  5:29 UTC (permalink / raw)
  To: linux-kernel

Suppose I have redhat Linux 9.0 installed which comes with kernel 2.4.20, and I want to compile 2.4.22 by myself. And I want to keep most configuration settings because I think these settings should be pretty good, how can I know the current configuration of the current kernel? I know make has a option "make oldconfig", but seems like it is the old configuration of the last times "make", not the one of current running kernel. 

Is there any command to list all current running linux kernel configuration which is used to compile that version?

Thanks in advance!


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to know current Kernel Configuration?
  2003-09-16  5:29 How to know current Kernel Configuration? jeremyjin
@ 2003-09-16  7:06 ` Stuart Longland
  2003-09-16  9:48   ` jw schultz
  0 siblings, 1 reply; 3+ messages in thread
From: Stuart Longland @ 2003-09-16  7:06 UTC (permalink / raw)
  To: jeremyjin; +Cc: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jeremyjin@nucleus.com wrote:

| And I want to keep most configuration settings because I think these
settings should be pretty good,
| how can I know the current configuration of the current kernel? I know
make has a option "make oldconfig",
| but seems like it is the old configuration of the last times "make",
not the one of current running kernel.

Ahh, it's using the default configuration from the linux source, I'm not
sure where it's stored, somewhere in arch/i386... as far as I know.

However, Red Hat stores their version of the .config file in /boot as
config-`uname -r`.  So copy this to your kernel source directory as
.config, then try make oldconfig, etc...

A quick way of doing this... (assuming you are in the kernel source
directory)

# cp /boot/config-`uname -r` .config

Then run...

# make oldconfig
# make xconfig, menuconfig or config	- optional
# make dep bzImage modules modules_install - usual build procedure.

| Is there any command to list all current running linux kernel
configuration which is used to compile that version?
Not in 2.4.x as far as I know, but there is a virtual file in /proc
(/proc/ikconfig or something like that I think) that does this.

- --
+-------------------------------------------------------------+
| Stuart Longland           stuartl at longlandclan.hopto.org |
| Brisbane Mesh Node: 719             http://stuartl.cjb.net/ |
| I haven't lost my mind - it's backed up on a tape somewhere |
| Griffith Student No:           Course: Bachelor/IT (Nathan) |
+-------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/ZrZxIGJk7gLSDPcRAg5/AJ0d9VzrldoRxWbEeaGMW4KIP5dMpgCePHjw
wmkxGNq+SthHSBSeo+XQBKY=
=XfjP
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to know current Kernel Configuration?
  2003-09-16  7:06 ` Stuart Longland
@ 2003-09-16  9:48   ` jw schultz
  0 siblings, 0 replies; 3+ messages in thread
From: jw schultz @ 2003-09-16  9:48 UTC (permalink / raw)
  To: linux-kernel

On Tue, Sep 16, 2003 at 05:06:25PM +1000, Stuart Longland wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> jeremyjin@nucleus.com wrote:
> 
> | And I want to keep most configuration settings because I think these
> settings should be pretty good,
> | how can I know the current configuration of the current kernel? I know
> make has a option "make oldconfig",
> | but seems like it is the old configuration of the last times "make",
> not the one of current running kernel.
> 
> Ahh, it's using the default configuration from the linux source, I'm not
> sure where it's stored, somewhere in arch/i386... as far as I know.

The 2.4 default config is in arch/$ARCH/defconfig

> However, Red Hat stores their version of the .config file in /boot as
> config-`uname -r`.  So copy this to your kernel source directory as
> .config, then try make oldconfig, etc...
> 
> A quick way of doing this... (assuming you are in the kernel source
> directory)
> 
> # cp /boot/config-`uname -r` .config

That gets really messy or unreliable fast if you have more
than one kernel.  And if you build your own you better have
more than one.

> 
> Then run...
> 
> # make oldconfig
> # make xconfig, menuconfig or config	- optional
> # make dep bzImage modules modules_install - usual build procedure.
> 
> | Is there any command to list all current running linux kernel
> configuration which is used to compile that version?
> Not in 2.4.x as far as I know, but there is a virtual file in /proc
> (/proc/ikconfig or something like that I think) that does this.

it is CONFIG_PROC_CONFIG
menuconfig: filesystems->/proc/config.gz
right below /proc filesystem support.

Came in really handy for me when i recently applied SuSE's
kernel update rpm and it overwrote the kernel tree including
.config.  Fortunately i had turned it on in an earlier
build.  If it wasn't enabled it won't do you any good.
Although understating the size a bit (mine are 4K-6KB) the
help text is to the point:

	The cost is around 1K-4K of running memory. Only say
	no if you really can't spare this. You can sneeze
	and lose more on memory than this.


-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw@pegasys.ws

		Remember Cernan and Schmitt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-16  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-16  5:29 How to know current Kernel Configuration? jeremyjin
2003-09-16  7:06 ` Stuart Longland
2003-09-16  9:48   ` jw schultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox