Counting menuentry
s
Count only the highest-level instances of menuentry
and submenu
in /boot/grub/grub.cfg
— ignore anything within a submenu
. If you have only Ubuntu installed, the UEFI Firmware Setup option should be third, after the submenu
for advanced options — i.e., you would set GRUB_DEFAULT=2
since GRUB counts from 0
. If you’re dual-booting with Windows, the GRUB_DEFAULT
should most likely be set to 3
.
Viewing the Menu
I notice that GRUB_TIMEOUT_STYLE
is set to countdown
. From GRUB’s manual, this means your GRUB menu would be hidden for GRUB_TIMEOUT
(5 seconds in your case), but with only a single number (usually at the top-left) showing the countdown.
In the ‘countdown’ case, it will show a one-line indication of the remaining time.
You probably want to set GRUB_TIMEOUT_STYLE
to "menu"
.
Even if you don’t, you should be able to view the menu during the 5-second countdown by pressing either ESC
, F4
, or holding SHIFT
:
If ESC or F4 are pressed, or SHIFT is held down during that time, it will display the menu and wait for input.
Getting to Firmware Setup
If your goal is to just have the UEFI Firmware Setup option show up, don’t change GRUB_DEFAULT
, because you’ll enter setup each time you boot, then. Instead, try what I said above in Viewing the Menu.
N.B.: Remember to run sudo update-grub
after editing /etc/default/grub
.
By the way, there is one possible cause of the UEFI entry disappearing from GRUB that I have here ignored; your machine may be booting up in Legacy BIOS mode, instead of UEFI. However if /boot/grub/grub.cfg
really does contain a menu entry for 'System setup'
like you say it does, with the command fwsetup
within it, then this is definitely not the case.
Note: the line that says 'System setup'
indicates that your UEFI Firmware Setup option in the GRUB menu will instead be titled System setup. Just a heads-up. You can name this anything you like.
Hope this helps!