Bug 564392
| Summary: | mkinitrd ignores /etc/modprobe.d/*.conf | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Buck Huppmann <buckh> | ||||||
| Component: | mkinitrd | Assignee: | Brian Lane <bcl> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||||
| Severity: | urgent | Docs Contact: | |||||||
| Priority: | urgent | ||||||||
| Version: | 5.5 | CC: | atodorov, buckh, ddumas, jbastian, jeder, johan.huysmans, jstodola, jwest, plyons, rwilliam, tao | ||||||
| Target Milestone: | rc | Keywords: | ZStream | ||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | mkinitrd-5.1.19.6-69.el5 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | 242463 | Environment: | |||||||
| Last Closed: | 2011-07-21 07:48:35 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 590060, 693654, 694052 | ||||||||
| Attachments: |
|
||||||||
|
Description
Buck Huppmann
2010-02-12 16:02:24 UTC
*** Bug 596531 has been marked as a duplicate of this bug. *** Created attachment 417045 [details]
patch for mkinitrd to look at /etc/modprobe.d/*
Attached is a patch to let mkinitrd look in /etc/modprobe.d/*
Steps to Reproduce:
1. (if necessary) edit /etc/modprobe.conf and add a line to use the cciss
module:
alias scsi_hostadapter2 cciss
2. mv /etc/modprobe.conf /etc/modprobe.d/
3. mkinitrd -f --nocompress /tmp/initrd-testing.img `uname -r`
4. cpio -t < /tmp/initrd-testing.img | grep cciss
Actual results:
cciss module is not included in /tmp/initrd-testing.img
Expected results:
cciss module is included
# cpio -t < /tmp/initrd-testing.img | grep cciss
17077 blocks
lib/cciss.ko
(In reply to comment #2) > Created attachment 417045 [details] > patch for mkinitrd to look at /etc/modprobe.d/* > Shouldn't this be limited to *.conf? Sometimes users rename config files to turn them off. You're probably right.
dracut (which has replaced mkinitrd) only looks at *.conf files:
install() {
[ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
dracut_install $(find /etc/modprobe.d/ -type f -name '*.conf')
...
http://git.kernel.org/?p=boot/dracut/dracut.git;a=blob;f=modules.d/90kernel-modules/module-setup.sh;h=5f0e4a75c5f3fa073281a8340898c069fba6f899;hb=HEAD#l46
Created attachment 487149 [details]
patch for mkinitrd to look at /etc/modprobe.d/*
This is a very minor change to the patch:
-+ modulefile=( $(ls /etc/modprobe.d/* ) )
++ modulefile=( $(ls /etc/modprobe.d/*.conf ) )
Changes made in this bug cause unwanted messages printed when /sbin/mkinitrd is called during installation or upgrade of kernel and kernel-debug packages:
...
Transaction Test Succeeded
Running Transaction
Installing : kernel-debug 1/1
Modulefile is /etc/modprobe.conf
Installed:
kernel-debug.s390x 0:2.6.18-259.el5
Proposed fix:
diff -ur a/mkinitrd b/mkinitrd
--- a/mkinitrd 2011-05-05 07:20:48.000000000 -0400
+++ b/mkinitrd 2011-05-05 07:20:12.000000000 -0400
@@ -1179,7 +1179,7 @@
modulefile=( $(ls /etc/modprobe.d/*.conf ) )
fi
-echo "Modulefile is ${modulefile[@]}"
+vecho "Modulefile is ${modulefile[@]}"
# find a temporary directory which doesn't use tmpfs
if [ -z "$loopfs" ]; then
Moving back to ASSIGNED
Testing comment #2 with module-init-tools-3.3-0.pre3.1.60.el5_5.1 # cat /etc/modprobe.conf alias eth0 tg3 alias eth1 tg3 alias scsi_hostadapter mptbase alias scsi_hostadapter1 mptsas alias scsi_hostadapter2 cciss # cat /etc/modprobe.d/usb.conf alias scsi_hostadapter3 usb-storage # mkinitrd -f --nocompress /tmp/initrd-testing.img `uname -r` # cpio -t < /tmp/initrd-testing.img | grep usb-storage 37988 blocks # usb-storage is not included. # mv /etc/modprobe.conf /etc/modprobe.conf.disabled # mkinitrd -f --nocompress /tmp/initrd-testing.img `uname -r` # cpio -t < /tmp/initrd-testing.img | grep usb-storage 35857 blocks lib/usb-storage.ko When modprobe.conf is not present modprobe.d is taken into account. comment #25 is inline with the proposed patch (i.e. look at modprobe.d if modprobe.conf doesn't exist). The fix from comment #23 is also included. Moving to VERIFIED. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1017.html |