Downgrading Kernel in Ubuntu 22.04 LTS
Here are the steps involved to downgrading Kernel Version from 6.5.0-45 to 6.5.0-28 in Ubuntu 22.04 LTS
Installing the Older Kernel Version
Typically, older kernel versions remain installed on Ubuntu systems unless they have been manually removed or purged. To check which kernel versions are currently installed, the following command can be executed:
1
dpkg -l | grep linux-image
If the required version is not installed, the user can manually install the older kernel by specifying the desired version number in the package name:
1
sudo apt install linux-image-6.5.0-28-generic linux-headers-6.5.0-28-generic linux-modules-extra-6.5.0-28-generic
Booting the Older Kernel Version from GRUB
All installed kernel versions are displayed in the GRUB Boot Loader Menu, which appears briefly during the boot process of Ubuntu. By default, the latest kernel version is automatically selected for booting. However, the user can navigate to “Advanced options for Ubuntu” and select it by pressing ENTER to see a list of available kernel versions.
If the GRUB menu does not appear during boot, it may be hidden or the display time may be too short. To address this, adjust the GRUB_TIMEOUT_STYLE
and GRUB_TIMEOUT
settings in GRUB configuration file /etc/default/grub
. After making these changes, the command sudo update-grub
should be executed. The GRUB menu will then be visible during the next system boot.
Configuring GRUB to Boot the Older Kernel
To retrieve all available boot menu entries, the user can run the following command:
1
grep 'menuentry \|submenu ' /boot/grub/grub.cfg | cut -f2 -d "'"
The output will display entries similar to:
1
2
3
4
5
6
Ubuntu
Advanced options for Ubuntu
...
...
Ubuntu, with Linux 6.5.0-28-generic
Ubuntu, with Linux 6.5.0-28-generic (recovery mode)
After obtaining the menu entries, Change the GRUB_DEFAULT=0
to GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 6.5.0-28-generic"
option in GRUB configuration file /etc/default/grub
. Following this, update the GRUB configuration by running update-grub
.
Upon the next system boot, the older kernel will be loaded. Finally, the kernel version is verified by executing uname -r
to ensure the system is running the desired kernel.
Reference
- For more details, refer to the following link: Ask Ubuntu