[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to compile and install the kernel

2009/10/1 surreal <firewalrus@gmail.com>:
> Thanks, I read that, compiled the kernel and its working.
> But now I have a problem.
> The kernel deb file gets installed, but it has got the same name ie Debian
> Kernel 2.6.26 in /boot/grub/menu.lst..
> I want to have the customized kernel name as default, any way to do this?

The following information from the article will help you

To build the kernel you'll invoke "make-kpkg", a script which
automates and replaces the sequence "make dep; make clean; make
bzImage; make modules". Take a few minutes and read over the manual
page for make-kpkg. The make-kpkg command line can be complex and at
first intimidating. Its basic syntax is

bash:/usr/src$ make-kpkg <options> <target>

Your target will be "kernel_image". Let's examine two of the more
important and common options, "--append-to-version" and "--revision".

The first option lets you specify an addition to the kernel version,
which then becomes part of the kernel's name. You may use alphanumeric
characters, "+" and "." (period or full stop); do not use underscore

Here's the kernel I'm running now:

bash:/usr/src$ /usr/src/$ uname -a
Linux da5id #1 Sat Sep 18 11:23:11 BST 2004 i686 GNU/Linux

You should avoid using --append-to-version values such as "-686",
"-K7", and "-sparc". They are commonly used for Debian pre-compiled

Kernel modules live in subdirectories of /lib/modules; each kernel has
its own subdirectory. Every time you install a kernel image with a new
name, the package installer creates a new subdirectory of /lib/modules
to hold its modules.

This means that by using a new value for --append-to-version each time
you build a kernel image, you can ensure that the new kernel will have
a new name, and that its modules won't conflict with those of other

/!\ If you install a kernel with the same name (the same version and
--append-to-version) as an already-installed kernel, installing the
new kernel package will overwrite the old kernel and its modules. You
will be warned and offered the chance to abort. Take it. Use another
value for --append-to-version and rebuild.

Another make-kpkg option is "--revision", which affects the name of
the Debian package itself but not the kernel name. As with
--append-to-version, you may use only alphanumeric characters, "+" and
".". Do not use underscores "_". If you do not supply a value for
--revision, make-kpkg will use "10.00.Custom".

Using different values of --revision will not prevent conflicts
between kernels with the same name. They are just for you to see the
difference, for example recompiling the same kernel with a very small
Kernel package names

Debian kernel-image file names have the form


The package name is everything before the first underscore.

bash:/usr/src$ ls

Now you can see why underscores are not allowed in make-kpkg options ?
they separate the elements of package names.

I recommend using a different --append-to-version value for each
kernel you compile, and letting make-kpkg assign the default revision.
Date-based values work for me, but you are free to invent your own

{i} Please read /usr/share/doc/kernel-package/README.gz if
--append-to-version or --revision is unclear, or if you plan on using
options different from the ones I suggest. (One way to do this is
"zless README.gz".) Ignore the discussions of flavours and epochs
until you are more familiar with make-kpkg and with Debian packages
generally; they are not likely to be useful to you now.

Reply to: