LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel compiling, how to get current settings? (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-compiling-how-to-get-current-settings-315193/)

pit-peng 04-20-2005 03:00 AM

Kernel compiling, how to get current settings?
 
Hi.
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.

hw-tph 04-20-2005 03:23 AM

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.


Håkan

abisko00 04-20-2005 03:55 AM

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:
Code:

zcat /proc/config.gz > .config
make oldconfig

or
Code:

make cloneconfig

setenv02 04-23-2005 12:59 PM

yo
 
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.

setenv02 04-23-2005 01:03 PM

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.


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