5

I am trying to load a module (bcm2835-v4l2) when booting my system, however, my research has shown two ways I can get the module loaded.

I can either append the name of the module to the end of the /etc/modules file

or I can add a

  • NAMEOFMODULE.conf

file within /etc/modprobe.d/ and add the name of the module

(in my case, '/etc/modprobe/bcm2835-v4l2.conf').

Two questions:

  1. What is the difference between these two? I have already seen this answer in unix.stackexchange, so anything that is more extensive or more clear is preferred

  2. Which should I prefer in this situation, and in general? Or is it not worth having a preference?

1 Answer 1

6

I don't know that there is a definitive, documented answer in Ubuntu. I am happy to learn otherwise.

What is most often and traditionally used is that if you simply want the module to load at boot automatically with no human intervention, use /etc/modules.

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

bcm2835-v4l2

If you'd like to load the module with some available parameters listed in modinfo, write a .conf file /etc/modprobe.d/bcm2835-v4l2.conf:

options bcm2835-v4l2 some_parameter=Y

Note that this is an example only. I am not certain that bcm2835-v4l2 has or even needs any manipulable parameters.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .