New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uefi: Search for Grub2 modules in /usr/lib/grub*/x86_64-efi and not in /boot #2199
Conversation
…n /boot. On Fedora and RHEL systems, Grub2 UEFI modules live in /usr/lib/grub*/x86_64-efi, not /boot, unless grub2-install is executed, but executing this tool is not needed with UEFI. On SuSE systems, Grub2 UEFI modules also live in /usr/lib/grub*/x86_64-efi, but there is also a copy in /boot, so it's not needed searching in /boot at all. Additionally, only UEFI modules should be looked for, so /boot cannot be searched but only /boot/grub2/x86_64-efi (similarly /usr/lib/grub*/x86_64-efi, not just /usr/lib/grub*), otherwise we could get some false positives on dual boot systems (UEFI + Legacy), since modules for Legacy will also match, which is wrong. Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
This issue causes the following error when booting the ReaR ISO:
|
It does not seem right that ReaR needs to know such Grub-related details. Isn't there a Grub command that would figure them out itself? Like |
|
Yes, ReaR would have to be changed so that the complete image would be created by
Could it be the problem described in https://lists.gnu.org/archive/html/help-grub/2016-08/msg00011.html ? See the reply. (One should use graft point syntax, like /boot/grub/grub.cfg=./grub.cfg) |
Only as a side note regarding grub2-mkrescue see FYI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The explanation in the pull request looks reasonable to me
so I approve it.
FYI why I searched in /boot see
#2001 (comment)
I would like to search in ReaR for GRUB modules at the same place(s)
where GRUB will look for its modules when booting.
@rmetrich this seems to work:
(this replaces
in usr/share/rear/lib/uefi-functions.sh (https://github.com/rear/rear/pull/2199/files#diff-8766e312330f66f92f92e1da473dd4f0)) |
Hello @pcahyna Excerpt from
This is kind of similar situation as with kernel MODULES. I personally think that we should allow user to decide which modules he wants or doesn't want to use, instead of packing ReaR rescue system boot loader with all available modules. V. |
Hello @gozora, the problem is what to use as the default list of modules. To me it seems better to include all and let grub-mkstandalone determine where to find them rather than to try to determine a list which will always risk becoming obsolete (cf. #2001 which was the original problem being solved - the fix was leading to the problem solved here). I.e. I think ReaR tries to know too much about the internal details of Grub. If users want to override the module list,
|
@pcahyna |
@jsmeix is there a supported (by ReaR) version of SLES which uses Grub2 but does not have the |
on my SLES11-SP4 system:
On my SLES12-SP4 system
On my SLES15 system
On my openSUSE Leap 15.0 system
On my SLES12-SP4 and SLES15 and openSUSE Leap 15.0 system
On my SLES12-SP4 and SLES15 and openSUSE Leap 15.0 system
|
@jsmeix thank you for your detailed response! So by transitioning to grub-mkstandalone we would lose support for ubuntu 12 on UEFI, other supported distributions should be fine. |
Ubuntu 12 is not listed at The German So I think for ReaR 2.6 we can reasonably |
Relax-and-Recover (ReaR) Pull Request Template
Please fill in the following items before submitting a new pull request:
Pull Request Details:
Type: Bug Fix
Impact: Normal
Reference to related issue (URL): fedora29 grub2-efi-x64-modules does not contain linuxefi module #2001
How was this pull request tested?
Tested on RHEL7 UEFI, RHEL8 UEFI + SLES12SP3 UEFI
On Fedora and RHEL systems, Grub2 UEFI modules live in /usr/lib/grub*/x86_64-efi, not /boot, unless grub2-install is executed, but executing this tool is not needed with UEFI at all.
On SuSE systems, Grub2 UEFI modules also live in /usr/lib/grub*/x86_64-efi, but there is also a copy in /boot, so it's not needed searching in /boot at all.
Additionally, only UEFI modules should be looked for, so /boot cannot be
searched but only /boot/grub2/x86_64-efi (similarly /usr/lib/grub*/x86_64-efi), otherwise we could get some false positives on dual boot systems (UEFI + Legacy), since modules for Legacy will also match, which is wrong.