Grub 2.16.x option GRUB_DISABLE_UEFI_FIRMWARE=true

Hi in grub 2:2.16-3 tried the option GRUB_DISABLE_UEFI_FIRMWARE=true
The option should hide the “System setup” option from the GRUB boot menu on UEFI-based computers.

still after sudo update-grub the option uefi firmware settings shows up in bootmenu.
Perhaps still a bug ?
I am on unstable branch

you are seing older UEFI fallback before version grub 2.16
if you suppress with efibootmgr , and run the command after
, it will not add or update Uefi fallback any more

However my point is when the option GRUB_DISABLE_UEFI_FIRMWARE=true is set in /etc/default/grub i should not see it at all in bootmenu

grub will not remove from nvram , you need to see with efibootmgr for that

I’m afraid you misunderstand. The option @stormschip is talking about is the menu entry for booting into the UEFI settings from within the grub menu.

Yes you are right aragorn

Looks very much like a bug to me. New version, several new options to toggle, not even properly documented, maybe something is buggy.
If you really really want to hide it, grub builds the menu from building bricks in the /etc/grub.d. So you can backup and play with /etc/grub.d/30_uefi-firmware.

Note that this is purely cosmetic though. From the grub menu one can invoke the grub prompt and manually fire fwsetup. Not to mention the hardware key before even grub is loaded.
So if you want to prevent users entering firmware - setting a password in the firmware is the right way.

Please don’t hijack topics without reading the question and be sure that you are actually answering this particular question. What you did…is something else.

Understood. I didn’t read the original post carefully enough and assumed it was referencing all the added menu items that suddenly showed up. Apologies for hijacking.

To add to this tangent…

Rather than just “running these commands”.

The files in /etc/grub.d/ have to be executable in order to work. So this is an easy way to disable grub components without deleting.

People should only be doing this if they know what they are doing (or need to disable a component).

Hi,

Well they are executable. Imho the grub developers should come with a solution for this subject.
I think however with an update of grub as a package the 30_uefi-firmware wiil re-appear.
For now i thank you all for your contributions and see how it will develop in the future.

They have.

You can see in the file, in the first area of the script:

/etc/grub.d/31_efi_bootnext


if [ "${GRUB_DISABLE_BOOTNEXT}" = "true" ]; then
    exit 0
fi

Just set GRUB_DISABLE_BOOTNEXT to true.

Good to know. Although pretty illogical that “boot next” controls the “disable firmware” too (then why does the latter exist?). Let’s hope it will start working properly in the future.

Complex toys demand RTFM… whenever its eventually updated.

In the case of SpamDroid™, updating something which seems like snake oil seems like a charm.

Actually having an easily-accessible and widely published “Fine Manual” in the first place would be handy, so we could actually read it. :wink:

I’m sure there are online resources, but it’s not like there’s any easily-discoverable “help” or “tutorial” feature on the devices I’ve encountered, which is where you’ll need it.

Actually a quick look at the source shows that the new version is kinda work in progress still.

has correctly an internal toggle for the setting in /etc/default/grub

if [ "${GRUB_DISABLE_BOOTNEXT}" = "true" ]; then
    exit 0
fi

and we even have a bit of text about it in the manual

@item GRUB_DISABLE_BOOTNEXT
If set to @samp{true}, @command{grub-mkconfig} will not generate
@command{bootnext} menu entries for other EFI boot manager entries detected
via @command{efibootmgr}.  This disables the entire
@file{31_efi_bootnext} script.

but if we look at

https://gitlab.freedesktop.org/gnu-grub/grub/-/blob/master/util/grub.d/30_uefi-firmware.in

there is no such if there…is does not bother to check its setting if it is turned on, like @stormschip noticed in practice. Maybe this is just developer inconsistency, maybe it is supposed to be somewhere else and was forgotten… i won’t dive that deep in the code to check it up, for now i will assume it is a bug and the toggle does not do anything.
There is also not a word in the current version of the manual about it :wink:

That’s the wrong file isn’t it?

We’re looking at:
https://gitlab.freedesktop.org/gnu-grub/grub/-/blob/master/util/grub.d/31_efi_bootnext.in

Nope. The question in the title was for the fimware file. Another user chimed in with the bootnext (post now deleted) and you took the “bait” and now we have a lot of “offtopic”. Things are interconnected of course, but originally the question was about the firmware file and toggle (which seems to be just a placeholder in this version).

What i am trying to mention is that if someone respons to this topic it has not to be off-topic.
When the reply is from a community assisant or moderator i was hoping for a reaction which adds something to the original topic
That’s all