[nSLUG] The .config file for compiling a kernel

Mike Spencer mspencer at tallships.ca
Wed Mar 11 02:28:48 ADT 2015

I want to compile a new kernel.  The source doesn't come with a
./.config file. I don't know what most of the options are/mean so
if I do the basic "make config" command, I'll be blindly responding to
dozens of "...if unsure, say {yes,no}" suggestions.

What I'd like to to have just the same config as presently in use
excepting for any new items.  It is, after all, in the hope that the
newer kernel will support presently unsupported hardware that I'm
doing this.

The README says one of the config options is:

     "make oldconfig"   Default all questions based on the contents of
                        your existing ./.config file and asking about
                        new config symbols.

which sounds like what I want.

Except that there is no ./.config in the root directory of the new source
code.  I infer that I need to put one there.

But where do I get it?

There is a .config in /usr/src/linux-3.10.17:


  -rw-r--r--   1 root root 141822 Oct 23  2013 .config

But over in /boot, I have 4 versions of the kernel (owner fields
elided for readability):

    lrwxrwxrwx  1  28 Aug 16  2014 vmlinuz -> vmlinuz-huge-smp-3.10.17-smp
    -rw-r--r--  1  3088656 Oct 23  2013 vmlinuz-generic-3.10.17
    -rw-r--r--  1  3272208 Oct 23  2013 vmlinuz-generic-smp-3.10.17-smp
    -rw-r--r--  1  5995104 Oct 23  2013 vmlinuz-huge-3.10.17
    -rw-r--r--  1  6251392 Oct 23  2013 vmlinuz-huge-smp-3.10.17-smp

with 4 corresponding config files:

    lrwxrwxrwx  1       27 Aug  8  2014 config -> config-huge-smp-3.10.17-smp
    -rw-r--r--  1   140912 Oct 23  2013 config-generic-3.10.17
    -rw-r--r--  1   141822 Oct 23  2013 config-generic-smp-3.10.17-smp
    -rw-r--r--  1   140912 Oct 23  2013 config-huge-3.10.17
    -rw-r--r--  1   141822 Oct 23  2013 config-huge-smp-3.10.17-smp

LILO boots /boot/vmlinuz which is a link to vmlinuz-huge-smp-3.10.17-smp.
But the .config in the /usr/src tree is the same as the generic-smp
one in /boot, not the same as the huge-smp one in /boot. So the
.config in /usr/src seems not to match the kernel that I'm actually

You can (crudely) verify that from file sizes in the listings above.

So I don't understand how this works or which .config I should copy to
the new kernel-source dir in order to use make oldconfig.

Is there an obvious answer -- obvious to y'all that have presumably
done this many times before?

- Mike

Michael Spencer                  Nova Scotia, Canada       .~. 
mspencer at tallships.ca                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^

More information about the nSLUG mailing list