Hiromatsu

[Question] How to automatically load a driver (insmod)?

Recommended Posts

Hello everyone,

 

I am struggling with a proplem.

In the /lib/modules/ folders there is a mpt3sas.ko

This is the driver file for my HBA (LSI 9300 8i)

 

I can SSH into my box and load it manually via: insmod /lib/modules/mpt3sas.ko

But apparantly I am too stupid to find a way to automatically load the ko file during the boot up sequence.

 

Can anybody help?

 

If its important: I am running my box on ESXi 6.0 with the controller passed through.

Share this post


Link to post
Share on other sites

The mpt3sas will be automatically load at boot in next release.

 

You can easily edit /etc/rc.local and add your insmod command to load the mtp3sas.ok module :wink:

Share this post


Link to post
Share on other sites
The mpt3sas will be automatically load at boot in next release.

 

You can easily edit /etc/rc.local and add your insmod command to load the mtp3sas.ok module :wink:

 

Thank you very much @Trantor

 

Sorry for not telling right away what kind of newbie I am:

 

So I browsed for the rc.local file, but there isn't any :sad:

 

Can I just create one?

Or do I have to follow a special procedure?

 

something like (I googled this but it is made for Fedora)

su -

(root password)

touch /etc/rc.local

chmod +x /etc/rc.local

(add the insmod)

 

systemctl enable rc-local.service

 

 

And what content does the rc.local need to have?

Is it sufficient to just have:

 

#!/bin/sh

# Copyright © 2000-2014 Synology Inc. All rights reserved.

 

insmod /lib/modules/mpt3sas.ko

 

 

 

Does this file needs to be in etc only or in etc.defaults too?

 

Thank you

Share this post


Link to post
Share on other sites

try like that...

 

cp mpt3sas.ko /lib/modules/mpt3sas.ko (do this from where you stored the .ko into your sys)

echo "insmod /lib/modules/mpt3sas.ko" >> /etc/rc.local

 

of course you need to put the file 1st into correct dir

Share this post


Link to post
Share on other sites