I'm trying to compile and install the kernel-4.9.8 sources from https://kernel.org on Debian 8 (jessie).

I'm following this procedure:

  • make defconfig
  • make menuconfig
  • make

I managed to compile the sources succesfully, but I can't install the kernel, I've tried with both sudo make install and sudo dkms autoinstall -k 4.9.8, but they seems to require linux-headers-4.9.8 and I can't find it the Debian repositories.


1 Answer 1


Try using make-kpkg instead. When run from a kernel source tree it'll compile a kernel and build a full set of debian packages using that source and config -- linux-image, linux-headers, linux-doc, all as per your version specified.

It's part of the kernel-package package, so what you want to do is:

  1. sudo apt-get install kernel-package
  2. Edit /etc/kernel-img.conf and /etc/kernel-kpg.conf to match your preferences
  3. fakeroot make-kpkg --initrd linux-image
  4. Sit back, get some tea. The above process will take a while.

It will generate a linux-image-(version) deb package one level up, which you can then install with dpkg and will handle things like calling your bootloader's update to add the new kernel automatically. This will significantly ease your difficulties.

At the end of this process, you will have a Linux kernel that has the exact capabilities you told it to have, and none of the capabilities that you didn't tell it to have.

Consider that last sentence a polite warning.

  • Yeah, this works, but what's up with the good old way?
    – JumpAlways
    Feb 8, 2017 at 23:33
  • 1
    You mean the way that doesn't handle the bootloader, doesn't check dependencies and will blithely overwrite files without checking? The "good old way" you can't manage to get to work? There's a reason most sensible people stopped using it.
    – Shadur
    Feb 9, 2017 at 5:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .