[HowTo] Install the latest Linux Kernel

Write tutorials for LMDE here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post please read forum rules
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

[HowTo] Install the latest Linux Kernel

Post by cpedretti »

The Linux Kernel history => https://en.wikipedia.org/wiki/Linux_kernel

The Linux Kernel's => https://www.kernel.org/


To know how kernel are installed:

Code: Select all

uname -a

Good news LMDE4 already has backports repository activated by default, we use later the backports sources to update our kernel.


To search a newest kernel:

Code: Select all

sudo apt search linux-image

In the output we will see a lot of kernels, but we have interest to the latest, at this time the kernel 5.7:

Image


Lets do it and install the latest kernel:

Code: Select all

sudo apt install linux-image-5.7.0-0.bpo.2-amd64 linux-headers-5.7.0-0.bpo.2-amd64 -t buster-backports -y

A reboot is needed to boot on the new kernel:

Code: Select all

sudo reboot

We can check now:

Code: Select all

uname -a

let's take it a step further by removing the old kernels, in general it is advisable to keep 2 kernels in case there is a problem with one of them.

To view the installed kernel:

Code: Select all

sudo dpkg --list 'linux-image*'
In the output you will see how kernel you can purge.


Example to purge a kernel:

Code: Select all

sudo apt autoremove --purge linux-image-5.6.0-0.bpo.2-amd64 linux-headers-5.6.0-0.bpo.2-amd64 -y

We need to upgrade the grub with the changes we made:

Code: Select all

sudo update-grub2

After an reboot in the boot menu, select advanced options, you can also check the kernels who are usable.


In case if you have a graphic card using open firmwares you'll need to update your kernel with it, just check this tutorial
Last edited by cpedretti on Thu Aug 11, 2022 6:49 am, edited 11 times in total.
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
jwiz
Level 4
Level 4
Posts: 347
Joined: Tue Dec 20, 2016 6:59 am

Re: [HowTo] Install the latest Linux Kernel

Post by jwiz »

cpedretti wrote: Fri Aug 14, 2020 7:46 am The Linux Kernel => https://en.wikipedia.org/wiki/Linux_kernel
...
Good news LMDE4 already has backports repository activated by default, we use later the backports sources to update our kernel.
...
Lets do it and install the latest kernel:

Code: Select all

apt install linux-image-5.7.0-0.bpo.2-amd64 apt install linux-headers-5.7.0-0.bpo.2-amd64 -y
...
I'd propose to use the respective meta-package instead : apt install linux-image-amd64 -y
User avatar
antikythera
Level 15
Level 15
Posts: 5721
Joined: Thu Jul 02, 2020 12:52 pm
Location: Cymru

Re: [HowTo] Install the latest Linux Kernel

Post by antikythera »

LanceM wrote: Thu Mar 19, 2020 9:11 pm
Backports are all ready enabled on LMDE4, for optain a update of your kernel make :

Code: Select all

apt update && apt install -t buster-backports linux-image-amd64 -y && apt install -t buster-backports linux-headers-amd64 -y && apt install -t buster-backports firmware-linux firmware-linux-nonfree -y && reboot
Thanks! It worked perfectly. I removed the SSD from the Intel i5-8500 and put it in the 3400G machine after getting the 5.4 kernel. Presto! Picasso drivers installed and working perfectly. Much appreciated!
this method covers backport metapackages and will deliver kernel 5.7 bpo2 currently. If you do want a specific branch, say kernel 5.4 now then search what kernel and kmod packages are already installed and apply the equivalents for the newest bpo package for that branch as per the longer instructions above.

I would recommend using the bpo linux firmware packages too though.
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

jwiz wrote: Fri Aug 14, 2020 9:14 am
cpedretti wrote: Fri Aug 14, 2020 7:46 am The Linux Kernel => https://en.wikipedia.org/wiki/Linux_kernel
...
Good news LMDE4 already has backports repository activated by default, we use later the backports sources to update our kernel.
...
Lets do it and install the latest kernel:

Code: Select all

apt install linux-image-5.7.0-0.bpo.2-amd64 apt install linux-headers-5.7.0-0.bpo.2-amd64 -y
...
I'd propose to use the respective meta-package instead : apt install linux-image-amd64 -y
About backports

You are running Debian stable because you prefer the stable Debian tree. It runs great, there is just one problem: The software is a little bit outdated compared to other distributions. That is where backports come in.

Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates) in a stable environment so that they will run without new libraries (whenever it is possible) on a Debian stable distribution

Backports cannot be tested as extensively as Debian stable, and backports are provided on an as-is basis, with risk of incompatibilities with other components in Debian stable. Use with care!

It is therefore recommended to select single backported packages that fit your needs, and not use all available backports.

Source
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

the latest stable linux kernel is available => 5.9

To update it just follow the HowTo up there.
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
DAMIEN1307

Re: [HowTo] Install the latest Linux Kernel

Post by DAMIEN1307 »

Why bother...kernel 5.9 reached EOL, (End of Life), Dec.22nd 2020...DAMIEN

https://itsubuntu.com/linux-kernel-5-9- ... d-of-life/
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

DAMIEN1307 wrote: Wed Dec 30, 2020 8:01 am Why bother...kernel 5.9 reached EOL, (End of Life), Dec.22nd 2020...DAMIEN

https://itsubuntu.com/linux-kernel-5-9- ... d-of-life/
Thanks for the info, but for the moment the 5.10 kernel is not yet available, see attached screenshot.

Image


Here we can see on the https://www.kernel.org/ Site that the 5.10.4 are the latest stable availlable, but in my example we are working on LMDE not Mint, I think that's why the latest kernel is not yet offered.

You will have to wait while waiting for the last stable kernel to be made available on LMDE.
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
ne0h

Re: [HowTo] Install the latest Linux Kernel

Post by ne0h »

I have LMDE4. I installed the proprietary nvidia drivers on the 4.19 default kernel. if I install a new kernel from backports, I update grub, but then at the boot screen, I select to boot the new kernel, but after giving Enter, I am left with a black screen. instead if I start from 4.19 everything works fine. so the problem is the nvidia driver. is there an easier way than having to remove the nvidia drivers, install the new kernel, and then reinstall the nvidia drivers on the new kernel again?
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

ne0h wrote: Sat Aug 21, 2021 4:52 am I have LMDE4. I installed the proprietary nvidia drivers on the 4.19 default kernel. if I install a new kernel from backports, I update grub, but then at the boot screen, I select to boot the new kernel, but after giving Enter, I am left with a black screen. instead if I start from 4.19 everything works fine. so the problem is the nvidia driver. is there an easier way than having to remove the nvidia drivers, install the new kernel, and then reinstall the nvidia drivers on the new kernel again?
excuse me for the late reply, it is possible that the driver was not activated during the installation of the new kernel.

To remedy this, simply reinstall the following packages in recovery mode:

Code: Select all

sudo apt install -t buster-backports nvidia-driver nvidia detect firmware-misc-nonfree -y
Hope this can solve your issue.


Source
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

the latest stable linux kernel is available => 5.10

To update it just follow the HowTo up there.
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
ne0h

Re: [HowTo] Install the latest Linux Kernel

Post by ne0h »

cpedretti wrote: Thu Sep 09, 2021 11:20 pm
ne0h wrote: Sat Aug 21, 2021 4:52 am I have LMDE4. I installed the proprietary nvidia drivers on the 4.19 default kernel. if I install a new kernel from backports, I update grub, but then at the boot screen, I select to boot the new kernel, but after giving Enter, I am left with a black screen. instead if I start from 4.19 everything works fine. so the problem is the nvidia driver. is there an easier way than having to remove the nvidia drivers, install the new kernel, and then reinstall the nvidia drivers on the new kernel again?
excuse me for the late reply, it is possible that the driver was not activated during the installation of the new kernel.

To remedy this, simply reinstall the following packages in recovery mode:

Code: Select all

sudo apt install -t buster-backports nvidia-driver nvidia detect firmware-misc-nonfree -y
Hope this can solve your issue.


Source
i'll try, but in recovery mode this is what it happens:
https://ibb.co/dbL7Ssq
https://ibb.co/R3QNrCc

i have install the 5.10 kernel amd64 backport, and the relative headers.

what i have to do?
thanks!
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

ne0h wrote: Sat Oct 16, 2021 6:23 am
cpedretti wrote: Thu Sep 09, 2021 11:20 pm
ne0h wrote: Sat Aug 21, 2021 4:52 am I have LMDE4. I installed the proprietary nvidia drivers on the 4.19 default kernel. if I install a new kernel from backports, I update grub, but then at the boot screen, I select to boot the new kernel, but after giving Enter, I am left with a black screen. instead if I start from 4.19 everything works fine. so the problem is the nvidia driver. is there an easier way than having to remove the nvidia drivers, install the new kernel, and then reinstall the nvidia drivers on the new kernel again?
excuse me for the late reply, it is possible that the driver was not activated during the installation of the new kernel.

To remedy this, simply reinstall the following packages in recovery mode:

Code: Select all

sudo apt install -t buster-backports nvidia-driver nvidia detect firmware-misc-nonfree -y
Hope this can solve your issue.


Source
i'll try, but in recovery mode this is what it happens:
https://ibb.co/dbL7Ssq
https://ibb.co/R3QNrCc

i have install the 5.10 kernel amd64 backport, and the relative headers.

what i have to do?
thanks!
In the recovery mode unlock the root account with your password then try to reinstall the driver like:

Code: Select all

sudo apt install --reinstall -t buster-backports nvidia-driver nvidia detect firmware-misc-nonfree -y
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
Aztaroth
Level 5
Level 5
Posts: 764
Joined: Mon Jan 11, 2021 1:48 am

Re: [HowTo] Install the latest Linux Kernel

Post by Aztaroth »

ne0h wrote: Sat Oct 16, 2021 6:23 am i have install the 5.10 kernel amd64 backport, and the relative headers.

what i have to do?
thanks!
Hello,
1) About your signature, if you use liquorix kernels, you must know they are not fully supported and may cause random issues.
2) The standard procedure to install nvidia in Debian (which LMDE4 is more or less) can be found here :
https://wiki.debian.org/NvidiaGraphicsDrivers
3) However, the link to it comes from :
https://wiki.debian.org/DontBreakDebian ... ll_scripts
which states :
Debian includes free and open-source drivers that support most video cards. The free drivers provide the best integration with the rest of the Debian system and work quite well for most users.
This is plain logic because each kernel contains its own nouveau driver. So, unless you absolutely need some feature the nouveau driver doesn't provide, keep it.
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
ne0h

Re: [HowTo] Install the latest Linux Kernel

Post by ne0h »

I solved.
fresh installation of LMDE4 without nvidia driver. then i installed the 5.10 kernel, then i installed the nvidia drivers manually on this kernel. everything OK!
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

The latest stable linux kernel is available => 5.10.0-0.bpo.9

To update it just follow the HowTo up there.
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

The latest stable linux kernel for LMDE5 is available => 5.15.0-0.bpo.3

To update it just follow the HowTo up there (don't forget to change the old backports with bullseye-backports.)
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

The latest stable linux kernel for LMDE5 is available => 5.16.0-0.bpo.4

To update it just follow the HowTo up there (don't forget to change the old backports with bullseye-backports.)
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: [HowTo] Install the latest Linux Kernel

Post by xenopeek »

Why are you not using command like:
apt install -t bullseye-backports linux-image-amd64 linux-headers-amd64
That pulls in the current backports kernel version, not needing to specify version.
Image
User avatar
antikythera
Level 15
Level 15
Posts: 5721
Joined: Thu Jul 02, 2020 12:52 pm
Location: Cymru

Re: [HowTo] Install the latest Linux Kernel

Post by antikythera »

antikythera wrote: Fri Aug 14, 2020 3:46 pm
LanceM wrote: Thu Mar 19, 2020 9:11 pm
Backports are all ready enabled on LMDE4, for optain a update of your kernel make :

Code: Select all

apt update && apt install -t buster-backports linux-image-amd64 -y && apt install -t buster-backports linux-headers-amd64 -y && apt install -t buster-backports firmware-linux firmware-linux-nonfree -y && reboot
Thanks! It worked perfectly. I removed the SSD from the Intel i5-8500 and put it in the 3400G machine after getting the 5.4 kernel. Presto! Picasso drivers installed and working perfectly. Much appreciated!
this method covers backport metapackages and will deliver kernel 5.7 bpo2 currently. If you do want a specific branch, say kernel 5.4 now then search what kernel and kmod packages are already installed and apply the equivalents for the newest bpo package for that branch as per the longer instructions above.

I would recommend using the bpo linux firmware packages too though.
still works for LMDE5, just "replace all" buster with bullseye

Code: Select all

apt update && apt install -t bullseye-backports linux-image-amd64 -y && apt install -t bullseye-backports linux-headers-amd64 -y && apt install -t bullseye-backports firmware-linux firmware-linux-nonfree -y && reboot
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
User avatar
cpedretti
Level 3
Level 3
Posts: 199
Joined: Tue Mar 10, 2020 12:06 am

Re: [HowTo] Install the latest Linux Kernel

Post by cpedretti »

xenopeek wrote: Tue Apr 12, 2022 5:08 am Why are you not using command like:
apt install -t bullseye-backports linux-image-amd64 linux-headers-amd64
That pulls in the current backports kernel version, not needing to specify version.
I prefer to use the absolute path, just to have control over the interpretation and not the system's choice.

But it's always useful to know the relative paths.
antikythera wrote: Tue Jun 07, 2022 8:07 am
antikythera wrote: Fri Aug 14, 2020 3:46 pm
LanceM wrote: Thu Mar 19, 2020 9:11 pm

Code: Select all

apt update && apt install -t buster-backports linux-image-amd64 -y && apt install -t buster-backports linux-headers-amd64 -y && apt install -t buster-backports firmware-linux firmware-linux-nonfree -y && reboot
Thanks! It worked perfectly. I removed the SSD from the Intel i5-8500 and put it in the 3400G machine after getting the 5.4 kernel. Presto! Picasso drivers installed and working perfectly. Much appreciated!
this method covers backport metapackages and will deliver kernel 5.7 bpo2 currently. If you do want a specific branch, say kernel 5.4 now then search what kernel and kmod packages are already installed and apply the equivalents for the newest bpo package for that branch as per the longer instructions above.

I would recommend using the bpo linux firmware packages too though.
still works for LMDE5, just "replace all" buster with bullseye

Code: Select all

apt update && apt install -t bullseye-backports linux-image-amd64 -y && apt install -t bullseye-backports linux-headers-amd64 -y && apt install -t bullseye-backports firmware-linux firmware-linux-nonfree -y && reboot
You forgot to mention that you were using the console as root user :roll:
AMD Ryzen 7 3700X - 32GB DDR4 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
Post Reply

Return to “Tutorials”