If you really want to alter the behavior of grub on failed boot, so that it will non-interactively reboot instead of waiting indefinitely, you can also just set a different value for GRUB_RECORDFAIL_TIMEOUT in /etc/default/grub (instead of the default of -1).
If you really want to alter the behavior of grub on failed boot, so that it will non-interactively reboot instead of waiting indefinitely, you can also just set a different value for GRUB_RECORDFAIL _TIMEOUT in /etc/default/grub (instead of the default of -1).