I agree this question had been asked before. I have tried one of them and I lost the connection so to be sure I am asking again.
I have a headless server which I can connect to only with SSH. After apt upgrade I realized that the new kernel can't work with our virtualization solution.
current kernel:
uname -r
5.4.0-137-generic
now I have to turn back to
5.4.0-121-generic.
sudo grub-mkconfig | grep -iE "menuentry 'Ubuntu, with Linux" | awk '{print i++ " : "$1, $2, $3, $4, $5, $6, $7}'
0 : menuentry 'Ubuntu, with Linux 5.4.0-137-generic' --class ubuntu
1 : menuentry 'Ubuntu, with Linux 5.4.0-137-generic (recovery mode)'
2 : menuentry 'Ubuntu, with Linux 5.4.0-121-generic' --class ubuntu
3 : menuentry 'Ubuntu, with Linux 5.4.0-121-generic (recovery mode)'
I have followed this one before
"modified GRUB_DEFAULT="1>2" value in /etc/default/grub executed below command to regenerate a grub config file with modified GRUB_DEFAULT settings."
update-grub
reboot
I could not access to my server again. This one is the second server with the same configuration and to be honest I am scared if things may happen again.
I need your help. What is the safest method to bypass 137 and automatically boot from 121 after reboot.