Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-20-2005, 03:00 AM   #1
LQ Newbie
Registered: Apr 2005
Distribution: Debian
Posts: 1

Rep: Reputation: 0
Kernel compiling, how to get current settings?

Im quite new to linux, and am working on a somewhat older computer to learn the many aspects of linux. After learing to install and configure linux, i have come to compiling my own new kernel. Having attempted a few kernel compilations on both the 2.4 and 2.6 kernel, im becoming a bit desperate.
The problem is that im getting totally lost during the kernel configuration. I simply dont know what and what not to select. The result is a new kernel, where i have no sound, usb mouse, apm etc. While my old kernel that was installed with debian(sarge), works fine. There is no .config file in /usr/src/ of the currently installed kernel. My question to you is, how can i retrieve my CURRENT kernel configuration? So i dont have to configure everything myself(wich obviously i can't). Or is it maybe possible to get the kernel settings from the internet?

Thanks in advance.
Old 04-20-2005, 03:23 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Welcome to LinuxQuestions.

You probably have a configuration file in /boot that corresponds to your current working kernel - the file should be called something like /boot/config-2.6.7-K7-4 or something along those lines. cd to the directory containing the kernel version you want to configure and type cp /boot/config-2.6.7-K7-4 ./.config. After that you should be able to run make oldconfig (to answer yes/no/module for all new options that wasn't in the old kernel) or make menuconfig (where you'll see new options marked as "New").

With 2.6 kernels it is also possible that the kernel config is stored as /proc/config.gz. That would work instead of the config file found in /boot as well.

If you run Debian you should seriously look into using kernel-package to build and package your kernels. It makes life much easier. There are several tutorials on using it on the web.

Old 04-20-2005, 03:55 AM   #3
Senior Member
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
In case you do not have the config in /boot:
Most newer kernel are compiled with the current configuration saved internally. (CONFIG_IKCONFIG=y / CONFIG_IKCONFIG_PROC=y). You can access this configuration through the /proc filesystem.

To clone your current configuration, you could either run:
zcat /proc/config.gz > .config
make oldconfig
make cloneconfig
Old 04-23-2005, 12:59 PM   #4
Registered: Apr 2005
Location: Chicago,IL
Distribution: redhat 9
Posts: 32

Rep: Reputation: 15

take a look at the config-2.4.24 for example in the /boot directory and that current kernel that your using you can possibly look at that file and copy it to your config-2.4.26 file that you want to use to be compiled.
Old 04-23-2005, 01:03 PM   #5
Registered: Apr 2005
Location: Chicago,IL
Distribution: redhat 9
Posts: 32

Rep: Reputation: 15
make xconfig

If you use make xconfig you can save the configurations to a file specified if that may help you. As long as you have an x server that is running and qt packages it should work. Good luck with your kernel I also had trouble with some configurations.


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 includes do not match current kernel rafc Linux - Newbie 5 04-23-2010 12:28 AM
Gnome Settings Daemon Crash After Current Upgrade... DreameR-X Slackware 10 12-18-2004 06:03 PM
compile a new kernel with setting default to current kernel mrpc_cambodia Red Hat 6 07-06-2004 11:32 AM
Compiling freetype for Slackware-current slaxnoob Slackware 1 06-14-2004 03:39 AM
COmpiling problems on slackware-current Anibal Slackware 5 04-09-2004 08:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:11 PM.

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