File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
features/runtime/data/etc Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ The following parameters can be passed via kernel command line.
1313- ` debug ` shows more messages.
1414- ` quiet ` tries to be more quiet.
1515- ` rd-preload-modules ` enables/disables loading a static list of modules before udev service.
16+ - ` rd.driver.blacklist=<comma-separated list> ` specifies the list of kernel
17+ module names that should be added to blacklist before loading any kernel modules.
1618
1719Parameters responsible for mounting the root file system:
1820
Original file line number Diff line number Diff line change @@ -22,3 +22,4 @@ register_parameter string ROOT
2222register_parameter string ROOTFLAGS
2323register_parameter string ROOTFSTYPE
2424register_parameter string STOP
25+ register_array string RD_DRIVER_BLACKLIST
Original file line number Diff line number Diff line change 1818[ -z " ${RD_DEPMOD-} " ] ||
1919 depmod -a
2020
21+ if [ " ${RD_DRIVER_BLACKLIST:- 0} " != 0 ]; then
22+ i=0
23+ while [ $i -lt ${RD_DRIVER_BLACKLIST:- 0} ]; do
24+ eval " MODS=\"\$ RD_DRIVER_BLACKLIST$i \" "
25+
26+ modnames=()
27+ readarray -t -d, modnames <<< " $MODS,"
28+
29+ for modname in " ${modnames[@]} " ; do
30+ [ -n " $modname " ] && [ " $modname " != $' \n ' ] ||
31+ continue
32+ printf ' blacklist %s\n' " $modname "
33+ done >> /etc/modprobe.d/initramfs-blacklist.conf
34+ done
35+ fi
36+
2137[ -n " ${RD_PRELOAD_MODULES-} " ] ||
2238 exit 0
2339
You can’t perform that action at this time.
0 commit comments