2

I have a Synology NAS (DSM 6.2.4) and I would like to load usbserial.ko and cp210x.ko on boot.

When I run:

sudo insmod /lib/modules/usbserial.ko
sudo insmod /lib/modules/cp210x.ko

The drivers work correctly, but when I reboot they are no longer loaded. Is there a way to get these to load on boot?

1 Answer 1

3

Yes, you can do that, first ssh into your Synology NAS then create a script here /usr/local/etc/rc.d/ like with vi with sudo vi /usr/local/etc/rc.d/load-modules.sh put this inside

#!/bin/sh

case $1 in
    start)
        echo "Loading usbserial.ko and cp210x.ko modules..."
        insmod /lib/modules/usbserial.ko
        insmod /lib/modules/cp210x.ko
        ;;
    stop)
        echo "Unloading usbserial.ko and cp210x.ko modules..."
        rmmod cp210x
        rmmod usbserial
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac

exit 0

then give it the execute permission sudo chmod +x /usr/local/etc/rc.d/load-modules.sh

You can test if your script work like that sudo /usr/local/etc/rc.d/load-modules.sh start

Then restart your Synology NAS, now it is loaded at startup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.