grub2 upgrade doesn't preserve current boot order.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This is a follow up discussion from #1642298 and filing this bug to keep a record.
On a fresh Ubuntu install, grub2 overwrites the NVRAM and updates to boot order to have Ubuntu as the first boot device. This affects situations in which PXE had been set the first boot device in the boot order as it would overwrite it.
However, every single time grub2 package upgrades, it will overwrite the NVRAM and completely override the boot order again. For example, consider that ubuntu is first in the boot order.
efibootmgr -v
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001
Boot0000* ubuntu
Boot0001 PCI LAN
But the administrator changed Network to be the first in the boot order.
efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0000
Boot0001* PCI LAN
Boot0000 ubuntu
After a package upgrade, grub will overwrite the NVRAM and change this back to:
efibootmgr -v
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001
Boot0000* ubuntu
Boot0001 PCI LAN
tags: | added: id-59a726ab19e4a300b45a8a4d |
So the concern we are primarily interested on is the upgrade scenario.
Effectively, if 'ubuntu' is already in the boot order (and it is not the first one), on grub2 upgrade, it shouldn't be overwriting the current BootOrder (e.g. because we specifically configured it to Boot from the Network first).
So on package upgrades, it should be preserving the current boot order.