I used modprobe to load the 8021q.ko module on a server. I expected to have to do this every time the server rebooted until I made it persistent. However, to my surprise, it was loaded automatically when I rebooted.

I was not convinced this was going to happen on every reboot so I started looking at just how to make it persistent. In my searches I found docs stating that each module needed an /etc/sysconfig/modules/<module_name>.module file with the appropriate config options. My assumption was that if it was made persistent, then the modprobe command must have added the file for me. It wasn't there, though.

Then, through a little more searching I found this in the CentOS 5 documentation:

This approach is not necessary for network and SCSI interfaces because they have their own specific mechanisms.

I'm dealing with RHEL 6 but it appears to still be relevant even though the general module loading mechanism has changed a little (/etc/sysconfig/modules/<module_name>.module on RHEL/CentOS 6 vs /etc/modprobe.conf on RHEL/CentOS 5).

So now I'm left wondering what those specific network and SCSI mechanisms are. Where do I look to see and ensure that modules are loading persistently?

  • I'm surprised that you had to load it even once. Normally Linux should be able to load the module when it sees the hardware that requires it. Are you sure the module wasn't loaded automatically when you plugged in the hardware? Where is that sentence from the CentOS documentation? The basic mechanism isn't specific to network and SCSI. Oct 7, 2014 at 21:48
  • It may have loaded it had I not done so manually. However, that was my first step: load the module then configure the vlan tagging.
    – theillien
    Oct 7, 2014 at 22:04
  • I'm not sure I understand what you're saying about basic mechanism. The basic mechanism appears to be that most modules need a .module file under /etc/sysconfig/modules whereas the network and SCSI modules are handled differently. The sentence can be seen at centos.org/docs/5/html/Deployment_Guide-en-US/…
    – theillien
    Oct 7, 2014 at 22:12
  • From that page: “kernel modules are usually loaded directly by the facility that requires them”. That's the basic mechanism I'm referring to. Having looked up what 8021q is, I see that it isn't the usual case because it isn't a driver for a hardware device whose presence the kernel would detect. So it may need to be loaded explicitly. But then I'm not sure whether it qualifies as a network interface to which that sentence in the documentation would apply. The file under /etc/sysconfig is to specify options; the request to load it systematically at boot is in /etc/rc.modules. Oct 8, 2014 at 7:56


You must log in to answer this question.

Browse other questions tagged .