Grub tell you, he will boot in 5 seconds the marked entry.
The counter does not decrease and stay at 5 seconds.
If you power off the system and power on, it works like expected. If you make a reboot from running host, it hangs.
Maybe the system try to configure the non-existing keyboard while debian comes up, for example the keyboard layout. But this will fail, but left some crazy stuff in the system that over life a soft-reboot.
And this is where grub getting shocked and failed to decrease the counter
In the grub code you can set-up a explicit timeout for fails
Add in the file /etc/default/grub
the follow line:
GRUB_RECORDFAIL_TIMEOUT=5
Well, if really something goes wrong, he will boot … no matter what …