← Back to team overview

curtin-dev team mailing list archive

[Merge] ~xnox/curtin:lp1906379 into curtin:master

 

Dimitri John Ledkov has proposed merging ~xnox/curtin:lp1906379 into curtin:master.

Commit message:
install_grub: fix find_efi_loader path discovery

When trying to test for target_path() the path passed to the function should the one relative the root of the target. Since the returned efi_loader path should be the one suitable to be passed to the efibootmgr.

Also, add arm64 paths.

LP: #1906379

Requested reviews:
  curtin developers (curtin-dev)
Related bugs:
  Bug #1906379 in curtin: "Ubuntu removes CentOS UEFI boot entry on shutdown"
  https://bugs.launchpad.net/curtin/+bug/1906379

For more details, see:
https://code.launchpad.net/~xnox/curtin/+git/curtin/+merge/396820
-- 
Your team curtin developers is requested to review the proposed merge of ~xnox/curtin:lp1906379 into curtin:master.
diff --git a/curtin/commands/install_grub.py b/curtin/commands/install_grub.py
index 3e6313f..66334dd 100644
--- a/curtin/commands/install_grub.py
+++ b/curtin/commands/install_grub.py
@@ -212,11 +212,14 @@ def write_grub_config(target, grubcfg, grub_conf, new_params):
 
 
 def find_efi_loader(target, bootid):
-    efi_path = '/boot/efi/EFI'
+    efi_path = '/EFI'
     possible_loaders = [
         os.path.join(efi_path, bootid, 'shimx64.efi'),
         os.path.join(efi_path, 'BOOT', 'BOOTX64.EFI'),
         os.path.join(efi_path, bootid, 'grubx64.efi'),
+        os.path.join(efi_path, bootid, 'shimaa64.efi'),
+        os.path.join(efi_path, 'BOOT', 'BOOTAA64.EFI'),
+        os.path.join(efi_path, bootid, 'grubaa64.efi'),
     ]
     for loader in possible_loaders:
         tloader = target_path(target, path=loader)

References