Skip to content

Instantly share code, notes, and snippets.

@darencard
Last active November 3, 2023 03:31
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save darencard/500eca3d09e32283d5fe6377270fd9e8 to your computer and use it in GitHub Desktop.
Save darencard/500eca3d09e32283d5fe6377270fd9e8 to your computer and use it in GitHub Desktop.
Setting up and using Entware on Synology device

Setting up and using Entware on Synology device

Taken from https://keestalkstech.com/2018/03/install-nano-with-entware-on-synology-nas-dsm6/.

  1. Prepare directory for Entware
# create a home for Entware
mkdir -p /volume1/@Entware/opt
# go on as root
sudo -i
# remove a previous install
rm -rf /opt
# link the folders
ln -sf /volume1/@Entware/opt /opt
echo "Done!"
  1. Determine system architecture
\
printf "\nProcessor:   "; \
cat /proc/cpuinfo | \
grep "model name" | \
grep "[^:]*$" -o  | \
uniq; \
printf "Architecture: "; \
uname -m; \
printf "\n"
  1. Install Entware by script - use correct script based on architecture
# armv5 
wget -O - http://bin.entware.net/armv5sf-k3.2/installer/generic.sh | /bin/sh
# armv7 
wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | /bin/sh
# armv8 
wget -O - http://bin.entware.net/aarch64-k3.10/installer/generic.sh | /bin/sh
# x64 
wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh
  1. Enable Entware to startup by default (DS6+ installation)
# leave root
exit;
# remove previous file
rm entware-startup.sh 2> /dev/null
# write the startup file
printf "#!" >> entware-startup.sh
echo "/bin/sh" >> entware-startup.sh
echo "" >> entware-startup.sh
echo "case $1 in" >> entware-startup.sh
echo "    start)" >> entware-startup.sh
echo "    mkdir -p /opt" >> entware-startup.sh
echo "    mount -o bind /volume1/@Entware/opt /opt" >> entware-startup.sh
echo "    /opt/etc/init.d/rc.unslung start" >> entware-startup.sh
echo "    ;;" >> entware-startup.sh
echo "    stop)" >> entware-startup.sh
echo "    ;;" >> entware-startup.sh
echo "esac" >> entware-startup.sh
# copy the startup file
sudo mv entware-startup.sh /usr/local/etc/rc.d/entware-startup.sh
echo "Done!"
  1. Enable script and reboot system
sudo -i
echo "" >> /etc/profile;
echo ". /opt/etc/profile" >> /etc/profile
reboot
  1. Install Entware packages
# example with nano (modify accordingly for other packages)
sudo opkg install nano

Here are all of the packages available for x86-64 architectures:

https://pkg.entware.net/binaries/x86-64/Packages.html

To view packages for other architectures, visit following link and navigate to architecture and Packages.html file:

https://pkg.entware.net/binaries/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment