Hide Forgot
Description of problem: The dracut scripts fail to insert the mlx4_en module in iniramfs file when the kernel is a 3.10 kernel-rt. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Install a normal RHEL 6.8 system and register it: subscription-manager register --auto-attach 2. Install a 3.10 kernel-rt support, for example: yum -y --enablerepo rhel-6-server-realtime-rpms groupinstall "MRG Realtime" 3. Check if the 'mlx4_en.ko' file is on initramfs file: # lsinitrd /boot/initramfs-3.10.*.img | grep mlx4_en Actual results: An empty line. Expected results: -rwxr--r--. 1 root root 164080 Oct 21 01:47 /lib/modules/3.10.0-327.rt56.198.el6rt.x86_64/kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko Additional info: The 'mlx4_en.ko' file is on initramfs file of the 2.6 kernel: # lsinitrd /boot/initramfs-2.6.*.img | grep mlx4_en -rwxr--r-- 1 root root 165048 May 12 17:51 lib/modules/2.6.32-642.el6.x86_64/kernel/drivers/net/mlx4/mlx4_en.ko The dracut command was executed with verbose and debug enabled: dracut -v --debug /boot/initramfs-3.10.0-327.rt56.190.el6rt.x86_64.new.img 3.10.0-327.rt56.190.el6rt.x86_64 &> dracut.3.output The 'dracut.3.output' shows the call to the function 'instmods' with the correct arguments, where one of them is the 'mlx4' driver: ---- 'dracut.3.output' ---- ... 4033 //usr/share/dracut/modules.d/10rdma/installkernel@2(): instmods =drivers/infiniband =drivers/net/mlx4 =drivers/net/mlx5 cxgb3 cxgb4 ... The function instmods executes the 'find' command to search for the driver on a directory: --- '/usr/share/dracut/dracut-functions' --- ... 606 # install kernel modules along with all their dependencies. 607 instmods() { 608 [[ $no_kernel = yes ]] && return 609 local mod mpargs modpath modname cmd 610 local ret=0 611 while (($# > 0)); do 612 mod=${1%.ko*} 613 case $mod in 614 =*) # This introduces 2 incompatible meanings for =* arguments 615 # to instmods. We need to decide which one to keep. 616 if [[ $mod = =ata && -f $srcmods/modules.block ]] ; then 617 instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules. block") 618 elif [ -f $srcmods/modules.${mod#=} ]; then 619 instmods $mpargs $(cat ${srcmods}/modules.${mod#=} ) 620 else 621 instmods $mpargs $(find "$srcmods" -path "*/${mod#=}/*") <--------------------- HERE 622 fi 623 ;; ... The 'find' command works for 2.6 kernel, but it fails for 3.10 kernel, there is no argument on line #7544: ... 7543 ///usr/share/dracut/dracut-functions@621(instmods): find /lib/modules/3.10.0-327.rt56.190.el6rt.x 86_64/ -path '*/drivers/net/mlx4/*' 7544 //usr/share/dracut/dracut-functions@621(instmods): instmods 7545 //usr/share/dracut/dracut-functions@608(instmods): [[ '' = yes ]] ... The cause of the problem is that the dracut script was created to deal with 2.6 kernel, where the mlx4 kernel driver is located on directory '/lib/modules/2.6.*/kernel/drivers/net/mlx4', but the 3.10 kernel stores the mlx4 kernel driver on a 'mellanox' directory: '/lib/modules/3.10.*/kernel/drivers/net/ethernet/mellanox/mlx4'.
Simple one-line fix here.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0688.html