Bug 1591664
| Summary: | The posttrans step of the RPM microcode_ctl executes dracut -f which generate broken initramfs | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Welterlen Benoit <bwelterl> |
| Component: | microcode_ctl | Assignee: | Eugene Syromiatnikov <esyr> |
| Status: | CLOSED ERRATA | QA Contact: | Jiri Dluhos <jdluhos> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.5 | CC: | bwelterl, esyr, jdluhos, jkrysl, skozina |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | microcode_ctl-2.1-44.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-30 09:45:55 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Welterlen Benoit
2018-06-15 09:00:41 UTC
I would say it's a bug in dracut, but it can indeed be worked around in the microcode_ctl package. Hello, Thank you for the test. And is there a broken initramfs in /boot ? Are you using weak modules ? Regards, The machine rebooted properly with the newly installed initrd, so it was OK. Regarding weak modules, I will need to check - please stay tuned. Hello,
I'm now able to reproduce the issue:
It is due to this part in the %script of the kmod-nvidia rpm:
modules=( $(find /lib/modules/3.10.0-862.el7.x86_64/extra/nvidia | grep '\.ko$') )
printf '%s\n' "${modules[@]}" | /sbin/weak-modules --verbose --add-modules
And the fact that a file named /boot/initramfs-3.10.0-862.el7.x86_64.img exists and that there is no data in /lib/modules/3.10.0-862.el7.x86_64/.
Thus, this code in /usr/sbin/weak-modules fails:
8<---------- 8< ---------------- 8< ---------------- 8< --------
# check_initramfs:
# check and possibly also update the initramfs for changed kernels
check_initramfs() {
local kernel=$1
# If there is no initramfs already we will not make one here.
if [ -e "$initramfs_prefix/initramfs-$kernel.img" ];
then
old_initramfs="$initramfs_prefix/initramfs-$kernel.img"
tmp_initramfs="$initramfs_prefix/initramfs-$kernel.tmp"
new_initramfs="$initramfs_prefix/initramfs-$kernel.img"
echo $dracut -f "$tmp_initramfs" "$kernel"
$dracut -f "$tmp_initramfs" "$kernel"
if ! compare_initramfs_modules "$old_initramfs" "$tmp_initramfs";
then
doit mv "$tmp_initramfs" "$new_initramfs"
else
rm -f "$tmp_initramfs"
fi
fi
}
8<---------- 8< ---------------- 8< ---------------- 8< --------
because dracut fails fails to generate a new initramfs of the required kernel because there is no /lib/modules/3.10.0-862.el7.x86_64//modules.dep
The kernel 3.10.0-862.el7.x86_64 is market to be managed by dracut because it is the kernel on which the module has been built against.
The issue may be fixed by weak-modules to check the presence of modules.dep for the kernel.
Benoit
As from my side it seems working, closing as VERIFIED. Welterlen, can you please add a BZ number to this bug so that the case with nvidia can be traced through this bug history? Thanks! :-) Hello It's not specific to the nvidia package. The issue is also visible with kmod-redhat-megaraid_sas. You should have a initramfs of the kernel against which the new module has been build (initramfs-3.10.0-862.el7.x86_64.img - can be empty) and nothing regarding this kernel in /lib/modules/ But the easier way to fix it should be in dracut directly. After discussing, we came to this conclusion: The original problem is solved; see this commit: http://pkgs.devel.redhat.com/cgit/rpms/microcode_ctl/commit/?h=rhel-7.6&id=cf283d63d208 Please clone this bug or open a new BZ for the new problem you've found with kmod-nvidia (+ kmod-redhat-megaraid_sas), and flag the new bug for RHEL 7.7. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:3097 |