Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Config kernel (from using CentOS 5.4 x86_64 kernel .config

    I have installed CentOS 5.4 x86_64 in my pc.

    The kernel version is 2.6.18-164.el5 (uname -r).

    I want to compile a custom kernel ( from I have a pdf book called "Linux Kernel in a Nutshell" that i use as guide,and i have been searching for some information in google.

    But i want to use the configuration of the Centos kernel when conpiling the new one , using it as starting point for then modify the options i want.

    I suppose that the centos kernel was compiled with some options to fit the centos requirements , and although with the new kernel i will tune it,for my requirements, i think starting from the 2.6.18 config would be better than a default .config.

    Is possible to copy the .config from my 2.6.18 installed kernel , as was compilled, and put it in the kernel , to start from that tuning it ?

    As i will not change all configuration options , if done that , the most of config options will be the same as 2.6.18 , and then the new kernel should be as compatible with centos as the default one, no? (except that some option modified by me could be wrong, but at least , the chane of have a more compatible kernel would be more thant using a default .config and modify it , without knowing if for centros , i should perhaps modify some options to get it work or to have some characteristics need in the distro)

    I have read something about do a make oldconfig and then make xconfig for example.

    But i don't know if make oldconfig takes the configuration from current kernel without having to copy the .config from 2.6.18, or if i have first to copy it.

    Also i don't know if can i have any problem trying to use the configuration of a 2.6.18 kernel in a , i suppose that the new configurations in will be default , and would use the 2.6.18 .config to configure the other "old" options like are in 2.6.18.

    Then do a xconfig or gconfig and change whatever you want, but having the configurations from 2.6.18 as starting point.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    With the buildroot correctly set up, it's time to modify the kernel configuration. Change directory to ~/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.`uname*-m`/ and copy into this directory, as .config, one of two files:

    Either the appropriate type of configuration file, from the ./configs/ directory:

    For CentOS-5: base, xen, or (if the architecture is 32-bit) PAE
    For CentOS-4: base, smp, xenU or hugemem (if the architecture is 32-bit), largesmp (if 64-bit).
    Or the currently running kernel's configuration file, from the /boot directory.
    So use the config file from /boot should result , if none option changed in a kernel very similar , at least it configuration options to the installed one, and quite compatible with the centos distro. ( perhaps if you change any ofthe new options of the new kernel , you coul have problems, if not all should be ok).

    I am so interested in use the centos config as i have read posts where someone compilled a kernel for centos,and some config option was not enabled or like , and he had problems later , with his centos.But if you use the config of your kernel and only cange what you need too , there are more chancess of success, I think.

    First run make oldconfig. Now you should run either make menuconfig, make gconfig or make xconfig to customize the kernel configuration. Once complete, remember to save your changes.
    So it is need to copy first the .config, logical.

    Use a config from a older kernell shouldn't be a problem no? The new configurations of the new kernels would be asked by oldconfig ,and the ones from the .config , taken as they are in the config, I suppose.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts