1. Problem summary I have an instance on AWS running Ubuntu 18.04. The kernel version is 5.4.0. I have installed kernel 4.15.0 but I am failing to set it as the default.
2. What I have tried
A) I set the following values in /etc/default/grub
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_DISABLE_SUBMENU=y
and made sure there is no value for GRUB_DEFAULT in /etc/default/grub.d/50-cloudimg-settings.cfg
Created an environment variable for GRUB_CONFIG using
export GRUB_CONFIG=`sudo find /boot -name "grub.cfg"
I rebuilt grub.cfg using sudo update-grub
and rebooted the instances, but no change in the active kernel observed from running uname -r
.
B) I also tried the solution of deleting the kernel that I no longer want described [here] (https://stackoverflow.com/questions/25993363/how-to-remove-a-newly-installed-kernel) but the instance then fails status checks and I cannot connect to it using SSH.
C) I set the value for GRUB_DEFAULT to the menu_string as GRUB_DEFAULT="gnulinux-advanced-0d5e1897-19aa-4121-b1f8-2c7e0f833c4d>gnulinux-4.15.0-20-generic-advanced-0d5e1897-19aa-4121-b1f8-2c7e0f833c4d"
, rebuilt grub.cfg using sudo update-grub
, but still no change after rebooting.