Create a gist now

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 - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh | 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
exit
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

ffeldhaus,
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 )).

Owner

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.

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 http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable//Packages'

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?

Plexa

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