95iscsi/parse-iscsiroot.sh: force load a lot of kernel modules
authorHarald Hoyer <harald@redhat.com>
Wed, 9 Nov 2011 12:52:55 +0000 (13:52 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 15 Nov 2011 08:47:24 +0000 (09:47 +0100)
A lot of iSCSI driver are not autoloaded, so we have to manually
force load them.

modules.d/95iscsi/module-setup.sh
modules.d/95iscsi/parse-iscsiroot.sh

index b7771ab..5d8dc07 100755 (executable)
@@ -41,7 +41,7 @@ depends() {
 }
 
 installkernel() {
-    instmods iscsi_tcp iscsi_ibft crc32c
+    instmods iscsi_tcp iscsi_ibft crc32c bnx2i iscsi_boot_sysfs qla4xxx cxgb3i cxgb4i be2iscsi
     iscsi_module_filter() {
         local _iscsifuncs='iscsi_register_transport'
         local _f
index 3187632..bc7cc5e 100755 (executable)
@@ -51,10 +51,17 @@ if [ -n "$iscsiroot" ] ; then
     [ -z "$netroot" ] || [ "$netroot" = "iscsi" ] && netroot=iscsi:$iscsiroot
 fi
 
+modprobe -q qla4xxx
+modprobe -q cxgb3i
+modprobe -q cxgb4i
+modprobe -q bnx2i
+modprobe -q be2iscsi
+
 # iscsi_firmware does not need argument checking
 if [ -n "$iscsi_firmware" ] ; then
     netroot=${netroot:-iscsi}
-    modprobe iscsi_ibft
+    modprobe -q iscsi_boot_sysfs 2>/dev/null
+    modprobe -q iscsi_ibft
 fi
 
 # If it's not iscsi we don't continue
@@ -68,7 +75,9 @@ if [ -z "$iscsi_firmware" ] ; then
 fi
 
 # ISCSI actually supported?
-[ -e /sys/devices/virtual/iscsi_transport ] || modprobe iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi"
+if ! [ -e /sys/module/iscsi_tcp ]; then
+    modprobe -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi"
+fi
 
 # Done, all good!
 rootok=1