Comment 7 for bug 1899993

Revision history for this message
Ryan Harper (raharper) wrote :

@nb This issue is *slightly* different than the other bug related to missing BootCurrent value.

The previous bug which is fixed in curtin happens when the BootCurrent value is not present in the efibootmgr output.

This bug has a BootCurrent value, like 0003, however, the Entries provided by efibootmgr do not have one for 0003.

Here's the raw output from efibootmgr -v:

BootCurrent: 0003
Timeout: 10 seconds
BootOrder: 0003,0004,0005,0006,0001

This system has no boot entries; this is a firmware bug.

From the log file, after curtin adds an entry for Ubuntu we can see the boot entries look like this:

{
  "current": "0003",
  "timeout": "10 seconds",
  "order": [
    "0000"
  ],
  "entries": {
    "0000": {
      "name": "ubuntu",
      "path": "HD(1,GPT,0937ffdf-628c-4161-8b2f-5920235669c6,0x800,0x100000)/File(\\EFI\\ubuntu\\shimx64.efi)"
    }
  }
}

Current pointed entry '0003', however, the list of entries only contains '0000' (what curtin just installed). Then when curtin attempts to place the newly installed entry at the beginning of the BootOrder list, it fails when we run this command:

efibootmgr -o 0003,0000
Invalid BootOrder order entry value0003
                                     ^
efibootmgr: entry 0003 does not exist

The fix for this in curtin is to verify that BootCurrent points to an existing entry; if not, then we ignore the BootCurrent value.