如何防止 grub 更新重置我的 EFI 引导顺序

Dan*_*eij 6 grub2 dual-boot bootloader uefi grub-efi

我使用 Clover 作为我的第一个和默认引导程序。如果在那里选择了 Ubuntu,那么 Grub 就会被激活(AFAIK 没有办法跳过这一步,我根本不使用 Grub,所以我不妨删除它)。我的系统使用 UEFI,所以我设置了我的首选引导顺序

sudo efibootmgr -o XXXX,YYYY,ZZZZ
Run Code Online (Sandbox Code Playgroud)

这工作正常,直到再次更新 Grub。在更新期间,我的 UEFI 引导顺序设置被 Grub 默认设置覆盖,Grub 始终设置为第一个要到达的引导加载程序。

无论如何,是否可以保留我设置的引导顺序并防止 Grub 将其更改回自己的默认值?

Tob*_*bia 5

sudo dpkg-reconfigure grub-efi-amd64
Run Code Online (Sandbox Code Playgroud)

对于前几个问题,接受现有值(只需按 Enter),但是当涉及到这一点时,请选择否:

 +----------------------| Configuring grub-efi-amd64 |-----------------------+
 |                                                                           |
 | GRUB can configure your platform's NVRAM variables so that it boots into  |
 | Debian automatically when powered on. However, you may prefer to disable  |
 | this behavior and avoid changes to your boot configuration. For example,  |
 | if your NVRAM variables have been set up such that your system contacts   |
 | a PXE server on every boot, this would preserve that behavior.            |
 |                                                                           |
 | Update NVRAM variables to automatically boot into Debian?                 |
 |                                                                           |
 |                    <Yes>                       <No>                       |
 |                                                ^^^^                       |
 +---------------------------------------------------------------------------+
Run Code Online (Sandbox Code Playgroud)