On a "Linux debian 2.6.32-5-amd64 #1 SMP" installation where loading a kernel module (mpt2sas) is desired to be delayed to be loaded after starting sshd and users can remotely login, the mpt2sas module was disabled from loading in single user boot, by:
$ echo 'blacklist mpt2sas' >> /etc/modprobe.d/mpt2sas.conf; depmod -aeF /boot/System.map-2.6.32-5-amd64; update-initramfs -u -k $(uname -r)
Later on a modeprobe -v mpt2sas will be run in /etc/rc.local.
After installing a newer mpt2sas driver, using dpkg -i mpt2sas-15.00.00.00-3_Debian6.0.5.amd64.deb the result is that the old driver is renamed from /lib/modules/2.6.32-5-amd64/kernel/drivers/scsi/mpt2sas/mpt2sas.ko to /lib/modules/2.6.32-5-amd64/kernel/drivers/scsi/mpt2sas/mpt2sas.ko.orig and the new driver is installed at /lib/modules/2.6.32-5-amd64/weak-updates/mpt2sas/mpt2sas.ko.
The side effect is that the line blacklist mpt2sas in /etc/modprobe.d/mpt2sas.conf no longer has any effect, when modules are loaded in the single user boot process, mpt2sas is loaded as first kernel module.
Regression:
- I know that /etc/modprobe.d/mpt2sas.conf is still being loaded, because when entering a faulty line in this file, a warning is display at console during boot (4 times).
- Running
depmod -aeF /boot/System.map-2.6.32-5-amd64; update-initramfs -u -k -t $(uname -r); rebootdoesn't improve. - Adding kernel boot parameter
modprobe.blacklist=mpt2sasdoesn't improve.
How can I block loading the new mpt2sas kernel module during the single user boot phase? (I still want to load mpt2sas using modprobe in /etc/rc.local).
local_startandlocal_stop, put your modprobe line in local_start then movelocalservice to desired position, e.g. if your sshd is running at runlevel ‘boot’ place ‘local’ to default runlevel with your rc-script managing utility (rc-update, update-rc.d or something), or specify sshd inneeddependencies for ‘local’ service in rc.conf (there are many examples). – tijagi Dec 21 '12 at 6:14