Add to the below that module options that appear any place but /etc/modules.conf or /etc/conf.modules aren't picked up. That's actually what Fedora BZ 457870 fixes (and what i'm mainly inter- ested in seeing fixed) +++ This bug was initially created as a clone of Bug #242463 +++ Description of problem: The mkinitrd script will only check the modules.conf file for needed modules. If this file has includes defined they WONT be checked. Also if a modprobe.d directory exists it WONT be checked Version-Release number of selected component (if applicable): mkinitrd-5.1.19.6-54 How reproducible: use includes in the modprobe.conf or use modprobe.d Actual results: scsi_hostadapter entries in the included files or modprobe.d files aren't included in the created initrd. Expected results: That the listed modules are included in the new initrd --- Additional comment from johan.huysmans on 2007-07-17 05:38:17 EDT --- I want to implement this myself, but i need some info about the functionality and the expected behavior. like: check modprobe.d only when modprobe.conf doesn't exists or also when it exists, ... --- Additional comment from buckh on 2010-02-12 10:56:44 EST --- (In reply to comment #1) > I want to implement this myself, but i need some info about the functionality > and the expected behavior. > like: check modprobe.d only when modprobe.conf doesn't exists or also when it > exists, ... this is the same as Fedora bz 457870, which it says was closed as of Fedora 11, so you can grab the mkinitrd out of a Fedora 11 distribution but i vote for backporting this from Fedora, pretty please i'll try adding a BZ for RHEL 5
*** 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