This is the situation, for some unfortunate reason your Ubuntu system crashed, maybe there was a black out, maybe your cat seeking more attention unplugged the computer. In any case, at some point the computer is switched back on but it does not automatically start, it stays in the GRUB’s selection menu waiting for any entity, usually a humanoid form of it, to hit enter.
That’s fine if it is your main computer, but what about if it a headless server in the other side of the city (or the room)? Well, this falls in the category of “not a bug but an undocumented feature” kind of thing. To be all fair, it is somehow documented here, long story short, in Ubuntu after a failed boot/crash GRUB is designed to stay in the selection menu. Is there a way to disable such a behavior?
The Ubuntu documentation explains the old way to get rid of this “feature”. From 12.04 (Precise Pangolin) and above, there is a simpler way, that is to define the GRUB_RECORDFAIL_TIMEOUT variable in /etc/default/grub:
- GRUB_RECORDFAIL_TIMEOUT=0 # disables the menu, boots right away
- GRUB_RECORDFAIL_TIMEOUT=-1 # waits until the user selects an entry, default behavior
- GRUB_RECORDFAIL_TIMEOUT=XX # XX in seconds, waits for that amount of time before proceeding
After modifying /etc/default/grub you will have to update grub configuration file, as root:
$ sudo update-grub
By the way, as far as I have seen this affects only the Ubuntu family, the original GRUB package does not provide this behavior, in fact, GRUB_RECORDFAIL_TIMEOUT is not part of the GRUB’s configuration options, Ubuntu modifies it to support this functionality.