GNU GRUB - Bugs: bug #57381, EFI image with wrong prefix when...
You are not allowed to post comments on this tracker with your current authentication level.
bug #57381: EFI image with wrong prefix when bootload-id is specified
Submitter: | Adam Li <c0redumb> | ||
Submitted: | Sun 08 Dec 2019 05:23:24 AM UTC | ||
Category: | None | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Software Error |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | Adam Li |
Open/Closed: | Open | Release: | 2.02 |
Release: | Reproducibility: | Every Time | |
Planned Release: | None |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
No changes have been made to this item
Powered by Savane 3.13-02a9.
Corresponding source code
This is with Grub 2.02 that comes with Ubuntu 18.04.
When --bootloader-id is specified when running "grub-install" with target x86_64-efi (for example, --bootloader-id myboot), the efi image file (grubx64.efi) is generated and put in folder /EFI/myboot/ on ESP. The initial load configure file (grub.cfg) is also put in the same folder (/EFI/myboot/ on ESP).
However, the efi image file is generated with prefix of "/EFI/ubuntu". This can be verified by run "strings grubx64.efi" on the efi image file.
As a result, the grub efi file can not find the initial configuration file and falls back to the command interface. It is trying to find it at esp/EFI/ubuntu (based on the prefix), but indeed it should be at esp/EFI/myboot.
I believe this should be an easy fix by looking at how bootloader_id and distributor_id was use in grub-install.c. But I had trouble building the grub project from git (that's probably another story). Some one on your team who is more familiar with the code could make that change easily.
Thanks.