Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 622641 - dracut does not include "extra" and "weak-updates" directories in non-hostonly mode
dracut does not include "extra" and "weak-updates" directories in non-hostonl...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dracut (Show other bugs)
All Linux
low Severity medium
: rc
: 6.0
Assigned To: Harald Hoyer
Release Test Team
: 619771 (view as bug list)
Depends On:
Blocks: 622888
  Show dependency treegraph
Reported: 2010-08-09 23:04 EDT by Jon Masters
Modified: 2010-11-10 15:19 EST (History)
7 users (show)

See Also:
Fixed In Version: dracut-004-31.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 622888 (view as bug list)
Last Closed: 2010-11-10 15:19:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jon Masters 2010-08-09 23:04:35 EDT
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"'
        filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename -k $kernel'

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.

Comment 2 Jon Masters 2010-08-09 23:26:46 EDT
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 02:34:09 EDT
*** Bug 619771 has been marked as a duplicate of this bug. ***
Comment 5 Harald Hoyer 2010-08-10 10:06:40 EDT
Comment 6 Jon Masters 2010-08-10 13:11:56 EDT
Thanks. I'm cloning this as a Fedora bug too.

Comment 7 Jon Masters 2010-08-10 13:17:07 EDT
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 17:12:45 EDT
I think it's important that we ensure "updates" is scanned in 6.0 aswell.
Comment 10 Jon Masters 2010-08-10 21:33:38 EDT
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-10 21:36:04 EDT
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.

Comment 12 Harald Hoyer 2010-08-11 03:24:58 EDT
2) it's already redirected to /dev/null in dracut-004-30.el6
Comment 13 Harald Hoyer 2010-08-11 03:30:42 EDT
Comment 15 Alexander Todorov 2010-08-13 10:47:26 EDT
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'
        filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename -k $kernel'


Moving to VERIFIED.
Comment 16 Jon Masters 2010-08-16 19:12:43 EDT
Comment 17 releng-rhel@redhat.com 2010-11-10 15:19:33 EST
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.