Showing posts with label modprobe persistent. Show all posts
Showing posts with label modprobe persistent. Show all posts

Tuesday, May 22, 2012

Enabling kernel modules at boot time

To maintain persistent kernel module, create a file called 'modulename.modules' in /etc/sysconfig/modules/ and insert corresponding command. For example, to load 'rt3070sta' module, I need to find the location of device 'ra0'. Find it using:
# find / -name 'ra0'
/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/net/ra0
Now, I will add this to rt3070sta.modules:
#!/bin/sh

if [ ! -c /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/net/ra0 ] ; then
        exec /sbin/modprobe rt3070sta >/dev/null 2>&1
fi