[F17-BRANCH] load modules needed by Anaconda (#804522)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Brian C. Lane" <bcl@xxxxxxxxxx>

Anaconda expects a minimum set of modules to be loaded, things
like raid1, etc.

NOTE: Tested by appending to initrd of Beta RC2
---
 dracut/Makefile.am          |    3 ++-
 dracut/anaconda-modprobe.sh |   27 +++++++++++++++++++++++++++
 dracut/module-setup.sh      |    1 +
 3 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 dracut/anaconda-modprobe.sh

diff --git a/dracut/Makefile.am b/dracut/Makefile.am
index a07060b..2efe38d 100644
--- a/dracut/Makefile.am
+++ b/dracut/Makefile.am
@@ -33,7 +33,8 @@ dist_dracut_SCRIPTS = module-setup.sh \
 		      anaconda-copy-ks.sh \
 		      fetch-kickstart-net.sh \
 		      fetch-kickstart-disk \
-		      parse-kickstart
+		      parse-kickstart \
+		      anaconda-modprobe.sh
 
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/dracut/anaconda-modprobe.sh b/dracut/anaconda-modprobe.sh
new file mode 100644
index 0000000..e3d98ec
--- /dev/null
+++ b/dracut/anaconda-modprobe.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# load modules needed by anaconda
+ARCH=$(uname -m)
+KERNEL=$(uname -r)
+
+MODULE_LIST="cramfs squashfs iscsi_tcp"
+
+SCSI_MODULES=/lib/modules/$KERNEL/kernel/drivers/scsi/device_handler/
+for m in $SCSI_MODULES/*.ko; do
+    MODULE_LIST+="`basename $m .ko` "
+done
+
+if [ "$ARCH" != "s390" -a "$ARCH" != "s390x" ]; then
+    MODULE_LIST+="floppy edd iscsi_ibft"
+fi
+
+if [ "$ARCH" = "ppc" ]; then
+    MODULE_LIST+="spufs"
+fi
+
+MODULE_LIST+="raid0 raid1 raid5 raid6 raid456 raid10 linear dm-mod dm-zero \
+              dm-mirror dm-snapshot dm-multipath dm-round-robin dm-crypt cbc sha256 lrw xts"
+
+for m in $MODULE_LIST; do
+    modprobe $m
+done
+
diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh
index 2a61c6e..3c0bcbe 100755
--- a/dracut/module-setup.sh
+++ b/dracut/module-setup.sh
@@ -14,6 +14,7 @@ depends() {
 install() {
     # anaconda
     inst "$moddir/anaconda-lib.sh" "/lib/anaconda-lib.sh"
+    inst_hook cmdline 24 "$moddir/anaconda-modprobe.sh"
     inst_hook cmdline 25 "$moddir/parse-anaconda-options.sh"
     inst_hook cmdline 26 "$moddir/parse-anaconda-kickstart.sh"
     inst_hook cmdline 27 "$moddir/parse-anaconda-repo.sh"
-- 
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux