Just wanted to share this with anyone wanting to know.
If your headless server crashes, GRUB2 (at least on Ubuntu Server) is designed to force the GRUB menu to load up next time it starts up, which means you are locked out of SSH until someone physically makes a kernel selection on the PC.
To prevent this do the following change to your grub.cfg file.
#nano /boot/grub/grub.cfg
You want to find this line and change it:
Code:
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
And change to:
Code:
if [ ${recordfail} = 1 ]; then
set timeout=3
else
set timeout=10
fi
Or a number other than -1.
I was looking for a solution for this for a long time and found no hel with google. Let me know if there is a better way.
I aware this file will get overwritten and need reediting if the Kernel gets updated.