You are not logged in.
Following the wiki, I'm failing to prevent some modules from being added to my initramfs.
The modules are mptspi and mptsas. These are modules for SCSI and SAS HBAs, and are "pulled in" by the block hook. They require some other modules as dependencies, but those are the only two that appear in mkinitcpio -M output. So I created /etc/modprobe.d/modprobe.conf:
blacklist mptspi
blacklist mptsas
and modified mkinitcpio.conf:
...
FILES="/etc/modprobe.d/modprobe.conf"
...
but after running mkinitcpio, the image still contains the modules.
I tried adding all of the related modules to the blacklist file as well, but that had no effect.
I've removed the block hook and explicitly added the necessary modules and the resulting image works fine. I would like to know what I'm doing wrong though. Thanks.
Last edited by alphaniner (2013-01-31 22:46:24)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Have you tried adding the modconf hook in mkinitcpio.conf ?
mkinitcpio -H modconf
==> Help for hook 'modconf':
This hook installs modprobe configuration files from /etc/modprobe.d and
/usr/lib/modprobe.d.
Last edited by Lone_Wolf (2013-02-02 14:12:44)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
blacklisting doesn't prevent the modules from being added to the initramfs, it only prevents the modules from being loaded.
Offline
@ Lone_Wolf
Thanks, but that didn't help.
MODULES=""
BINARIES=""
FILES="/etc/modprobe.d/modprobe.conf"
HOOKS="base udev autodetect modconf block lvm2 filesystems fsck shutdown"
I also tried with nothing in the FILES array.
Last edited by alphaniner (2013-02-04 14:38:59)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
blacklisting doesn't prevent the modules from being added to the initramfs, it only prevents the modules from being loaded.
This. This is your answer. blacklisting has nothing to do with whether or not it's added to the initramfs.
Offline
65kid wrote:blacklisting doesn't prevent the modules from being added to the initramfs, it only prevents the modules from being loaded.
This. This is your answer. blacklisting has nothing to do with whether or not it's added to the initramfs.
I understand what blacklisting does, and that it has no direct influence on the initramfs. But 65kid's response (and yours a bit too) are ambiguous and don't rule out indirect influence.
Some examples of non-ambiguous answers: "The method described in the wiki is completely invalid" or "You're mis-understanding that bit of the wiki" etc.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Ambiguous? The wiki makes exactly the same claim:
Blacklisting, in the context of kernel modules, is a mechanism to prevent the kernel module from loading.
...
to prevent the initramfs from loading some of those modules, blacklist them
What about this is vague? Given the presence of a module and a blacklist, the module will not be loaded. Loading effectively means "modprobe $somemodule". It has nothing to do with whether or not the module will be added to the initramfs.
Offline
to prevent the initramfs from loading some of those modules, blacklist them
Ahh crap. I read that as "prevent the modules from being loaded into the initramfs." That was contrary to what you and 65kid were saying, and I was unsure which was correct.
In my defense, it seems silly to have at least two easy ways (this and bootloader kernel line) of preventing modules from being loaded, but (apparently) no similarly easy way of preventing modules being put into the initramfs in the first place.
Anyway, thanks for straightening me out.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline