Use the following values in /etc/default/grub:
GRUB_HIDDEN_TIMEOUT=2
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_RECORDFAIL_TIMEOUT=2
Then run: sudo update-grub to commit settings.
GRUB_HIDDEN_TIMEOUTwill wait X number of seconds for a key to be pressed before displaying the menu. After which menu will be shown forGRUB_TIMEOUTseconds.- Using
GRUB_HIDDEN_TIMEOUT_QUIETto avoid the on-screen count down of the Grub menu. - Setting
GRUB_TIMEOUTto zero means to see the Grub menu withGRUB_HIDDEN_TIMEOUT- simply hold down Shift (or similar key) on bootup to access the Grub menu. GRUB_RECORDFAIL_TIMEOUTensures the Grub menu will display on countdown, rather than the default of "wait for a keypress" after failed boot/shutdown. Handy for headless/keyboard-less systems.- Note: Recent versions of Ubuntu/Grub will emit a
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.by default when rebuilding Grub config. The settings above will avoid this issue.