I found a lot of instructions, how to install the latest rc kernel on Ubuntu, for example here, but none how to install it on debian jessie.

How can I install the latest rc-kernel on debian (currently 4.16)?

Or can I just install the Ubuntu kernel on a debian system?


You’ll usually find pre-built release candidates in experimental (as of this writing, 4.16rc6 is waiting in the upload queue). To install these:

  1. Add experimental to your repositories:

    echo deb http://deb.debian.org/debian experimental main > /etc/apt/sources.list.d/experimental.list

    (this is safe as-is, without any special pinning, because experimental is not a default candidate for package upgrades or installations; since the kernel packages don’t have many external dependencies this will work without a reference to unstable).

  2. Update:

    apt update
  3. Install the appropriate packages; as of this writing:

    apt install -t experimental linux-image-4.16.0-rc5-amd64

    (along with the headers if necessary).

Experimental packages aren’t automatically upgraded, so you’ll need to keep an eye on new package uploads; you can do this quite easily by subscribing to the linux package.

It’s also quite easy to build your own kernel; as described in the Debian kernel handbook:

  1. Download and extract the kernel source code (or clone the repository).
  2. Configure the kernel (in most cases, you should start from the configuration of the running kernel to make this simpler).
  3. Build the kernel using make deb-pkg and install the resulting kernel package.
  • In Ubuntu the is a pre compiled kernel for every version. I thought that must exist for Debian too – rubo77 Mar 20 '18 at 22:35
  • Ah, yes, there are pre-built RCs, I thought you were asking because you hadn’t found the very latest RC. See my update. – Stephen Kitt Mar 21 '18 at 6:26
  • could you adapt this script so it uses the experimental download links? Or do I have to add a source list to my jessie system? How would I add that so the system doesn't use the sources immediately for a dist-upgrade? – rubo77 Mar 21 '18 at 6:51
  • See my update, you can add the repository without risk of an upgrade because experimental packages are never installed or upgraded automatically. – Stephen Kitt Mar 21 '18 at 8:07

You can use the GUI Ukuu Kernel Upgrade Utility for debian too.

But it seems not so difficult to compile the kernel again:

# Install necessary things
apt-get update
apt-get install --no-install-recommends kernel-package libncurses5-dev fakeroot wget bzip2 build-essential bison

# Get the kernel
cd /usr/src
# search latest kernel on https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-$VERSION.tar.xz
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-$VERSION.tar.sign
gpg --verify linux-$VERSION.tar.sign
tar xpf linux-$VERSION.tar.xz
ln -s linux-$VERSION linux

# Configure the kernel
cd /usr/src/linux
make clean && make mrproper
# Save the existing config
cp /boot/config-`uname -r` ./.config
make menuconfig
# Press 5x TAB to Load the file .config
# Optional Edit config and save. Then Exit

# Build the kernel
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
# go get a coffe :)
make modules
make modules_install

# Install new kernel
cd /usr/src
# Check file names before running dpkg
ls -l
dpkg -i linux-image-$VERSION-custom_$VERSION-custom-10.00.Custom_amd64.deb
dpkg -i linux-headers-$VERSION-custom_$VERSION-custom-10.00.Custom_amd64.deb

# Test the kernel
shutdown -r now
uname -r

# Notes:
# http://www.berkes.ca/guides/linux_kernel.html
# http://www.howtoforge.com/kernel_compilation_ubuntu

source: https://gist.github.com/Avyd/8191406

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.