LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-16-2007, 11:26 AM   #1
t0bias
Member
 
Registered: Aug 2005
Distribution: Fedora 13, RHEL 5.3, Ubuntu 10.04, Debian Lenny
Posts: 128

Rep: Reputation: 16
[solved] read kernel config from running kernel


hi,

i need to know some settings of a running kernel in order to build
my software. if make oldconfig in a kernel-source would work (of
course i cannot bring a complete kernel source with my software
and do make oldconfig...)
but there is no /proc/config.gz, how can i get the kernel config from
a running kernel?

thanks,

toby

Last edited by t0bias; 11-17-2007 at 05:50 AM. Reason: solved
 
Old 11-16-2007, 12:47 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
In Debian, at least, the config file for every kernel installed is in the /boot directory with the kernel.
 
Old 11-16-2007, 01:19 PM   #3
t0bias
Member
 
Registered: Aug 2005
Distribution: Fedora 13, RHEL 5.3, Ubuntu 10.04, Debian Lenny
Posts: 128

Original Poster
Rep: Reputation: 16
thanks, but this is something just debian does, but others don't.. unfortunately..
 
Old 11-16-2007, 06:02 PM   #4
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
I think /proc/config.gz is the only way unless the actual config file is stored somewhere. If you install the kernel sources for your distro, do you have /usr/src/linux/.config? What exactly do you need to know about it?
ta0kira
 
Old 11-17-2007, 05:49 AM   #5
t0bias
Member
 
Registered: Aug 2005
Distribution: Fedora 13, RHEL 5.3, Ubuntu 10.04, Debian Lenny
Posts: 128

Original Poster
Rep: Reputation: 16
hm.. no, if you do not have a /proc/config.gz
you can still do "make oldconfig" in a kernel source
tree to get the actial config.
but i found the solution myself:
the kernel-sources bring a script in the scripts-folder
called "extract-ikconfig" that can extract the config
from a bzImage. thanks everyone!
 
Old 01-23-2014, 06:20 AM   #6
bhussein
LQ Newbie
 
Registered: Sep 2013
Posts: 25

Rep: Reputation: Disabled
Hi t0bias,

i tried to run the script from /usr/src/linux-3.10 folder scripts

but i am getting an error message

Usage: extract-ikconfig <kernel-image>


what did you do to get the configurations?

thanks,
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
The kernel I compiled reads my sata drives as hda even though the rpm kernel read sda abefroman Linux - Software 5 07-10-2006 04:42 PM
pull compile config out of running kernel zatar042 Linux - Kernel 1 07-08-2006 11:30 PM
Need good ACPI config for Dell Inspirion 4100 running FC3, kernel 2.6.10 mmeckes Linux - Laptop and Netbook 0 04-17-2005 01:30 PM
read file from running kernel b123coder Programming 1 11-18-2004 04:05 AM
Can you create a config file from a running kernel? sparky8023 Linux - Newbie 3 12-03-2003 10:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:10 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