How to upgrade Linux Kernel on Debian 11 to 5.16 Release
In this tutorial, we are going to learn how to upgrade Linux Kernel to 5.16 mainline release on Debian 11.
Linux Kernel is a free and open-source, monolithic, modular, multitasking Unix-like operating system. It is the main component of a Linux operating system and is the core interface between the computer’s hardware and its processes. It makes communication possible between computer hardware and processes running on it and it manages resources effectively.
Linux 5.17 mainline was released recently by Linux Torvalds with better new features to try out. The mainline tree is maintained by Linus Torvalds and It is where all new features are added and releases always come from.
Notable features on Linux Kernel 5.16
- Introduction of new AMD P-state subsystem for future AMD CPUs that provide a performance boost.
- Introduction of page-table check feature to better protect the GNU/Linux system from threats.
- It introduces boot time memtest memory tester to the mk68k architecture.
- introduces an alternative way to implement loops in BPF programs.
- It adds support for tracking forced-idle time to the core scheduling feature and adds support to offloading traffic-control actions on network devices.
Upgrade Linux Kernel to 5.16 release
1. Run system update
The first thing to do is to run system updates on our Debian 11 server. Use the following command on your terminal.
When upgrades and updates are complete, we can now begin to download headers, modules, and images.
Before we can proceed let’s check the Linux kernel we are having with the following command.
The best way to upgrade Linux Kernel in Debian is to install one of the supplied Linux kernel from the apt repository.
To check the available Linux Kernel on your repository, use the following command.
Then you will get the following output.
We are going to install Linux kernel image 5.17 unsigned.
2. Install Linux Kernel 5.16 on Debian 11 Bullseye.
Before running the installation, make sure you read all the prompts during installation so that you can not run into problems later on.
To install the image run the following command.
See the sample output below.
Then you need to reboot your system for the changes to take effect.
Now you can check the Linux Kernel again
Conclusion
Congratulations you have successfully upgraded your Debian kernel to 5.16.0-0.bpo.3-amd64 release.
How To Upgrade Linux Kernel
The easiest way to do this is to install one of the supplied Linux kernel image packages on your system. They may be obtained using apt-get or aptitude if you want to use the command line, or Synaptic if you want to use a GUI.
To install a Linux kernel image, you first have to decide which one you want to use. Start with
Note that images are available for several flavours — depending on your architecture.
A good overview on available versions can also be seen at linux.
The latest version can be installed using:
You might want to use unstable instead of experimental and/or choose a different mirror and flavour. Also the version and ABI version are probably different for you.
This might have some further dependencies, but generally they should not affect your stable (or testing) system. You still can select the old version in your bootloader afterwards.
Обновление ядра Debian
Ядро — это один из самых важных компонентов системы, именно здесь реализуется поддержка оборудования, выполняются основные действия по управлению процессами, памятью, сетью и другие действия. Новые версии ядра имеют максимальную поддержку современного оборудования, содержат исправления уязвимостей и многое другое. Поэтому очень важно, чтобы система использовала самые новые версии ядра.
Но Debian — это стабильный дистрибутив, поэтому в нем изначально применяется уже устаревшая версия. Но если захотеть, то можно установить более новую. В этой статье мы рассмотрим как выполняется обновление ядра Debian. Какие программы лучше использовать и так далее.
Обновление ядра Debian
Когда вы используете Debian, вы должны понимать, что самые новые версии пакетов вы не всегда можете получить. Один из таких компонентов — ядро. Вы можете взять ядро, собранное для других дистрибутивов, например, Ubuntu, но там использованы свои патчи, и скорее всего, оно не будет правильно работать в Debian. Самым простым способом получить новое ядро в этой системе будет использование тестовых репозиториев, таких, как backports и experimental. Например, сейчас самая новая версия Debian — 9. В ней используется ядро 4.9. Но в репозитории experimental есть ядро 4.13, на данный момент, это самая новая версия, доступная на Kernel.org.
Давайте рассмотрим как установить ядра из exprimental и backports. Пакеты из backports тоже свежие, но не настолько как из experimental, поэтому они более стабильны. Сначала рассмотрим backports, а уже затем experimental. Нам нужно добавить репозиторий в систему, для этого откройте файл /etc/apt/sources.list и добавьте туда такую строку:
deb http://ftp.debian.org/debian/ stretch-backports main non-free contrib
Обновите список пакетов:

Дальше нужно обновить список пакетов, а затем смотрим, какие версии ядра появились в системе:
apt search linux-headers

Как видите, в репозитории backports уже есть ядро 4.11, в то время как в официальном стабильном репозитории только 4.9. Теперь мы можем обновить ядро debian:
sudo apt install linux-headers-4.11-bpo.1 linux-image-4.11-bpo.1

После завершения установки ядра будет автоматически обновлен загрузчик Grub и вам останется только перезагрузить компьютер чтобы изменения вступили в силу. Обратите внимание, что если вы используете ноутбук, то вам еще нужно будет установить прошивку firmware из репозитория backports. Например, для iwlwifi:
sudo apt -t wheezy-backports install firmware-iwlwifi
Если вы хотите самую новую версию ядра, то вам придется использовать репозиторий experimental, но тут дела обстоят немного сложнее. Это экспериментальный репозиторий, поэтому перед добавлением нужно указать настройки чтобы по умолчанию он вообще не использовался и активировался для определенного пакета вручную. Для этого добавьте в файл /etc/apt/preferences:
Package: * Pin: release o=Debian,a=experimental Pin-Priority: 102

Мы установили такой приоритет, что он намного ниже стандартных репозиториев, а значит ничего случайно не обновится и не установится.

Теперь добавьте репозиторий в систему:
sudo vi /etc/apt/sources.list
deb http://deb.debian.org/debian experimental main

И обновите список пакетов:
sudo apt update
Проверьте, сработала ли настройка приоритета:

Дальше ищем доступные версии ядра:
sudo apt search linux-headers

Тут мы уже видим новую версию ядра Linux 4.13 из репозитория experimental, о которой я говорил выше. Дальше мы можем ее установить:
sudo apt install linux-headers-4.13 linux-image-4.13

Опять же, после установки будет автоматически обновлен Grub и вы сможете перезагрузить компьютер чтобы работать с новым ядром. Если вы поймаете какую-либо ошибку, то всегда можете выбрать в меню загрузчика предыдущее ядро, которое хорошо работало, а новое удалить командой:
sudo apt purge linux-headers-4.13 linux-image-4.13
Возможно, вам нужно будет указать другие версии пакетов, если вы выполняли установку из backports.
Выводы
В этой небольшой статье мы рассмотрели как выполняется обновление ядра Debian 9. Возможно, это сложнее, чем для других дистрибутивов, но в целом нет ничего сверх сложного и все можно сделать за несколько десятков минут. Но вам нужно учитывать, что если вы используете проприетарные драйвера от NVIDIA или AMD, то ядро лучше вообще не трогать, потому что драйвера могут еще не поддерживать новые версии. Вы можете не только обновить ядро из репозиториев, но и собрать ядро из исходников. Если у вас остались вопросы, спрашивайте в комментариях!
How to Upgrade Kernel in Debian 11 Bullseye
Updating your kernel is necessary when you need to add functionalities or device support, patch bugs, or increase your system performance.
After reading this article, you will be able to update your Linux kernel in a few steps.
For this tutorial, I will upgrade to kernel 5.16, but the instructions provided are helpful for other kernel versions too. Just replace the 5.16.15 version in this article for your version.
All instructions are also useful for previous Debian versions. You can ignore the fact this article was written using Debian Bullseye.
The tutorial includes screenshots for all described steps, making it easy for any Linux user to follow them.
Upgrading the Kernel in Debian 11 Bullseye:
To begin, let’s see how to determine your current kernel. You can use the uname command followed by the -r parameter, as shown below:

As you can see above, the current kernel is 5.10.0. Let’s download a newer kernel.
For this Debian tutorial, I will upgrade to the 5.16 kernel. To download it from the source mentioned previously, you can use the wget command as shown below:
Note: You can use this tutorial to install other kernel versions, just replace the path and kernel name.

Also, download the kernel signature with the command, as shown below:

Extract the kernel you downloaded by running the following command (The command below assumes you have the .tar.gz package):
Where “Version” must be replaced with the actual kernel version, you downloaded.

Enter the directory with the files you extracted by running the following command:

Update the configuration file by running the command shown in the following image:

Install the needed packages to compile the Linux kernel by executing the following command:

To configure the kernel and adding or removing devices support, run the following command:

You can explore all options on this screen to customize the kernel according to your needs. Once you finish, press the Save button:

Press the OK button to save the configuration file.

Press the Exit button to finish the process.

Press the Exit button again to return to the terminal.

Disable unnecessary modules and create a .config file based on your kernel’s current configuration by executing the following command:

Now, start compiling the new kernel by running the command shown in the following image. This process may take several minutes.

You will get a similar output as shown below:

Install the kernel modules by running the following command:

If you used the sudo command during the process, you might be required to type your sudo password, as shown below:

Finish installing the new kernel by executing the following line:

You need GRUB, a bootloader, to incorporate the new kernel to boot it.
To do it, just update GRUB by running the following command:

Now, reboot your system to load the new kernel.

After booting, recheck your kernel by running the following command:

As you can see, the kernel was successfully updated. Now, you can enjoy your upgraded system.
What Is the Linux Kernel?
The Linux kernel is the system’s core, whose main task is to allow interaction between hardware and software. It defines the processes that can pass through the CPU and the amount of available resources for each one. It also analyzes the memory and manages drivers.
You can consider part of the kernel function as a translator between different components, including abstract components like the rest of the operating system.
The Linux kernel is free and open-source, and it’s written in the C language. It was developed by Linus Torvalds. It is licensed under the GNU General Public License V2. Today, it is widely supported, and new releases are published periodically. Currently, the community behind the kernel development has over 6,000 collaborators.
Some experts argue the kernel is the operating system, while Linux is an addition.
When compiling it, you can add support for unsupported hardware, add features and patch bugs and security issues, as shown previously in the make menuconfig step. This is especially useful for systems like Debian using old kernel versions.
You can include different kernel versions in your bootloader to choose between them when booting your system.
For additional information on the Linux kernel and releases, visit https://kernel.org.
Conclusion:
As you can see, upgrading the Linux kernel in Debian 11 Bullseye is a long but easy task any Linux user can achieve. There are many steps as described above, but the process is easy by following the steps explained in this tutorial.
If you are using Debian 10 or Debian 9, you can still compile a new kernel by following the instructions above. The process is even similar for other Linux distributions except for the steps using the apt/apt-get packages manager and for systems using a different bootloader than GRUB (In such a case, you only need to replace the GRUB update for your bootloader update). After updating your kernel, you may feel the performance of your system improve the support selected in the configuration step.
Thank you for reading this article explaining how to upgrade the kernel in Debian. I hope this article was useful for you. Keep following Linux Hint for more professional Linux tutorials.
About the author
David Adams
David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.