Skip to content

Instantly share code, notes, and snippets.

@ffeldhaus
Last active September 26, 2023 11:09
Show Gist options
  • Save ffeldhaus/226f2c5743a7f631806d to your computer and use it in GitHub Desktop.
Save ffeldhaus/226f2c5743a7f631806d to your computer and use it in GitHub Desktop.
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
Copy link
Author

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.

@PlexaFCI
Copy link

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

@duceduc
Copy link

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.

@zisco67
Copy link

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:

Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-armeabihf/Packages.gz.
wget: error while loading shared libraries: /opt/lib/libgcc_s.so.1: internal error
Collected errors:
 * opkg_download: Failed to download http://ipkg.nslu2-linux.org/optware-ng/buildroot-armeabihf/Packages.gz, wget returned 127.

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