Actor efi_finalization_fix unexpectedly terminated with exit code: 1

This is the title of the first entry in my AlmaLinux 8 to 9 leapp-report. The Risk Factor for the entry is listed as “high (error)”. This was an upgrade from CentOS 7 on an HP Proliant ML10 Gen9 machine. Although I had to work through some significant SELinux repair issues, the server is now stable and working as expected. The feedback I would appreciate is what should I check for things left in a bad state due to final upgrade steps that may not have completed. Here is the entire entry from the report:

Risk Factor: high (error)
Title: Actor efi_finalization_fix unexpectedly terminated with exit code: 1
Summary: Traceback (most recent call last):
  File "/root/tmp_leapp_py3/leapp/repository/actor_definition.py", line 75, in _do_run
    actor_instance.run(*args, **kwargs)
  File "/root/tmp_leapp_py3/leapp/actors/__init__.py", line 296, in run
    self.process(*args)
  File "/etc/leapp/repos.d/system_upgrade/common/actors/efibootorderfix/finalization/actor.py", line 115, in process
    run(['/sbin/efibootmgr', '-c', '-d', efidev, '-p', efipart, '-l', bootmgr_path, '-L', efi_bootentry_label])
  File "/root/tmp_leapp_py3/leapp/libraries/stdlib/__init__.py", line 189, in run
    raise CalledProcessError(
leapp.libraries.stdlib.CalledProcessError: Command ['/sbin/efibootmgr', '-c', '-d', '/dev/md126p', '-p', '1', '-l', '\\EFI\\almalinux\\shimx64.efi', '-L', 'AlmaLinux'] failed with exit code 5.

Could you please report ELevate packages used to upgrade, like leapp-upgrade-el8toel9, leapp-data-almalinux.

I followed this CentOS7 to AlmaLinux 9 article so it would have been the appropriate elevate-release package along with leapp-upgrade and leapp-data-almalinux as of 27 Dec 2024. My dnf history provides:
elevate-release-1.0-2.el8.noarch,
leapp-data-almalinux-0.4-12.el8.20240827.noarch,
leapp-deps-0.18.0-1.el8.noarch,
leapp-upgrade-el8toel9-1:0.21.0-2.el8.elevate.4.noarch,
leapp-upgrade-el8toel9-deps-1:0.21.0-2.el8.elevate.4.noarch, and
python3-leapp-0.18.0-1.el8.noarch.

1 Like

What about /dev/md126p1 path ?
Is it correct EFI device ?

Here is the output of lsblk. The devices sda and sdb make up a Raid 1 device. Let me know what else would help.
lsblk-20250107

1 Like

efibootmgr -v output ?

MAC address was redacted:

BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0000,0001,0004,0002,0005,0006
Boot0000* CentOS	HD(1,GPT,58dbe10a-e64d-4905-a488-3236961feb34,0x800,0xfa000)/File(\EFI\CENTOS\SHIMX64.EFI)
Boot0001* UEFI: IP4 Intel(R) Ethernet Connection (H) I219-LM	PciRoot(0x0)/Pci(0x1f,0x6)/MAC(XXXXXXXXXXXX,0)/IPv4(0.0.0.00.0.0.0,0,0)..BO
Boot0002* UEFI: IP6 Intel(R) Ethernet Connection (H) I219-LM	PciRoot(0x0)/Pci(0x1f,0x6)/MAC(XXXXXXXXXXXX,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0003* AlmaLinux	HD(1,GPT,58dbe10a-e64d-4905-a488-3236961feb34,0x800,0xfa000)/File(\EFI\ALMALINUX\SHIMX64.EFI)
Boot0004* UEFI: Built-in EFI Shell	VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0005* CentOS	HD(1,GPT,58dbe10a-e64d-4905-a488-3236961feb34,0x800,0xfa000)/File(\EFI\CENTOS\SHIM.EFI)..BO
Boot0006* UEFI OS	HD(1,GPT,58dbe10a-e64d-4905-a488-3236961feb34,0x800,0xfa000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

So, the command and its arguments looks correct for me

/sbin/efibootmgr -c -d /dev/md126p -p 1 -l '\\EFI\\almalinux\\shimx64.efi' -L AlmaLinux

Also, exit code 5 is something out of scope efibootmgr’s code
at efibootmgr/src/efibootmgr.c at main · rhboot/efibootmgr · GitHub

You may try to run the command in your system, with -v argument to print additional information.