5.5 Specifying Modules to be Loaded at Boot Time

The system loads most modules automatically at boot time. If necessary, you can specify an additional module that should be loaded.

To specify a module to be loaded at boot time:

  1. Create a file in the /etc/sysconfig/modules directory. The file name must have the extension .modules, for example foo.modules.

  2. Edit the file to create the script that loads the module.

    The script to load a module can be a simple modprobe call, for example:

    #!/bin/sh
    modprobe foo

    or more complex to include error handling:

    #!/bin/sh
    if [ ! -c /dev/foo ] ; then
      exec /sbin/modprobe foo > /dev/null 2>&1
    fi
  3. Use the following command to make the script executable:

    # chmod 755 /etc/sysconfig/modules/foo.modules