Automatically load modules during boot in CentOS 6

On one of the servers I manage we needed to load ipmi modules for hardware checks.

To load the required modules during the boot, we need to create a new file in /etc/sysconfig/modules/, I called it ipmi.modules. The file is a common shell script and it contains only a few lines:

#!/bin/bash

if [ ! -c /dev/ipmi0 ]; then
        modprobe ipmi_devintf
fi

modprobe ipmi_si

exit 0

Make sure the file is executable:

chmod +x /etc/sysconfig/modules/ipmi.modules

As usual, for more info check the official documentation from Red Hat.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s