#2665 PR merged
: On POWER require bootlist & ofpathname if needed¶
Labels: bug
, fixed / solved / done
pcahyna opened issue at 2021-08-03 16:40:¶
Pull Request Details:¶
-
Type: Bug Fix
-
Impact: High
-
Reference to related issue (URL): https://bugzilla.redhat.com/show_bug.cgi?id=1983008 https://bugzilla.redhat.com/show_bug.cgi?id=1983000
-
How was this pull request tested?
- Run
rear mkrescue
in a KVM virtual machine on RHEL 8 withoutpowerpc-utils-core
(which contains those two utilities) and checked that it immediately aborts withERROR: Cannot find required programs: ofpathname
. Withpowerpc-utils-core
installed and/usr/sbin/bootlist
manually removed it succeeds and the initrd containsofpathname
. Withpowerpc-utils-core
installed normally it succeeds and the initrd contains bothofpathname
andbootlist
. - Run
rear mkrescue
in a PowerVM LPAR on RHEL 8 withoutpowerpc-utils-core
(which contains those two utilities) and checked that it immediately aborts withERROR: Cannot find required programs: ofpathname bootlist
. Withpowerpc-utils-core
installed it succeeds and the initrd contains bothofpathname
andbootlist
. - Run
rear mkrescue
on a PowerNV server (bare metal) on RHEL 8 withoutpowerpc-utils-core
, it completes fine. Verified that ifpowerpc-utils-core
is installed, the initrd contains bothofpathname
andbootlist
.
- Run
-
Brief description of the changes in this pull request:
As reported by @rmetrich, the ofpathname
binary is called by
grub2-install. Therefore, it is required in the rescue system in order
to make the recovered system bootable, except for the PowerNV (Not
Virtualized - bare metal) case. Under PowerVM, we also need the
bootlist
executable to make the system bootable.
Add those two binaries to REQUIRED_PROGS
instead of PROGS
under the
appropriate conditions.
Do not handle PowerNV for ppc64: according to 89ddb9fc17adb022ce9c10be0c3e5b835ba139d7, only ppc64le Linux can run in PowerNV.
(Wouldn't it be simpler though to symlink Linux-ppc64.conf to Linux-ppc64le.conf? Their differences seem to be minimal.)
pcahyna commented at 2021-08-04 08:18:¶
@rmetrich can you please review?
jsmeix commented at 2021-08-04 11:59:¶
Only as a side note:
On my openSUSE Leap 15.2 x86_64 system
I have grub2-2.04 but I neither have ofpathname nor bootlist
so this issue seems to be strictly POWER specific.
jsmeix commented at 2021-08-04 12:05:¶
@rmetrich @pcahyna
I have a general question:
When GRUB2 is used as bootloader on a machine
and grub2-install requires certain helper programs
I wonder how GRUB2 could have ever been installed as bootloader
on the original system without having its helper programs available?
I.e. I wonder how with PROGS+=( bootlist ofpathname )
it could ever happen that bootlist and/or ofpathname
are not available on the system?
jsmeix commented at 2021-08-04 12:05:¶
@rmetrich
I assigned it to you so that you could merge it as you like.
pcahyna commented at 2021-08-04 12:12:¶
I wonder how GRUB2 could have ever been installed as bootloader
on the original system without having its helper programs available?
I.e. I wonder how withPROGS+=( bootlist ofpathname )
it could ever happen that bootlist and/or ofpathname
are not available on the system?
@rmetrich how did it happen that the system ended up in this state? But I suppose that in general GRUB is installed by the installer, which might have a different set of toools available than the installed system. Also, the package might be removed by the user after installation, because the GRUB packages do not declare a dependency on it (that might be considered a bug in GRUB packaging).
pcahyna commented at 2021-08-19 12:08:¶
@rmetrich can the PR be merged, please?
[Export of Github issue for rear/rear.]