Skip to content

Install on Synology NAS

hoewer edited this page Jun 24, 2022 · 42 revisions

Introduction

ARM & intel based devices are supported. DSM version must be 3.2 or higher. Use armv5 installer for Marvell Kirkwood mv6282 cpu, you can use armv7 installer for newer ARM cpu's. Although armv7 repo was compiled with cortex-a9 optimization it was successfully tested on Marvell Armada XP based NAS. Use aarch64 installer for Realtek RTD129x CPU (64 bit arm).

Guide tested on Synology DS1618+ w/ DSM 6.2-23739 Update 1
Guide tested on Synology DS920+ w/ DSM 7.0-41890

Deploying Entware

1. Create a folder on your hdd (outside rootfs)

mkdir -p /volume1/@Entware/opt

2. Remove /opt and mount optware folder

Make sure that /opt folder is empty (Optware is not installed), we will remove /opt folder with its contents at this step.

rm -rf /opt
mkdir /opt
mount -o bind "/volume1/@Entware/opt" /opt

Note : if the bind command doesn't work, try to create a link instead :

ln -s /volume1/@Entware/opt/ /opt

3. Run install script depending on the processor (uname -m to know)

  • for armv8 (aarch64) - Realtek RTD129x
wget -O - https://bin.entware.net/aarch64-k3.10/installer/generic.sh | /bin/sh
  • for armv5
wget -O - https://bin.entware.net/armv5sf-k3.2/installer/generic.sh | /bin/sh
  • for armv7
wget -O - https://bin.entware.net/armv7sf-k3.2/installer/generic.sh | /bin/sh
  • for x64
wget -O - https://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh

4. Create Autostart Task

Create a triggered user-defined task in Task Scheduler.

  • Goto: DSM > Control Panel > Task Scheduler
  • Create > Triggered Task > User Defined Script
    • General
      • Task: Entware
      • User: root
      • Event: Boot-up
      • Pretask: none
    • Task Settings
      • Run Command: (see bellow)
#!/bin/sh

# Mount/Start Entware
mkdir -p /opt
mount -o bind "/volume1/@Entware/opt" /opt
/opt/etc/init.d/rc.unslung start

# Add Entware Profile in Global Profile
if grep  -qF  '/opt/etc/profile' /etc/profile; then
	echo "Confirmed: Entware Profile in Global Profile"
else
	echo "Adding: Entware Profile in Global Profile"
cat >> /etc/profile <<"EOF"

# Load Entware Profile
[ -r "/opt/etc/profile" ] && . /opt/etc/profile
EOF
fi

# Update Entware List
/opt/bin/opkg update

6. Reboot your NAS.


Tips

  • Firmware update erases /opt folder. You should deploy Entware outside of rootfs and create symlink to /opt or use mount -o bind. After firmware update you may need to edit /etc/rc.local and /root/.profile files once more.
  • You can create task that start after Entware has loaded.
    • Create > Triggered Task > User Defined Script
      • General
        • Task: Entware - iperf3 Server
        • User: root
        • Event: Boot-up
        • Pretask: Entware (name of the other entware task)
      • Task Settings
        • Run Command: (see bellow)
          • # Run ( /opt/bin/iperf3 -s -D -p 5201 ) as GUEST user.
          • sudo -H -u guest bash -c 'echo "I am $USER, with uid $UID"; /opt/bin/iperf3 -s -D -p 5201'
Clone this wiki locally