View Issue Details

IDProjectCategoryView StatusLast Update
0017539CentOS-7kernel-pluspublic2020-07-31 00:13
Reportertoracat 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0017539: initramfs is not regenerated for kernel-plus upon microcode updates
DescriptionWhen the microcode_ctl package is installed/updated, the initramfs file is supposed to be regenerated. This does not happen with kernel-plus.

The explanation is in the posttrans scriptlet of microcode_ctl.

rpm -q --scripts microcode_ctl

[quote]
...
# For RPM selection, kernel flavours (like "debug" or "kdump" or "zfcp",
# with only the former being relevant to x86 architecture) are a part or RPM
# name; it's also a part of uname, with different separator used in RHEL 6/7
# and RHEL 8. RT kernel, however, is special, as "rt" is another part
# of RPM name and it has its own versioning scheme both in NVR and uname.
# And there's the kernel package split in RHEL 8, so one should look for *-core
# and not the main package.
pkgs="kernel kernel-debug kernel-rt kernel-rt-debug"
...
[/quote]
Steps To ReproduceSee also,

https://elrepo.org/bugs/view.php?id=1012
TagsNo tags attached.
abrt_hash
URL

Relationships

related to 0017562 resolvedtoracat CentOS-8 initramfs is not regenerated for kernel-plus upon microcode updates 

Activities

toracat

toracat

2020-07-04 17:56

manager   ~0037298

The solution that was developed for ELRepo's kernel-ml/lt applies here. Adding the following triggerin script to the spec file fixed the issue:

%triggerin -- microcode_ctl
KVERSION=%{version}-%{release}.%{_target_cpu}
if [ -e "/lib/modules/$KVERSION/modules.dep" ]; then
     %{_sbindir}/dracut -f --kver $KVERSION
fi
AlanBartlett

AlanBartlett

2020-07-04 18:57

reporter   ~0037300

Please be aware that the %(_sbindir} macro expands to be /usr/sbin/ whereas the %{_bindir} macro expands to be /usr/bin/
toracat

toracat

2020-07-04 21:35

manager   ~0037301

@AlanBartlett

Thanks for the note. Right, in el7, %(_sbindir} is ok because of the symlink /usr/sbin/dracut -> ../bin/dracut. However there is no such symlink in el8. It must be %{_bindir} there.
AlanBartlett

AlanBartlett

2020-07-04 21:43

reporter   ~0037303

It might be prudent to use %{_bindir} for both OSes.

If I may show you results from RHEL7 and RHEL8 --

[RHEL7 ~]$ sudo find / -xdev -name dracut -type f
/usr/bin/dracut
/usr/share/bash-completion/completions/dracut
[RHEL7 ~]$

[RHEL8 ~]$ sudo find / -xdev -name dracut -type f
/usr/bin/dracut
/usr/share/bash-completion/completions/dracut
[RHEL8 ~]$

In both cases the physical file is contained within the /usr/bin/ directory.
toracat

toracat

2020-07-04 21:59

manager   ~0037304

Yes, of course it is prudent to use what works for both el7 and el8 without depending on the symlink. And we are not dealing with el6 in which dracut is found in the /sbin/ directory.
toracat

toracat

2020-07-31 00:13

manager   ~0037457

Fixed in kernel-plus-3.10.0-1127.18.2.el7.centos.plus.

Issue History

Date Modified Username Field Change
2020-06-25 16:14 toracat New Issue
2020-06-25 16:15 toracat Status new => assigned
2020-07-04 17:51 toracat Description Updated View Revisions
2020-07-04 17:56 toracat Note Added: 0037298
2020-07-04 18:57 AlanBartlett Note Added: 0037300
2020-07-04 21:35 toracat Note Added: 0037301
2020-07-04 21:39 toracat Category CentOS-7-Plus => kernel-plus
2020-07-04 21:43 AlanBartlett Note Added: 0037303
2020-07-04 21:59 toracat Note Added: 0037304
2020-07-05 20:32 toracat Relationship added related to 0017562
2020-07-31 00:13 toracat Note Added: 0037457
2020-07-31 00:13 toracat Status assigned => resolved
2020-07-31 00:13 toracat Resolution open => fixed