I'm using Clover as my first and default bootloader. If Ubuntu is selected there, then Grub is activated (AFAIK there is no way to skip this step, I don't really use Grub at all, so I might as well remove it). My system uses UEFI, so I've set my preferred bootorder using
sudo efibootmgr -o XXXX,YYYY,ZZZZ
which works fine, until Grub is updated again. During the update my UEFI boot order settings are overwritten by the Grub defaults, with which Grub is always set as the first bootloader to be reached.
Is there anyway to persist the boot order that I have set up and prevent Grub from changing it back to its own defaults?
For the first couple of questions accept the existing values (just press Enter) but when it comes to this, select No:
The answer from Tobia worked for me on one machine, but on a different machine I found that
grub-pc
was installed instead ofgrub-efi-amd64
. When I trieddpkg-reconfigure grub-pc
, I found that it doesn't always ask this question, despite it sometimes being used in EFI mode. So getting to the crux of where this setting lives, I found that they are both actually modifying thedebconf
database entry namedgrub2/update_nvram
. Thanks to this article, I found that you can directly set this variable with the following command:You can confirm the setting this way:
...which will output the current value of the variable.