-
Bug
-
Resolution: Won't Do
-
Minor
-
rhel-7.9.z
-
None
-
Low
-
rhel-sst-desktop-firmware-bootloaders
-
ssg_display
-
None
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
s390x
-
None
Description of problem:
grubby matches none of the "configFileInfo" type and falls back to the "default config" (hence grub) when /etc/grub2*.cfg files are missing, `/etc/zipl.conf` file is present and an unexpected `/etc/grub.d` directory is there.
The bug resides in grubby, but it impacts almost only Leapp, which can possibly use something else on IBM Z systems. Feel free to change the component if needed.
Version-Release number of selected component (if applicable):
leapp-upgrade-el7toel8-0.17.0-1.el7_9.noarch
How reproducible:
Always
Steps to Reproduce:
On s390x, just create the problematic directory
- mkdir /etc/grub.d
To reproduce it more easily from an x86_64 system
- mv /etc/grub2*.cfg /tmp/
- touch /etc/zipl.conf
Actual results:
============================================================
ERRORS
============================================================
2023-01-03 11:28:56.408140 [ERROR] Actor: source_boot_loader_scanner
Message: Failed to call `grubby` to list available boot entries.
Summary:
Details: Command ['grubby', '--info', 'ALL'] failed with exit code 1.
Stderr: error opening /boot/grub/grub.cfg for read: No such file or directory
============================================================
END OF ERRORS
============================================================
Additional info:
- in the customer environment the directory `/etc/grub.d` was empty, hence just removing it fixed the issue.
- checking from gdb
(gdb) b readConfig
Breakpoint 1 at 0x4029b2: file grubby.c, line 1364.
(gdb) b grubby.c:5187
Breakpoint 2 at 0x404c46: file grubby.c, line 5187.
(gdb) r
Starting program: /usr/sbin/grubby --info ALL
Breakpoint 2, main (argc=<optimized out>, argv=0x7fffffffe468) at grubby.c:5187
5187 if (!grubConfig)
(gdb) list
5182 }
5183
5184 if (!grubConfig)
5190
5191 if (bootloaderProbe
(gdb) n
5186 grubConfig = cfi->findConfig(cfi);
(gdb) n
5187 if (!grubConfig)
(gdb) n
5191 if (bootloaderProbe
(gdb) p grubConfig
$1 = 0x40c307 "/boot/grub/grub.cfg"