|Summary:||dracut does not include "extra" and "weak-updates" directories in non-hostonly mode|
|Product:||Red Hat Enterprise Linux 6||Reporter:||Jon Masters <jcm>|
|Component:||dracut||Assignee:||Harald Hoyer <harald>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Release Test Team <release-test-team>|
|Version:||6.0||CC:||atodorov, borgan, ddumas, ltroan, martin.wilck, snagar, tao|
|Fixed In Version:||dracut-004-31.el6||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|:||622888 (view as bug list)||Environment:|
|Last Closed:||2010-11-10 20:19:33 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
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
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
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
Comment 17 firstname.lastname@example.org 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.