Dimitri John Ledkov has proposed merging ~xnox/curtin:lp1906379-2 into
curtin:master.
Commit message:
install_grub: convert in-target EFI loader path to ESP path.
When calling efibootmgr convert esp-mount/efi-loader to efi-loader
path, as efibootmgr variable needs to relative the ESP mount point
root, rather than the in-target root.
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/396823
--
Your team curtin developers is requested to review the proposed merge of
~xnox/curtin:lp1906379-2 into curtin:master.
diff --git a/curtin/commands/install_grub.py b/curtin/commands/install_grub.py
index 3e6313f..d632433 100644
--- a/curtin/commands/install_grub.py
+++ b/curtin/commands/install_grub.py
@@ -225,6 +225,10 @@ def find_efi_loader(target, bootid):
return loader
return None
+def efi_loader_esp_path(loader):
+ if loader.startswith('/boot/efi'):
+ return loader[len('/boot/efi'):]
+ return loader
def get_efi_disk_part(devices):
for disk in devices:
@@ -274,7 +278,8 @@ def gen_uefi_install_commands(grub_name, grub_target, grub_cmd, update_nvram,
'--write-signature', '--label', bootid,
'--disk', efi_disk,
'--part', efi_part_num,
- '--loader', loader])
+ '--loader',
+ efi_loader_esp_path(loader)])
post_cmds.append(['grub2-mkconfig', '-o',
'/boot/efi/EFI/%s/grub.cfg' % bootid])
else:
--
Mailing list: https://launchpad.net/~curtin-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~curtin-dev
More help : https://help.launchpad.net/ListHelp