summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog5
-rwxr-xr-xinit4
-rw-r--r--initramfs-tools.85
-rwxr-xr-xscripts/init-premount/blacklist25
4 files changed, 38 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index f224405..d86408d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,11 +4,14 @@ initramfs-tools (0.87) UNRELEASED; urgency=low
* scripts/functions: reduce_satisfied() needs to ignore the same set as
set_initlist() otherwise an script having a prereqs on a non-executable
boot script may cause circular panic. (closes: 418509)
+ * Add blacklist boot param, disabling the load of specific modules inside
+ the initramfs. Still needs to be passed via tmpfs to the rootfs.
[ David Härdeman ]
* Add support for loading keymaps. (closes: 337663)
- -- David Härdeman <david@hardeman.nu> Thu, 12 Apr 2007 21:28:45 +0200
+
+ -- maximilian attems <maks@debian.org> Fri, 13 Apr 2007 01:22:56 +0200
initramfs-tools (0.86) unstable; urgency=low
diff --git a/init b/init
index 00e0dcf..b115cd1 100755
--- a/init
+++ b/init
@@ -50,6 +50,7 @@ export debug=
export cryptopts=${CRYPTOPTS}
export ROOTDELAY=
export panic=
+export blacklist=
# Parse command line options
for x in $(cat /proc/cmdline); do
@@ -125,6 +126,9 @@ for x in $(cat /proc/cmdline); do
break)
break=premount
;;
+ blacklist=*)
+ blacklist=${x#blacklist=}
+ ;;
esac
done
diff --git a/initramfs-tools.8 b/initramfs-tools.8
index c102de0..526899f 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -90,6 +90,11 @@ mounts the rootfs read-only.
mounts the rootfs read-write.
.TP
+\fB \fI blacklist
+disables load of specific modules.
+Use blacklist=module1,module2,module3 bootparameter.
+
+.TP
\fB \fI panic
sets an timeout on panic. Currently only zero value supported.
diff --git a/scripts/init-premount/blacklist b/scripts/init-premount/blacklist
new file mode 100755
index 0000000..1dd9dbc
--- /dev/null
+++ b/scripts/init-premount/blacklist
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# sanity check
+[ -z "${blacklist}" ] && exit 0
+
+# write blacklist to modprobe.d
+IFS=','
+for b in ${blacklist}; do
+ echo "blacklist $b" >> /etc/modprobe.d/initramfs
+done