Downgrade Linux Kernel from 5.x HWE to 4.x GA
-
Hello to everyone
I need to perform a kernel Downgrade Removing the 5.x HWE to the 4.x GA but i wanna to be sure to follow a best practice to do it. I look at for a while on google and i found some different version about the procedure to follow but not sure what re the best the way to do it.
Do you have guideline any good link i can try to follow to do in a correct way ?
Having this kernel-image and header
-
rc linux-image-5.3.0-28-generic 5.3.0-28.30~18.04.1 amd64 Signed kernel image generic
-
ii linux-image-5.4.0-73-generic 5.4.0-73.82~18.04.1 amd64 Signed kernel image generic
-
ii linux-image-5.4.0-74-generic 5.4.0-74.83~18.04.1 amd64 Signed kernel image generic
-
ii linux-image-generic-hwe-18.04 5.4.0.74.83~18.04.67 amd64 Generic Linux kernel image
and Header
- ii linux-headers-5.3.0-28 5.3.0-28.30~18.04.1 all Header files related to Linux kernel version 5.3.0
- ii linux-headers-5.3.0-28-generic 5.3.0-28.30~18.04.1 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
- ii linux-headers-5.4.0-73-generic 5.4.0-73.82~18.04.1 amd64 Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
- ii linux-headers-5.4.0-74-generic 5.4.0-74.83~18.04.1 amd64 Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
- ii linux-headers-generic-hwe-18.04 5.4.0.74.83~18.04.67 amd64 Generic Linux kernel headers
how can i remove them completely and reinstall the Kernel 4.x GA?
These commands if correct are enought?
apt purge linux-image-5.3.* linux-headers-5.3.* apt purge linux-image-5.4.* linux-headers-5.4.* apt purge linux-image-generic-hwe-18.04 apt install linux-generic
are enought?
Thanks for the Help A.
-
-
4.x is no longer supported or patched. It also has many vulnerabilities.
Which Linux distro? You should be going up to 5.8. What is your reason to downgrade to such an old kernel with no security support?
-
It's ubuntu, i know but we have some incompatibility problem with a Application and we are forced to try to downgrade
-
@Giovanni-Baldi said in Downgrade Linux Kernel from 5.x HWE to 4.x GA:
It's ubuntu, i know but we have some incompatibility problem with a Application and we are forced to try to downgrade
Related to the command to run i would run first:
apt install linux-generic
To install the kernel 4.x, then i boot the system with this kernel and i would run the rest of the command to remove the kernel 5.x
apt purge linux-image-5.3.* linux-headers-5.3.* apt purge linux-image-5.4.* linux-headers-5.4.* apt purge linux-image-generic-hwe-18.04
I'm not sure but removing the linux-image-generic-hwe-18.04 i need also to run the this command?
apt install xserver-xorg-core?
Thanka for the help A
-
What is the issues. What errors are you seeing?
The issue with downgrading a kernel is will it support the hardware it is currently on. Usually, you fix the application to work with the kernel or spin up and older distro and move the application to it.
https://ubuntu.com/kernel/lifecycle
Ubuntu 16.04 was the last to support kernel 4.x.If you are running 16.04, try sudo apt install linux-generic
-
Backup before attempting a downgrade. If it fails, you won't boot up.
-
mainline: 5.13-rc6 2021-06-13 [tarball] [patch] [inc. patch] [view diff] [browse]
stable: 5.12.10 2021-06-10 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
stable: 5.11.22 [EOL] 2021-05-19 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
longterm: 5.10.43 2021-06-10 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
longterm: 5.4.125 2021-06-10 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
longterm: 4.19.194 2021-06-10 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
longterm: 4.14.236 2021-06-10 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
longterm: 4.9.272 2021-06-10 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
longterm: 4.4.272 2021-06-10 [tarball] [pgp] [patch] [inc. patch] [view diff] [browse] [changelog]
linux-next: next-20210615 2021-06-15 [browse] -
es, i'm really worried about what can happend, but unfortanately i have to do it. It is Ubuntu 18.04
The installation of the Kernel GA it is easy and it works just running:
apt install linux-generic
The main problem is to removing the olds one. I tried in a virtual machine and it is not so smoothly:
I run the following command
apt purge linux-image-5.3. apt purge linux-headers-5.3.* apt purge linux-image-5.4.* apt purge linux-headers-5.4.* apt purge linux-image-generic-hwe-18.04
But removing some of the kernel the /boot and /lib/modules/5.4.xxxxxx* gave me some problems:
In the /boot folder i still had some entry like this vmlinuz-5.4.x-x-generic so also updating manually the grub this deleted kernel was present in the grub menu and i had to delete manually.
In the /lib/modules/ for example was the kernel folder with the related modules wasn't deleted because i wasn't empty, and i did manually.
All this problems gave me to think, even because even removing all kernel i still have the HWE enabled and i should remove also that feature.
It seems that in does not exist a real "official " procedure to do that.....or i don't know.
A.
-
don't remove the old ones. See if this helps you.
https://docs.digitalocean.com/products/droplets/how-to/kernel/use-non-default/