| Summary: | Weak modules in initrd break on kernel updates | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Pierre Carrier <prc> |
| Component: | kernel | Assignee: | Red Hat Kernel Manager <kernel-mgr> |
| Status: | CLOSED NOTABUG | QA Contact: | Red Hat Kernel QE team <kernel-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.6 | CC: | jarod, jcm, jwest |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-03-08 10:15:17 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
The only issue I can think of is that /sbin/new-kernel-pkg is already called in /sbin/weak-modules... Adding the following to the SPEC would answer this need and many others:
%posttrans
/sbin/new-kernel-pkg --rpmposttrans %{KVERREL}
%posttrans smp
/sbin/new-kernel-pkg --rpmposttrans %{KVERREL}smp
%posttrans PAE
/sbin/new-kernel-pkg --rpmposttrans %{KVERREL}PAE
%posttrans debug
/sbin/new-kernel-pkg --rpmposttrans %{KVERREL}debug
%posttrans xen
/sbin/new-kernel-pkg --rpmposttrans %{KVERREL}xen
%posttrans kdump
/sbin/new-kernel-pkg --rpmposttrans %{KVERREL}kdump
Definitely want jcm's input on what to do here, he's our weak-modules guru. Er...I'm still interested in getting an actual bug report. The above isn't really very clear at all. Something about drivers "updated" in an initrd not being picked up, but what exactly? 1). What driver was installed, or upgraded? 2). Why do you think the weak-modules script is not working? 3). In what way is the initrd not working as desired? Jon. As I understand it, there's some module from weak-modules that is supposed to be included in the initrd, but its not being included, as the initrd is created before weak-modules has been run, and thus for the new kernel, nothing is known about that module. Sorry if I wasn't clear in the bug description. 1) Install weak modules. 2) Get them in the initrd because they're needed to boot. 3) Update your kernel. 4) No more weak modules in the initrd. Why? Because we put he weak modules in place *after* building the new initrd. What can we do for our customers who want weak modules in their initrd? Either: 1) (I don't like) Nothing. Ask them to manually regenerate the initrd each time they update their kernel. 2) (involves a risk as we reorder stuff in our package, fixes the bug directly) Put the weak modules in place before rebuilding the initrd in %postinst 3) (Allows customers to work around the bug, and do many other stuff if they want to) Use "new-kernel-pkg --rpmposttrans" in %posttrans and let users rebuild the initrd themselves after weak-modules handling, by adding the appropriate script in /etc/kernel/postinst.d/ 4) Both 2) and 3) We call /sbin/weak-modules during the kernel transaction, which tests and rebuilds the initrd for any kernel images that need changing. There isn't a bug here that I am aware of. What can happen, though, is that you install a driver update ("weak module") that is not compatible with all kernels and is not retained. Can you please:
1). File a bug report that includes exactly which driver(s) you are trying to install.
2). Detail where these driver(s) came from, and in what form, package name, etc.
3). Attach the driver(s) or a link to them.
Jon.
Turns out the current behaviour is correct. Ticket was closed as NOTABUG. Opening an Request For Enhancement for 'new-kernel-pkg --rpmposttrans'. Yours sincerely, -- Pierre Carrier |
Description of problem: - When weak-modules are used in the initrd, they are dropped on kernel updates - Version-Release number of selected component (if applicable): All RHEL5 kernels Additional info: - Caused by: $ rpm -q --scripts kernel postinstall scriptlet (using /bin/sh): [...] /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 2.6.18-194.3.1.el5 || exit $? if [ -x /sbin/weak-modules ] then /sbin/weak-modules --add-kernel 2.6.18-194.3.1.el5 || exit $? fi - AFAICT could be changed with little to no impact