Linux forum

General discussion

How to find out a kernel's configuration

by ruffieux / February 24, 2004 1:21 AM PST


I am using RH9 and recently got a kernel update to version 2.4.20-30.9. I have the binary kernel as well as the source installed with RPM's.

How can I find out how exactly the binary kernel has been compiled (with what .config file)?.
I am looking for this information, because I would like to make a minor change to the kernel configuration but would like to base on exactly the same configuration (.config file) as the current binary kernel is based on.
The source I get with the RPM's does not include any .config file.

Anybody who can help with this?

Thanks a lot


Discussion is locked
You are posting a reply to: How to find out a kernel's configuration
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: How to find out a kernel's configuration
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re:How to find out a kernel's configuration
by fred_beondo / February 24, 2004 11:59 AM PST

You could try make oldconfig in the source directory of the running kernel. I would examine the configuration closely after that by "make xconfig" (from X of course) to make sure it's the way you want it and it's a little easier to do that with the gui. I just yesterday did this same thing as an experiment. I copied the .config file made to the new kernel source dir, ran make xconfig again and simply saved the configuration on exit. then the usual make dep ; make etc. The resulting kernel had all the properties of the previous kernel. Hope this works for you. Keep in mind that as long as the kernels are fairly close in version this can probably work but between widely different versions I suspect it would surely fail.

Collapse -
Re:Re:How to find out a kernel's configuration
by ruffieux / February 24, 2004 5:22 PM PST

Thanks Fred your idea.

I will try this.

In the meantime I found out, that RedHat seems to save the kernel configuration in /boot/config-2.4.20-xyz files.
However, I do not yet know, if this files originate from the binary kernel rpm or from the source kernel rpm.

Does anybody have an idea on this?



Collapse -
Re:Re:Re:How to find out a kernel's configuration
by Anthony J Moulen / February 24, 2004 10:42 PM PST

The source RPM should not be placing things in /boot, but you can always check by doing rpm -ql [sourceRPMname]. This will give you a list of files that were installed. You can even grep this for the config file that you have or simply config and get a shorter list to review.

Collapse -
Re:Re:Re:Re:How to find out a kernel's configuration
by ruffieux / February 25, 2004 5:35 AM PST

Yep Anthony,

Found the config file in the binary kernel rpm. So it looks like RedHat is delivering the information on who they configured the kernel, when they built it....



Collapse -
Re:How to find out a kernel's configuration
by David Utidjian / February 26, 2004 11:07 PM PST

The source RPM doesn't place the config in /boot.

The kernel RPM (different from the source-for-the-kernel RPM) does place the config file for the currently installed and configured kernels in /boot.

The kernel source RPM does place all the kernel configs in /usr/src/linux-2.4/configs

I did a diff on, for example, the config in /boot and the corresponding one in /usr/src/linux-2.4/configs and they are identical.

Usually when I want to modify an existing installed kernel slightly I just copy a config file from /usr/src/linux-2.4/configs/ to /usr/src/linux-2.4/.config and start from there.


Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?