Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bootstrap Synology ds215j using optware-ng

Bootstrap the Synology DS215j with optware-ng

I tried the instructions described in the Blogpost Bootstrap DS215j to install optware for ds215j but was unsatisfied with the long outdated packages it provided. Luckily, there now is optware-ng which is a fork of optware and provides recent packages.

This is how I managed to install optware-ng on my Synology ds215j inspired by the instructions in the Gist Boostrap the Synology DS215j with optware, ipkg, and sudo:

Download & Install ipkg in a persistent manner

# become root
sudo -i

# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optware

# Download & configure ipkg
wget -O - | sh

# Move the extracted /opt files to our persistent optware directory & symlink /opt
mv /opt/* /volume1/@optware/
rm -r /opt
ln -s /volume1/@optware /opt

# Make sure that the symlink gets recreated on every boot
echo "/bin/ln -sf /volume1/@optware /opt" >> /etc/rc.local
echo "/bin/sed -i 's|PATH=/sbin|PATH=/opt/bin:/opt/sbin:/sbin|' /etc/profile" >> /etc/rc.local

# Make ipkg available immediately to all users
sed -i 's|PATH=/sbin|PATH=/opt/bin:/opt/sbin:/sbin|' /etc/profile
# Logout & Login
sudo -i

Install Packages

ipkg install nano

Uninstall optware-ng

# become root
sudo -i

# unlink opt folder
unlink /opt

# remove optware folder
rm -rf /volume1/@optware

# remove entry in .bashrc
vi ~/.bashrc

This comment has been minimized.

Copy link

@paul-xor paul-xor commented Apr 12, 2016

Thanks for the instuctions..but it looks this line is not working for me:

sed '/ulimit/iexport PATH=/opt/bin:/opt/sbin:\$PATH\n' /etc/profile >> /etc/profile

however, root is working fine )).


This comment has been minimized.

Copy link
Owner Author

@ffeldhaus ffeldhaus commented May 5, 2016

Strange, the line is working for me. The only thing it does is, to insert export PATH=/opt/bin:/opt/sbin:$PATH before the line ulimit -c unlimited in /etc/profile. This will ensure that your PATH environment variable always includes /opt/bin and /opt/sbin. You can edit /etc/profile manually and ignore the sed command.


This comment has been minimized.

Copy link

@PlexaFCI PlexaFCI commented Jan 14, 2018

Ane question from me. Im dealing with ver old DS109, installed IPKG but i have little problem with Path

then i do update

ipkg update:

ipkg_download: ERROR: Command failed with return value 24: `wget --passive-ftp -q -P /tmp/ipkg-mNBLTO'

The problem is "/Packages" always added at the end of the line.

Can you help me and tell where it is stored and how to remove it?



This comment has been minimized.

Copy link

@duceduc duceduc commented Apr 8, 2018

Hi. Is the code up-to-date? I wish to install nano on my DS215J. I noticed user 'paul-xor' has a comment with different code mentioned.

Edit: Nevermind. I went ahead and followed the instructions above and installed nano with a hitch. Thanks.


This comment has been minimized.

Copy link

@zisco67 zisco67 commented Feb 4, 2021

I've ipkg installed (opkg version 0.2.4), but when I'm tryin to update it (in order to install nano), I get this error:

wget: error while loading shared libraries: /opt/lib/ internal error
Collected errors:
 * opkg_download: Failed to download, wget returned 127.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment