Bug 1935416

Summary: kmod weak-modules requires dracut when using --no-initramfs
Product: Red Hat Enterprise Linux 8 Reporter: dagray
Component: kmodAssignee: Yauheni Kaliuta <ykaliuta>
Status: CLOSED ERRATA QA Contact: Ziqian SUN (Zamir) <zsun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: cye, skozina, ykaliuta, zsun
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: 25-18.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:38:13 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 dagray 2021-03-04 20:41:43 UTC
Description of problem:
We are using weak-modules in driver containers for OpenShift/RHCOS, however weak-modules enforces a dependency on dracut even when running weak-modules with --no-initramfs. 

Steps to Reproduce:
1. weak-modules --no-initramfs

Actual results:
weak-modules: could not find dracut at /usr/bin/dracut

A workaround that gives the desired result is creating /usr/bin/dracut and making it executable:
touch /usr/bin/dracut
chmod +x /usr/bin/dracut

A patch to weak-modules that also gives the desired result:
1150c1150
< if [ ! -x "$dracut" ]
---
> if [ ! -x "$dracut" ] && [ -z "$no_initramfs" ]

Comment 1 Yauheni Kaliuta 2021-03-08 10:23:57 UTC
> A patch to weak-modules that also gives the desired result:
> 1150c1150
> < if [ ! -x "$dracut" ]
> ---
> > if [ ! -x "$dracut" ] && [ -z "$no_initramfs" ]

Thanks, that makes sense.

Comment 14 errata-xmlrpc 2021-11-09 19:38:13 UTC
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 (kmod bug fix and enhancement update), 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/RHBA-2021:4391