RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 622641 - dracut does not include "extra" and "weak-updates" directories in non-hostonly mode
Summary: dracut does not include "extra" and "weak-updates" directories in non-hostonl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dracut
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 6.0
Assignee: Harald Hoyer
QA Contact: Release Test Team
URL:
Whiteboard:
: 619771 (view as bug list)
Depends On:
Blocks: 622888
TreeView+ depends on / blocked
 
Reported: 2010-08-10 03:04 UTC by Jon Masters
Modified: 2018-10-27 13:17 UTC (History)
7 users (show)

Fixed In Version: dracut-004-31.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 622888 (view as bug list)
Environment:
Last Closed: 2010-11-10 20:19:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jon Masters 2010-08-10 03:04:35 UTC
Description of problem:

We have been having problems testing Driver Update Disks recently. I have discovered one problem remaining is that dracut does not include driver update files unless it is called in "hostonly" mode or a special configuration file is added to the configuration. This is a problem that requires fixing because the "generic" initramfs should include additional modules added to the system. Fortunately, the fix is a one-liner and is trivial.

The function "filter_kernel_modules" in dracut does this:

    if ! [[ $hostonly ]]; then
        filtercmd='find "$srcmods/kernel/drivers" -name "*.ko" -o -name "*.ko.gz"'
    else
        filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename -k $kernel'
    fi

In the former case (hostonly is not set), it should not just scan $srcmods/kernel/drivers, but must also include $srcmods/extra, and $srcmods/weak-updates. So the full filtercmd in the case of not hostonly should be something like this:

filtercmd='find "$srcmods/kernel/drivers" "$srcmods/extra" "$srcmods/weak-updates" -name "*.ko" -o -name "*.ko.gz"'

This is required in order to ensure the initramfs will contain the additional drivers that have been installed from a Driver Update Disk.

Jon.

Comment 2 Jon Masters 2010-08-10 03:26:46 UTC
I know it's totally obvious, etc. but that's all *one* line for filtercmd. And it should be exactly as I listed it here, because it's a literal string. If you try splitting it up for nice 80 column stuff, it's going to cause an error on subsequent eval :)

Comment 3 Jon Masters 2010-08-10 06:34:09 UTC
*** Bug 619771 has been marked as a duplicate of this bug. ***

Comment 5 Harald Hoyer 2010-08-10 14:06:40 UTC
dracut-004-30.el6

Comment 6 Jon Masters 2010-08-10 17:11:56 UTC
Thanks. I'm cloning this as a Fedora bug too.

Jon.

Comment 7 Jon Masters 2010-08-10 17:17:07 UTC
Thanks. You probably want to also add the "updates" directory, but that can happen in 6.1 if you like. "updates" is the Linux standard location for sysadmins to place drivers they have installed locally and we're bound to get support issues on that one, too. In fact, if you can respin and add also "$srcmods/updates" then that would be ideal.

Comment 9 Jon Masters 2010-08-10 21:12:45 UTC
I think it's important that we ensure "updates" is scanned in 6.0 aswell.

Comment 10 Jon Masters 2010-08-11 01:33:38 UTC
Also, in certain cases we might not have e.g. "weak-updates" in the tree. That should be fixed so that we always do have it in the future, but for completeness I suggest you redirect the find command error output to avoid e.g. this:

find: `/lib/modules/2.6.32-59.el6.x86_64//weak-updates': No such file or directory

Otherwise I suspect we'll get a bug report asking for that to be fixed. It's harmless, but it's annoying and will alarm some users.

Comment 11 Jon Masters 2010-08-11 01:36:04 UTC
So. I need the following from you, Harald:

1). I need the "updates" directory to be included, just like with "extra", and "weak-updates", which you added already in the build you did on Tuesday (today here, yesterday where you are at the moment).

2). I need the find command you use in there to be modified such that you either check the directory exists before you scan it, or just redirect the find command error output so that it isn't shown on the console during a dracut run. We do not want a harmless error during RPM removal to alarm any users.

Your prompt attention to these two issues is appreciated.

Jon.

Comment 12 Harald Hoyer 2010-08-11 07:24:58 UTC
2) it's already redirected to /dev/null in dracut-004-30.el6

Comment 13 Harald Hoyer 2010-08-11 07:30:42 UTC
dracut-004-31.el6

Comment 15 Alexander Todorov 2010-08-13 14:47:26 UTC
dracut-004-31.el6.noarch now has:

filter_kernel_modules () (
    if ! [[ $hostonly ]]; then
        filtercmd='find "$srcmods/kernel/drivers" "$srcmods/updates" "$srcmods/extra" "$srcmods/weak-updates" -name "*.ko" -o -name "*.ko.gz" 2>/dev/null'
    else
        filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename -k $kernel'
    fi


...

Moving to VERIFIED.

Comment 16 Jon Masters 2010-08-16 23:12:43 UTC
Thanks

Comment 17 releng-rhel@redhat.com 2010-11-10 20:19:33 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.