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

Re: How to match kernel_headers and kernel versions?


Eric Dickner (<ejdickner@yahoo.com>) wrote:
> --- Andreas Janssen <andreas.janssen@bigfoot.com>
> wrote:
>> Did you compile the kernel yourself? In that case
>> the headers you need
>> should be in the kernel source tree.
> Yeah, I did.  The instructions from kernel.org told me
> not to keep the source there as the code from the
> "kernel du jour" would conflict with the headers, so I
> installed a debian package there, instead.

The instructions were talking about /usr/src/linux, and

- Debian is not affected, because on Debian, /usr/include/linux is not 
  linked to /usr/src/linux
- You can extract the kernel to /usr/src/linux-$version 
  or /usr/src/kernel-source-$version

> I am guessing from looking at the names of the
> versions there is no way to match up a
> kernel_versions_<package>.deb with source from
> kernel.org, is there?

It is not only a question of versions. The Debian kernels are also
patched. It is quite simple: the headers used for compiling a module
should match the running kernel. If you use a prepackaged Debian
kernel, install the matching headers package, or the source package,
and configure it. It you compiled the kernel yourself, keep the source.
It you removed it, download it again, extract it,
copy /boot/config-$(uname -r) to /usr/src/linux-$version/.config and

make oldconfig
make dep

This will recreate the headers (for kernel 2.4).

The next time you compile a kernel, use make-kpkg from the
kernel-package package. It can create debs for the kernel image, kernel
headers, kernel source and kernel documentation.

best regards
        Andreas Janssen

Andreas Janssen <andreas.janssen@bigfoot.com>
PGP-Key-ID: 0xDC801674 ICQ #17079270
Registered Linux User #267976

Reply to: