[arch-dev-public] removing load-modules.sh from udev

Tom Gundersen teg at jklm.no
Sat May 28 09:16:17 EDT 2011


Hi guys,

I have recently been removing Arch specific stuff from our udev
package with the aim of getting it as close to upstream as possible.
This work is mostly done, except for one major last hurdle:
load-modules.sh.

udev (and related packages) have improved a lot since load-modules.sh
was first introduced, and in fact load-modules.sh has been through
many iterations to reflect this. As things stand now, all the
use-cases of load-modules.sh is covered by modprobe. The only
difference being a different syntax.

After many discussions with Thomas we therefore decided it is time to
get rid of load-modules.sh. I'll outline what this will entail:

---

rc.conf - MOD_AUTOLOAD: this will no longer have any effect,
auto-loading of modules is always enabled. If you really want to use
udev without auto-loading any modules, then a custom udev rule would
probably be the way to go. I imagine no one would have this usecase,
but if someone do, I'd be happy to hack up some udev rules for them.

---

rc.conf - MODULES(!mod1, !mod2): blacklisting modules in the modules
array will no longer have any effect. modprobe already provides two
different ways of preventing modules from being loaded, so this is
just a matter of updating some configuration files. To blacklist
modules, add a new .conf file to /etc/modprobe.d/ with the contents

blacklist mod1
blacklist mod2

This means that mod1 and mod2 are never inserted by udev, but you can
still modprobe them manually, and they can still be pulled in as
dependencies of other modules (via udev or otherwise). This is what
you want in most scenarios. If you want to avoid a module from being
inserted altogether use the syntax

install mod1 /bin/false
install mod2 /bin/false

instead. However, this is not really encouraged, so should only be
used as a short-term workaround to a broken module.

---

/proc/cmdline - disablemodule=mod1,mod2

This syntax will no longer work. However, it might be useful to
prevent modules from loading in an emergency (an update that installed
broken modules might prevent your system from booting). In this case,
replace it with "mod1.disable=1 mod2.disable=2", this will have the
same effect as the "install /bin/false" syntax.

I submitted a patch upstream, so that in a future release of
module-init-tools, we will also have "modprobe.blacklist=mod1,mod2"
which will give the same functionality as the "blacklist" syntax.




In the coming week I'll move a new udev package to testing that
implements this change, and I'll leave it there for quite some time to
catch any problems. I will also post a detailed announcement before
moving it to core.

Please let me know of any concerns.

Cheers,

Tom


More information about the arch-dev-public mailing list