Power Failure GRUB Boot Hang

On an unclean shutdown, GRUB will stop before booting the kernel. This is a problem if your server is headless. There is lots of advice on how to handle this, but the best way is to take advantage of the already provided parameter; 


As described in this web page (though beware of the path described and the path you actually have)


Speicifcally, one should issue the commands

echo "GRUB_RECORDFAIL_TIMEOUT=5" | sudo tee -a /etc/default/grub
sudo update-grub
sudo dpkg-reconfigure grub-pc

The last command looks daunting, but just take the defaults (as long as you don't have another disk with a linux distro plugged in, whereupon you must make sure of the drives).

You may also want to change the boot defaults to automatically repair file system errors

~$ sudo vi /etc/default/rcS

# automatically repair filesystems with inconsistencies during boot