Installing Separate Kernel Versions in Ubuntu
Installing Separate Kernel Versions in Ubuntu
Check current version/architecture
We need to ensure we get the correct architecture when downloading the new kernel.
dan@ubuntu-test:~$ uname -r
5.11.0-27-generic
Download kernel from Ubuntu
Go to this URL and choose the folder with the version you need. Then navigate to the architecture required. As long as it isn’t an ARM chip choose amd64.
Download the following files:
linux-headers-VERSION_all.deb
linux-headers-VERSION_amd64.deb
linux-image-VERSION_amd64.deb
linux-image-extra-VERSION_amd64.deb
The linux-image-extra* file may not be there.
Install the new kernel
Install all of deb files you downloaded
dan@ubuntu-test:~$ ls
linux-headers-5.14.6-051406_5.14.6-051406.202109181232_all.deb
linux-headers-5.14.6-051406-generic_5.14.6-051406.202109181232_amd64.deb
linux-image-unsigned-5.14.6-051406-generic_5.14.6-051406.202109181232_amd64.deb
linux-modules-5.14.6-051406-generic_5.14.6-051406.202109181232_amd64.deb
dan@ubuntu-test:~$ sudo dpkg -i *.deb
Then reboot. After the reboot check to ensure the new kernel is the current one in use.
dan@ubuntu-test:~$ uname -r
5.14.6-051406-generic
Fixing Issues
If you have issues booting after the new kernel, you can boot from an older kernel version in grub. Then remove all of the new kernel packages you installed.
dan@ubuntu-test:~$ sudo apt remove -y "linux*VERSION*"
Then finally reboot so that the old kernel is back in place.