Score:2

How to load modules on Synology NAS on boot?

de flag

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?

Score:3
by flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.