Bootstrap DS215j


The DS215j is the newest NAS device of the Synology DiskStation family.

DS215j connected

DS215j connected

I bought mine two weeks ago to serve the following functions

  • TimeMachine server for 2 MacBooks
  • Photo storage with external synced backup
  • DVB-T streaming and recording server (tvheadend or VideoStation)
  • automated tv-episode download and serving (SickRage)

Not all of these functions are working by now because of some issues with the new hardware architecture. The DS215j is based on a Marvell Armada 750 SoC, which is pretty new. By now, Synology released their toolchain and the guys of SynoCommunity have build a lot of packages to be installed via the graphical package manager. But for me, the DiskStation is not only the GUI but i also needed shell access combined with a few tools, the station does not provide be default.

This is why i tried and managed to install ipkg.

Optware bootstrap

There are no bootstrap packages for the DS215j by now but the Marvell Armada 375 is somewhat compatible with the Marvell Kirkwood mv6281 binaries. We can use them to set up our optware environment. If you see any problems with the provided binaries, please feel free to add a comment.

Set up ipkg

We have to download the bootstrap code and set up its environment.

Create the optware root directory

After extracting the above tar-archive a folder /opt has been created. This folder will be deleted every time you update your DSM. To prevent this problem, we have to move the content to a folder underneath /volume1/.

Old versions of the bootstrap script used a mount-point to bind /opt but this is not save any more because there have been some issues with the unmount during shutdown. Linking is the better solution.

Add /opt to PATH

Add the following line to /root/.profile or if you are using a user-account to get SSH access /home/username/.bashrc or the ZSH equivalent /home/username/.zshrc.

Set up the init-scripts

If you would like to install services, you want to start at boot-time, you have to set up these startup script.

Create the folder where the script will be placed.

Paste the following code into /usr/local/etc/rc.d/

Make it executable.

Thats it. If you have done everything right, you can reboot your DiskStation and log-in again to install your first packages.

Install packages with ipkg


First we have to update the packages list and after that we install three necessary tools.

Graphical way

If you are not the guy who likes it to work within a terminal-session, there is an app for it, running inside the DSM to manage your ipkg packages.

Open the Package-Center. Press Settings -> Package Sources -> Add and paste the following repository URL.

Now you can browse the newly added repository under the Community Tab inside of the Package-Center. Install iPKGui and launch the app afterwards from the main menu. It could be possible that the app has some issues with its name, but this is only a design flaw.

iPKGui icon

iPKGui icon


53 thoughts on “Bootstrap DS215j

  1. My brother recommended I might like this blog. He was entirely right. This post actually made my day. You can not imagine just how much time I had spent for this information! Thanks!

  2. Carlos says:


    I just ordered my DS215J and I expect to have it soon. I am already researching about how to hack it and I wonder if you know which ones are the most active communities for the Bootstrap script creation. If nothing exists yet, I would like to contribute creating my own script.

    Thank you for this great article!

    • André says:

      Hi Carlos,

      thanks for your comment.
      I’m currently not aware of any bootstrap community specialized for the DiskStation.
      Most of the scripts have been build for OpenWrt based routers like linksys WRT54G and then have been adapted to work on the Synology NAS.

      If you are interested in building something especially for the DiskStation environment, i would be happy to join.
      Just drop me a line.


        • Hi Steven,

          at the moment there is no existing repo.
          I didn’t had the time to start a project by myself.
          Maybe we can group up and deliver a better solution to get the DS215j bootstrapped?

      • Hey Joanna,bei kidstixx würde ich erstmal meinen Bänder-Vorrat auffüllen. Ich brauche gaaaanz viel von dem Herzchenband und dem türkis gepunktetem! Kann man von Bändern je genug haben??? Der Elefantenstempel ist auch niedlich. Ich wünsche dir noch einen schönen AbendLG Alina N aus B

  3. François says:

    Hi André,

    Thanks for your post that I follow step by step 😉 but (there is always a “but”) I try to install some packages (following this post and I have an error installing the libidn package

    Installing libidn (1.25-1) to root…
    Nothing to be done
    An error ocurred, return value: 22.
    Collected errors:
    ipkg_download: ERROR: Command failed with return value 127: `wget –passive-ftp -q -P /opt/ipkg-HhF1b8
    Failed to download libidn. Perhaps you need to run ‘ipkg update’?

    Could you help me ?



    • Hi François,

      I tried to install the libidn package on my disk station and it worked flawlessly.

      > $ sudo ipkg install libidn
      Installing libidn (1.25-1) to root...
      Configuring libidn
      Successfully terminated.

      According to your error message it looks like it can’t write to your /opt/ipkg-* folder.
      Are you root. You have to be a super-user to be able to install packages with ipkg.
      I prefer to use sudo but the easiest way is to login as root to your dis station.

      If this won’t work, you may try to download the package to your current folder and install it afterwards from this folder.
      The following commands will hopefully help you.

      > $ sudo ipkg download libidn
      Downloaded libidn as ./libidn_1.25-1_arm.ipk
      Successfully terminated.

      > $ sudo ipkg install libidn_1.25-1_arm.ipk
      Installing libidn (1.25-1) to root...
      Configuring libidn
      Successfully terminated.

      I hope i could help you.

      Best regards,

  4. Philipp says:

    Hi André

    Thank you for your explanation on the DS215J.
    I have a beginner’s question for you: if my directory /opt has some files – I did not linked the download directory to volume1 correctly ?

    Second question: Did you already ipkg install ghostscript? Finally it does not work for me. At the simply command “gs” the terminal returns:

    GPL Ghostscript 8.71 (2010-02-10)
    Copyright (C) 2010 Artifex Software, Inc. All rights reserved.
    This software comes with NO WARRANTY: see the file PUBLIC for details.
    Segmentation fault (core dumped)

    yours sincerely, Philipp

    • Hi Philipp,

      if your opt-folder looks a bit like the following plots, everything is fine. If not, please explain what you did. Hopefully i can help.

      andre@storage ~ [15:20:15]
      > $ ll /opt
      lrwxrwxrwx 1 root root 17 Jan 12 10:22 /opt -> /volume1/@optware

      andre@storage ~ [15:20:23]
      > $ ll /opt/
      drwxr-xr-x 2 root root 4.0K Mar 8 20:12 bin
      drwxr-xr-x 3 root root 4.0K Jan 31 16:59 doc
      drwxr-xr-x 4 root root 4.0K Jan 31 16:59 etc
      drwxr-xr-x 8 root root 4.0K Mar 8 20:12 include
      drwxr-xr-x 2 root root 4.0K Jan 31 16:59 info
      drwx------ 2 root root 4.0K Jan 6 11:14 ipkg-5S2c8Q
      drwx------ 2 root root 4.0K Jan 31 11:53 ipkg-pNvaBi
      drwxr-xr-x 6 root root 4.0K Mar 8 20:12 lib
      drwxr-xr-x 2 root root 4.0K Jan 2 21:07 libexec
      drwxr-xr-x 4 root root 4.0K Apr 12 2012 local
      drwxr-xr-x 3 root root 4.0K Apr 12 2012 man
      drwxr-xr-x 2 root root 4.0K Jan 2 21:07 sbin
      drwxr-xr-x 20 root root 4.0K May 31 2012 share

      Regarding your problem with ghostscript. Until now i hadn’t installed it, but i tried it to test the process.

      I got the same problem. Some digging around in blog-posts showed that this is a common problem of this fairly old version of ghostscript. But there is no newer version available.

      This should be fixed in version above >9.10 but unfortunately our latest version is 8.71.

      By now i have no time to cross-compile a newer version.
      Sorry i couldn’t help you with that.

      Best regards,

      • Philipp says:

        Hi André

        ll /opt or ll /opt/ gives the same output list:

        drwxr-xr-x 2 root root 4096 Mar 11 20:12 bin
        drwxr-xr-x 4 root root 4096 Mar 8 20:42 doc
        drwxr-xr-x 8 root root 4096 Mar 11 20:12 etc
        drwxr-xr-x 10 root root 4096 Mar 11 20:45 include
        drwx—— 2 root root 4096 Mar 11 20:12 ipkg-NZ6mHf
        drwx—— 2 root root 4096 Mar 8 20:33 ipkg-w8QGdd
        drwxr-xr-x 8 root root 4096 Mar 11 20:45 lib
        drwxr-xr-x 2 root root 4096 Mar 8 20:17 libexec
        drwxr-xr-x 4 root root 4096 Mar 11 20:12 man
        drwxr-xr-x 2 root root 4096 Mar 8 20:34 sbin
        drwxr-xr-x 19 root root 4096 Feb 14 2012 share
        drwxr-xr-x 6 root root 4096 Feb 15 2012 var

        ll /volume1/@optware

        drwxr-xr-x 3 root root 4096 Mar 8 19:56 etc

        Thank you for your feedback regarding the Ghostscript problem.

        Yours sincerely, Philipp

        • Hi Philipp,

          your above output means you didn’t linked the /opt folder properly to /volume/@optware.

          I think you can fix this, by simply moving all of the content from /opt to /volume/@optware and set the link afterwards.

          Try the following commands.

          First stop all optware programs.
          /usr/local/etc/rc.d/ stop

          Move the content of /opt to @optware. Remove the now empty folder /opt and set the missing link.
          mv -R /opt/* /volume1/@optware
          rm -rf /opt
          ln -s /volume1/@optware /opt

          I hope this works.

          If not, feel free to contact me.

          Beste regards,

          • Philipp says:

            Hi André

            I proceeded like this:
            /usr/local/etc/rc.d/ stop
            mv -i /opt/* /volume1/@optware
            mv -i /opt/etc/* /volume1/@optware/etc/
            rm -rf /opt
            ln -s /volume1/@optware /opt
            /usr/local/etc/rc.d/ start
            ipkg update
            Successfully terminated.

            ipkg install sudo less htop
            Package sudo ( installed in root is up to date.
            Package less (444-1) installed in root is up to date.
            Package htop (1.0.1-2) installed in root is up to date.
            Nothing to be done
            Successfully terminated.

            ls -l /opt
            lrwxrwxrwx 1 root root 17 Mar 21 23:03 /opt -> /volume1/@optware

            ls -l /opt/
            drwxr-xr-x 2 root root 4096 Mar 11 20:12 bin
            drwxr-xr-x 4 root root 4096 Mar 8 20:42 doc
            drwxr-xr-x 8 root root 4096 Mar 21 23:01 etc
            drwxr-xr-x 10 root root 4096 Mar 11 20:45 include
            drwx—— 2 root root 4096 Mar 11 20:12 ipkg-NZ6mHf
            drwx—— 2 root root 4096 Mar 8 20:33 ipkg-w8QGdd
            drwxr-xr-x 8 root root 4096 Mar 11 20:45 lib
            drwxr-xr-x 2 root root 4096 Mar 8 20:17 libexec
            drwxr-xr-x 4 root root 4096 Mar 11 20:12 man
            drwxr-xr-x 2 root root 4096 Mar 8 20:34 sbin
            drwxr-xr-x 19 root root 4096 Feb 14 2012 share
            drwxr-xr-x 6 root root 4096 Feb 15 2012 var

            I thank you for your help.

            Best regards, Philipp

  5. sueche says:

    Hi Andre,
    I saw your comprehensive guide for boostrapping DS-215j (Marvell Armada 375). I was searching a way to install driver for TT-TVStick® CT2-4400 USB stick on my DS-115j which is pretty much the same architecture (Marvell Armada 370). After boostrapping the NAS I need to “ipkg install optware-devel” to be able to load the toolchain for compiling from source code. I read somewhere on Synology forums that the OptWare gcc version is not 100% compatible with these architectures (the bootsrap used is for mv6281 – Marvell Armada 300) – thus giving errors when trying to compile natively some ipkg packages.
    What would be the best approach to compile the driver ?


    • Hi,

      i’m not aware of problems regarding gcc on my diskstation, but to be honest i didn’t tried it.
      But why do you want to compile the driver on the diskstation itself?
      I think the best approach is to cross-compile it using the provided toolchain from Synology on an ubuntu machine. The SynoCommunity provides a rather sophisticated toolchain which can be extended relatively easy. You can grad the code from their github repository: Just have a look at the contribute section on how to get started.

      I hope i could helped you a bit.

      Best regards,

      • Rob says:

        Yeh GCC is broken
        I get the following error

        /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /lib/ uses VFP register arguments, a.out does not
        /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: failed to merge target specific data of file /lib/

        • Peter says:

          Hi guys, I’ve reached the exact same issue with GCC from optware, would you mind pointing me in the right direction?
          Cheers, Peter.

          • Unfortunately there is no known fix for this.
            The problem is, that the optware chain was not build exactly for the ds215j and its architecture. There are some packages not working as expected.
            Maybe i could give it a try and cross-compile gcc myself.
            I’ll keep you updated.

            best regards,

          • lgm42 says:

            I’ve got the same issue and I would like to know if you have solve the compiler problem ?

            Thanks for your tuto

          • Wilson says:

            Yes, I also have exactly the same problem with GCC. Could you please keep me posted if you get any solution in the future? Thanks Andre.


  6. Hi,
    Thank you for your explanation on the DS215J.It worked perfectly on my Synology DS215J.
    I have a beginner’s question for you:
    what’s difference between your way of setup and this

    Best regards,

      • Hi Chris,

        excuse me for my late reply.
        There is no real difference, it used the how-to of trepmag as a source to create mine.
        But i added some tweaks und fixes i found during my setup that are specific for the ds215j.

        best regards,

        • Chris says:

          Hi andré

          I find this command “tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -“will over write the soft link “/opt”,so I change the command like “tar -xOvzf $ipk_name ./data.tar.gz | tar -C /volume1/@opware -xzvf -” then make the link “ln -s /volume1/@optware/opt /opt”, I think this will be good.

          An other question 😊 I don’t completely understand meaning of command”tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -” and the last symbol “-” also bother me.

          best regards,

          • Hey Chris,

            the untar should not overwrite the already existing link but extracting the content right to the to /opt linked folder.
            I think there could be a problem if you link it afterwards, because it extracts some data to /opt that will be removed if you link the folder to /volume1/@optware. I have to validate this.

            Regarding your second question, it’s quite easy to answer 😉
            The dash tells tar to use STDIN (the output from the pipe | ) to get its data. It’s quite common 😉

            Bets regards,

          • Chris says:

            Hi André

            folder /opt is right, but folder /volume1/@optware was empty. and /opt became an folder not a link. Maybe I had did something wrong.but I follow your commamd step by step? and as the result folder /volume1/@optware was empty is right?

            thank you your anwser for my second question. lol~~and sorry for my bad English.

            goodnight (already night in China)
            best regards,

          • Hi Chris,

            sorry for the delay.
            At first, the folder /volume1/@optware should have been empty but after linking and extracting the .tar archives, it should be filled and look almost like this.

            ➜ ~ cd /volume1/@optware/
            ➜ @optware ll
            drwxr-xr-x 2 root root 4.0K Mar 25 09:25 bin
            drwxr-xr-x 4 root root 4.0K Mar 17 15:23 doc
            drwxr-xr-x 7 root root 4.0K Feb 14 2012 etc
            drwxr-xr-x 10 root root 4.0K Mar 19 11:19 include
            drwxr-xr-x 2 root root 4.0K Jan 31 16:59 info
            drwx------ 2 root root 4.0K Jan 6 2015 ipkg-5S2c8Q
            drwxr-xr-x 9 root root 4.0K Mar 19 11:20 lib
            drwxr-xr-x 2 root root 4.0K Jan 2 2015 libexec
            drwxr-xr-x 4 root root 4.0K Apr 12 2012 local
            drwxr-xr-x 3 root root 4.0K Apr 12 2012 man
            drwxr-xr-x 2 root root 4.0K Mar 19 11:17 sbin
            drwxr-xr-x 23 root root 4.0K Feb 14 2012 share
            drwxr-xr-x 6 root root 4.0K Feb 15 2012 var

            If it is currently empty, but /opt is filled with this content, simply move it to /volume1/@optware and afterwards delete the /opt and setup the link.

            mv /opt/* /volume1/@optware
            rm -rf /opt
            ln -s /volume1/@optware/opt /opt

            Maybe you have to login as root to be able to execute this commands.

            Best regards,

          • You can see my comment below as a +1 to the above. The tarball extraction is likely the culprit that is overwriting the /opt symlink. Following your below steps (which I posted as well without seeing your comment) is a fix, but should be reflected in your original post. Otherwise people will lose any packages they install via ipkg with the next DSM security update (and there have been quite a few lately).

            Thanks for all your help!

  7. Johannes says:

    thanks for this description to download and install ipkg on a DS215j. Unfortunately I have some difficulties, maybe as I’m a newbee installing packages via command line.

    I followed your instructions for setting up ipkg, but it’s not downloading a bootstrap but the index.html of the webadress. What is going wrong?

    Thanks for helping,

  8. Stefan says:

    Hallo André,

    ich hoffe es ist in Ordnung wenn ich mein Anliegen in deutscher Sprache vortrage, aber aufgrund der technik-lastigen Frage bleibt mir leider keine andere Wahl…

    Zuerst einmal: Vielen Dank für dieses Tutorial! Ich möchte auf meiner neu erworbenen DS215j das Tool minidlna verwenden und um dieses installieren zu können, benötige ich die IPKGs. Ssh zugriff via PUTTY habe ich hinbekommen, mich mit root angemeldet und begonnen obige Befehle via Copy&paste einzufügen. Ich habe diese jeweils am Eingabeprompt in Putty getan. Dieser sah wie folgt aus:
    Nach jeder bestätigten Eingabe folgte wieder dieser prompt. Ich habe also alle Befehle und Skripte auf diese Weise eingefügt und zu keinem Zeitpunkt eine Fehlermeldung bekommen. Nach einem Neustart der DS wollte ich das IPKG Update ausführen, aber da kam schon eine Fehlermeldung. Habe ich zwischenzeitlich etwas übersehen? Hätte ich zwischendurch auf einen anderen Prompt wechseln müssen? Der Punkt “Add /opt to PATH” macht mich da etwas stutzig, weil dort etwas von /root/.profile steht. Wie käme ich dorthin?

    Wie Sie sehen ist dies alles absolutes Neuland für mich. Ich habe mir schon einges angelesen, aber häufig scheitert es auch an meinen Englischkenntnissen. Ist es Ihnen irgendwie möglich, mir das in irgendeiner Form zu erklären?

    Ich hatte auch versucht Pakete über die ipkgui zu installieren, aber da zeigt er mir garkeine Pakte an. Auch wenn ich als Paketquelle eintrage. Ich vermute, dass hängt mit einem Fehler den ich bei der grundsätzlichen Installation gemacht habe zusammen.

    Entschuldigen Sie bitte mein aufdringliches Fragen, aber Sie scheinen mir hier der einzih kompetente Ansprechpartner zu sein, der obendrein noch aus Deutschland kommt;-)

    Vielen Dank und viele Grüße

    • Hallo Stefan,

      Deutsch ist natürlich kein Pproblem 😉
      Ich kann nicht genau erkennen, wo das Problem bei deinem Setup ist, aber meine Frage an dich, warum brauchst du IPKG (Bootstrap)?

      Du sagstes du willst minidlna von installieren. Dabei handelt es sich jedoch um ein repository für den Synology Paket-Manager und nicht für IPKG. Leider gibt es in dem repo kein binary für die DS215j.

      Wo genau hängt es bei der Installation von ipkg?

      Warum genau brauchst du minidlna? DSM bietet doch mit Video/Photo/Audio Station auch upnp/dlna server.

      Beste Grüße,

      • Stefan says:

        Hallo André,

        ich muss gestehen, dass ich etwas verwirrt bin und mir das Ganze schon etwas peinlich ist…Ich war der festen Überzeugung, dass minidlna über IPKG zu bekommen sei. Und zwar weil es im herkömmlichen Paketmanager halt nicht angezeigt wurde, da es nicht verfügbar für die Ds215j is. Ich meine halt irgendwo gelesen zu haben, dass es andere hinbekommen haben…Leider bin nich der typische “Windows-Klicki-bunti” User und stoße hier sehr wahrscheinlich schnell an meine Grenzen.
        Ich hätte den minidlna gerne genutzt, da ich meine BluRays archiviert habe und bei nahezu allen Files mit DTS Ton der Standard Medienserver die Segel streicht. Dies soll über minidlna deutlich besser sein.
        Plex wäre noch eine alternative, allerdings bin ich unsicher bezüglich der Performance der Ds215j.
        Hast Du in diese Richtung noch eine gute Idee für mich?

        Auf jeden Fall danke ich Dir für Deine schnelle und rücksichtsvolle;-) Antwort!
        Vielen Grüße

        • Hallo Stefan,

          entschuldige bitte die späte Antwort, die Urlaubszeit stresst aktuell ein wenig 😉

          Ich habe vorige Woche die Anleitung aktualisiert und mit Hilfe einiger Leser von hier Fehler korrigiert, welche dazu führten, dass sich die DS215j nicht ordnungsgemäß bootstrappen ließ. Nun sollte man ipkg relativ einfach installieren können.
          Damit sollte dann deinem minidlna auch nichts mehr im wege stehen.

          Beste Grüße,

  9. I didn’t notice this the first time I did this (a month or two ago), but I think your symlink for /opt is being created incorrectly. Target should come before destination directory. The reason I noticed this is that all of my optware related packages & configs were wiped from my system on the latest DSM update. Upon googling it appears that Synology only preserves /volume1 and then they completely nuke all other folders when they install an update (I suppose that’s a pretty sure-fire way to control what’s installed system wide, if a huge amount of pain as a user). Well, along with it all, went everything I had setup in /opt because /opt wasn’t actually a symlink to /volume1/@optware as expected.

    The fix for this is for the second command in this tutorial to be the following:

    • Disregard, I’m on crack today apparently. Your syntax is absolutely correct and I have absolutely no idea why DSM 5.2.x decided to nuke my /opt directory (and along with it all the files in /volume1/@optware). Grr…

    • Okay, so it looks like what’s happened is that somehow the first main ipkg steps in the tutorial are somehow obliterating the symlink and extracting directly into a new /opt directory 🙁

      I’m guessing it’s the tar extract that’s overwriting the /opt symlink and replacing it with ipkg content most likely:

      The fix for this (as far as I can tell) is to move all contents under /opt into /volume1/@optware and then destroy /opt and recreate the symlink:

      Hope this helps someone else (and I hope this actually persist the next DSM security update).

      I think the only steps after future DSM security updates will be to recreate the /opt symlink and fix any root level config files (/root/.profile and rc.d files, etc)

    • salut,

      s’exuser, mon francais est très terrible.

      It is better to do it in english.
      Yes it is possible to install and use an video encoder for example ffmpeg.
      there are several ways to do it. ffmpeg can be installed using ipkg
      sudo ipkg install ffmpeg

      Another way is to use the debian chroot package and install ffmpeg as a debian package. Using this way you get a more recent version but you have to figure out, how to use ffmpeg inside the chroot from the outside of it.

      Best regards,

  10. , it's a long shot but I'm struggling to believe so many people in Government and intelligence agencies are oblivious to facts that are staring everyone else in the face.Regardless, some food for thought…

  11. I’ve done all steps – no errors. Rebooted.
    -> typing IPKG in shell says “ipkg: command not found”
    -> however if I typed ./ipkg-opt update the full thing seemed to work.
    Any ideas?
    Config: Synology DS215J – pretty much standard settings

  12. kally says:

    Hello Andre,

    thank you very much for your tutorial. Unfortunately I get the error message:

    -ash: syntax error near unexpected token `<'

    when I enter your code in line 2 from "Create the optware root directory" (mv <spa…)

    I'm using a DS216j which Marvell Armada like your DS215j.
    Do you know what is going wrong here?
    Thank you very much in advance!

    • Hey Kally,

      there was a problem during some wordpress update, which messed up the comannd within the code-tag.
      I updated the post to now show the right command.

      best regards,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.