Installation of Optware on the D-Link DNS-320, DNS-321, DNS-325, DNS-343, DNS-345 and Conceptronic CH3MNAS

Many people asked me to compile various packages over the last few years. Sometimes i was able to help and sometimes (in rare occasions) i had to reject a request when it was impossible to fulfill it. Then i often told the requestor to install optware which originated from the NSLU2-Project and provides many addition packages. I didn’t have experienc on this, so i had to leave them in the dark. Until recently.

Werbung


I’ve done a lot of research and looked at many scripts. A few days ago i stumbled across a thread in my favorite fun_plug-Board that was promoting a script which manages all the stuff. Well i tried it and made several modifications to it so that it works in the D-Link DNS-320, DNS-320L, DNS-321, DNS-325, DNS-343, DNS-345 and Conceptronic CH3MNAS. THIS DOES NOT WORK ON THE D-Link DNS-323 AND Conceptronic CH3SNAS, CHECK HERE FOR A TUTORIAL FOR THESE DEVICES!

German version of this tutorialFirst you need a working Fonz fun_plug which you can install with these instructions. Then enter the following commands:

wget http://wolf-u.li/u/233 -O /ffp/start/optware.sh
chmod a+x /ffp/start/optware.sh
/ffp/start/optware.sh start

This downloads the Optware-Script for fun_plug, marks it as executable (which leads to a start on every boot, as you’ve already learned) and starts the script once. This may take a while as the NAS is downloading Optware. After the successful download, you should reboot you NAS to see if it works and to set the correct environment-variables automatically.

The usage of ipkg (The package manager for Optware (like funpkg for fun_plug)) is shown if you enter “ipkg” in your Terminal. The current list of packages is loaded when entering “ipkg update“, a package is installed with “ipkg install [packagename]“.

93 thoughts on “Installation of Optware on the D-Link DNS-320, DNS-321, DNS-325, DNS-343, DNS-345 and Conceptronic CH3MNAS”

  1. I have followed the above tutorial but when I try and start optware I get the following error:

    * /ffp/start/optware.sh ...
        Running: mkdir -p /opt
        Running: mount --bind /ffp/opt/optware /opt
    mv: cannot overwrite directory with non-directory
    mv: cannot overwrite directory with non-directory

    What am I doing wrong ?

      1. Note that I couldn’t fix this same issue (using all methods outlined in the comments) and found that deleting the symbolic link of firefly (which points to /usr/local/firefly) found under /mnt/HD_a2/ffp/opt/optware did the trick!

        Need to add a fix to the /ffp/start/optware.sh file: look for the second instance of “optware_start” and add the following code after the initial { opening bracket:

        if [ -d /mnt/HD_a2/ffp/opt/optware/firefly ]

        then

        echo “-> Firefly detected under optware folder, removing to fix error on load..”

        rm /mnt/HD_a2/ffp/opt/optware/firefly

        fi

        and that should solve the error on reboot.

  2. First of all my apologies if this question is not in the right place.
    I purchased the Dlink Dns-320 before christmas.
    I use it to stream multimedia via a homeplug powerline setup
    around the house via Mede8er media players with absolutely
    no problems at all, in fact for a non technophile like me it was
    all suprisingly easy.

    Having said that I have one annoyance with the Nas and I
    wondered if you or any of your site visitors could advise me
    on.

    I have 2 X 2tb drives in the unit and when the menu’s of
    the media players are accessed they show up as volumes
    1 & 2, my question is this:- is it possible to name the
    volumes to match the contents of the drives in anyway,
    I would like to be able to rename the volumes as follows:-
    volume 1 to Films and Photographs
    volume 2 to TV and Music
    It is not possible to set the media players to recognise
    the drives as I want, as I presume they get there information
    direct from the DNS-320. So to a non technophile like me
    it needs to be done through the DNS-320 user interface,
    if so I cannot find a way to do it. I have various web sites
    (including Dlink) with no success.

    If anyone could help I would be grateful.
    Thanks in advance

    1. Hello,
      just create two folders below Volume_1 named Filmes and Photographs and another two named TV and Music below Volume_2. Then add Sharing of these four folders and remove the sharing of Volume_1 and 2.

  3. Hi,

    I hope you can help me. I have a DNS320 but I’m unable to get access via telnet. When I try after rebooting DNS to connect via “telnet ip-address” I get “telnet: Unable to connect to remote host: Connection refused”. But I can ping the DNS320. I tried to connect via telnet with firmeware 1.0 and 2.0.
    It would be great if somebody has an idea what I do wrong.

    Thanks

      1. I have a DNS-320. So, why when i want to install mc, i must type:
        opt/bin/ipkg install mc
        instead of simple – ipkg install mc
        And if i want to start mc, i must to type:
        /mnt/HD/HD_a2/ffp/opt/optware/etc/mc
        instead of – mc
        ???

  4. Hi Uli!

    Coluld you please help me? I would like to install optware to my DNS-320 but I get “Device or resource busy” message. What’s wrong?
    UPnP and NFS are not working.

    /mnt/HD/HD_a2/ffp/start # chmod a+x /ffp/start/optware.sh
    /mnt/HD/HD_a2/ffp/start # /ffp/start/optware.sh start
    mv: cannot rename '/opt': Device or resource busy
        Running: mkdir -p /opt
        Running: mount --bind /ffp/opt/optware /opt

    Thanks.

      1. UPnP AV Server -> Disable

        I never use UpNp server, only NFS. But at this time NFS server is disabled too.
        Do you have any idea? Thx.

  5. I think this is a ordinary problem…

    Running: mkdir -p /opt
    Running: mount –bind /ffp/opt/optware /opt
    mv: cannot overwrite directory with non-directory
    mv: cannot overwrite directory with non-directory

    Because the firefly and perl5.10 folders present in /opt directory, My firmware is 2.0

    There is problems too it the paths, the ipkg command only works it /opt/bin/ipkg

    I also have this problem in two dns-320 and still can not resolve!!

    1. Same problem here !

      UpNp : disable
      NFS/AFP: disable

      root@motte:/mnt/HD/HD_a2# sh /ffp/start/optware.sh start
      mv: cannot rename ‘/opt’: Device or resource busy
      Running: mkdir -p /opt
      Running: mount –bind /ffp/opt/optware /opt
      mv: overwrite ‘/opt/firefly’?
      mv: overwrite ‘/opt/perl5.10’?

      Any idea ?

      1. Works for me 🙂

        I guess first time i execute the script my upnp server was up.

        I removed symlinks:

        – /opt/firefly
        – /opt/perl5.10

        Remove directory

        – /ffp/opt/optware

        And then re-run:

        sh /ffp/start/optware.sh start

  6. I’m not sure how this works, only been in it for a couple of hours.
    But I successfully installed fun_plug and optware by following this great guides. Then I installed throu optware sabnzbdplus, and this ended successfully to.. I rebooted.. but where can I find the app? Aint this a GUI app?
    When I run ipkg list_installed i can see the installed files.
    Is it installed to wrong directory? My home directory is set to /ffp/home/root/ as said in fun_plug guide.

    Please help and thank you for great work with this guides! 🙂

    Br,
    Fredrik

    1. I think I’m going to be nuts..!! 😐
      Cant get this right with optware installed files.
      I want SABnzbd+ installed on my NAS-325. But i dont know how to start the file. The sabnzbd.py file I supose!? Do you have to make a script to the or edit one of the existing startscripts to make this work??
      I have python installed and it respond (start) when executing at the promt. I’ve tried to start sabnzbd.py with python but it doesnt start

      Please help me!!

      @Uli can you please send me an email.. 🙂

      1. /opt/bin/python SABnzbd.py (inside the folder where you have SABnzbd files)

        If you put the same command with the correct paths in fun_plug file, SABnzbd start automatically on ever NAS reboot!

        1. Cant get it to work..
          I dont know how many ways I have tried..
          /ffp/opt/optware/share/SABnzbd/./SABnzbd.py -d -f ~/.sabnzbd/sabnzbd.ini

          and

          python /ffp/opt/optware/share/SABnzbd/SABnzbd.py -f ~/.sabnzbd

          but then it says python not found
          Python is installed!

          1. mine:

            /opt/bin/python SABnzbd.py -s:8090 -d -f sabnzbd.ini

            and put the sabnzbd.ini in the same folder where you have SABnzbd.py (google for the .ini file)

          2. are the files in wrong directorys?
            Can I choose that when install? Can you just move them around ?

          3. Dont understand.. The files are different when i use web file server and when i use windwos explorer..
            I dont know where to put the files.. I found the INI file in the NAS web file server but not in windows explorer??

          4. finally!! 🙂
            could you be a little more exact in your description where in the fun_plug i should put the path..

            Thanks for your time!!

          5. put in the finally…. like this:

            echo “* OK”
            else
            echo “$FFP_RC: Not found or not executable”
            fi

            /opt/bin/python /ffp/opt/pyload/pyLoadCore.py

          6. but the issue is now that SABnzbd+ wizard is running at reboot and you have to make all the settings from the beginning ??? 🙂

          7. put the sabnzbd.ini in the same folder, and…

            /opt/bin/python SABnzbd.py -s:8090 -d -f sabnzbd.ini

          8. do you have all SABnzbd files in /opt/bin/python ??
            my home dir is /ffp/home/root
            so with this command I got it to work with /ffp/opt/optware/share/SABnzbd/SABnzbd.py -s:8080 -d -f sabnzbd.ini
            it creates lots of files in my root and lots of things doesnt work???

  7. Hello,

    I have some problems:

    root@DNS-320:/mnt/HD/HD_a2/ffp/home/root# /ffp/start/optware.sh start
    mv: cannot rename '/opt': Device or resource busy
        Running: mkdir -p /opt
        Running: mount --bind /ffp/opt/optware /opt

    Can anyone help me?

    Thanks

  8. OK
    I resolved the problem finally….

    rebooted the device after that I could finally delete the /ffp/opt/optware folder and the /opt folder. Than everything went fine

  9. Do I need to add som more lines (PATH) in the fun_plug file to get SABnzbd+ find unzip , unrar and par2 ??

    1. Yes, put this in your fun_plug.local (nano /ffp/etc/fun_plug.local)

      #!/ffp/bin/sh
      PATH=/ffp/sbin:/ffp/bin:/usr/sbin:/sbin:/usr/bin:/bin
       
      # Create symbolic link /mnt/HD_a2 to point to /mnt/HD/HD_a2
      ln -snf /mnt/HD/HD_a2 /mnt/HD_a2
       
      #par2 symbolic links for opt/sabnzbd
      ln -snf /opt/bin/par2 /bin/par2
      ln -snf /opt/bin/unrar /bin/unrar
      ln -snf /opt/bin/unzip /bin/unzip
      1. okej… must be the file called /ffp/etc/fun_plug.init at my device.
        But I cant edit the file because its locked.
        I tried to move the file to windows and edit but cant copy it back..
        How do I edit this file?

  10. okey searchedsome more at google.. vi editor i your friend 🙂
    But its quit hard to handle.. 😐

    @Nasp: thank you very much for your help!! 🙂

  11. @Nasp: do you have a solution for SSL to?
    I havent found any package for this? What do I need to add for this.

    1. I have this:

      / # wget http://wolf-u.li/u/233 -O /ffp/start/optware.sh
      wget: bad address 'wolf-u.li'
      / #
  12. yes, seems dns on my router doing ‘magic’
    after some amount of trys it’s downloaded.
    thank you!

  13. I follow instructions to install optware. I install postfix but i have a problem:

    root@dlink-F93F16:/ffp/home/root# /opt/etc/init.d/S69postfix start
    starting service postfix
    /opt/etc/init.d/S69postfix: line 47: /opt/sbin/postfix: not found
     
    root@dlink-F93F16:/ffp/home/root# ll /opt/sbin/postfix
    -rwxr-xr-x    1 root     root        70180 Apr 26 08:44 /opt/sbin/postfix
     
    root@dlink-F93F16:/ffp/home/root# cd /opt/sbin
     
    root@dlink-F93F16:/opt/sbin# ll postfix*
    -rwxr-xr-x    1 root     root        70180 Apr 26 08:44 postfix
     
    root@dlink-F93F16:/opt/sbin# ./postfix 
    bash: ./postfix: No such file or directory

    Could you help me?

    1. I solved the problem myself.
      I just reinstall optware:

      root@dlink-F93F16:/ffp/home/root# /ffp/start/optware.sh uninstall
      root@dlink-F93F16:/ffp/home/root# chmod +x /ffp/start/optware.sh
      root@dlink-F93F16:/ffp/home/root# /ffp/start/optware.sh start

      have fun !

  14. Hi All,

    I installed optware as described ans all is ok, the script start. I do an install of transmission but how to start it ? I can’t acess via web gui, because it’s not started ? where the program is installed via ipkg ?

    1. Now I have another problem, I can start the daemon via /opt/etc/transmission-daemon but i have an error 443 when i try to web acess transmission. Where can i find the file settings.json ?

      Thanks 😉

    1. I have reproduced this error twice while following this guide for installing opware.

      Both times it was after performing a fresh install of fun_plug.

  15. I’m getting these errors in the log every dns320 boot:

    * /ffp/start/optware.sh ...
        Running: mkdir -p /opt
        Running: mount --bind /ffp/opt/optware /opt
    mv: cannot overwrite directory with non-directory
    mv: cannot overwrite directory with non-directory
    

    I think the script the fix should be applied to optware.sh script.

    This line of code:

    test -e /opt.bak && mv /opt.bak/* /opt && rm -Rf /opt.bak
    

    Should be changed to this:

    test -e /opt.bak && mv /opt.bak/* /opt/ && rm -Rf /opt.bak
    

    (adds slash after “/opt”)

  16. I have installed optware on DNS-321 and I get following error

    @homenet-321:/mnt/HD_a2/ffp/start# /ffp/start/optware.sh stop
    rmdir: ‘/opt’: Device or resource busy
    root@homenet-321:/mnt/HD_a2/ffp/start# /ffp/start/optware.sh start
    mv: cannot rename ‘/opt’: Device or resource busy
    Running: mkdir -p /opt
    Running: mount –bind /ffp/opt/optware /opt

    Any help will be much appreciated.

    Thanks

  17. I’m trying to get Git/Gitosis working on a dlink-323. So I really want to get optware working.

    I’ve read this howto, i’ve also skimmed the comments and tried what some suggest (rm -rf /ffp/opt/optware and other “solutions”) but still have no luck.

    I’ve created a gist of my ssh attempts which might give you more info
    https://gist.github.com/1625490

    Mediaserver isn’t enabled, but i saw an mserver process so I killed it, still no luck.
    Not sure what else to try. Really want to get this done ASAP.

    Cheers,
    Adam

      1. Hi Uli,

        I discovered the issue.
        The DLink-323 repository is commented out by default and the 321, 320, etc are enabled.
        The solution is to edit /ffp/start/optware.sh and edit the feed variables to look like this:

        # Location of optware package
        # DNS-323/CH3SNAS:
        OPTWARE_FEED_NAME=”dns323″
        OPTWARE_FEED=http://ipkg.nslu2-linux.org/feeds/optware/dns323/cross/unstable
        # DNS-320/DNS-321/DNS-325/DNS-343/CH3MNAS/easyStoreNAS:
        #OPTWARE_FEED_NAME=”cs08q1armel”
        #OPTWARE_FEED=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable

        ipkg now works =)

        Thanks for your great howtos / software!

  18. run into problem:
    followed the steps installed fun plug, optware but when try to connect using ssh get messege said permission denied.

  19. Hi. I’ve ran into problem. I’ve installed Fun plug, and Optware followed instruction above on the DNS-325 without any error message, but when i tried to ssh in the NAS, it kept saying permission denied. I could not telnet in any more since i’ve deactivated it using the command chmod -x /ffp/start/telnetd.sh. Is there anyway to login and install pyload on DNS-325? i realy want this feature on the NAS, thanks.

  20. I have had 2 DNS-323 working fine and I installed DNS-325 and cannot access the DNS-323 anymore from that machine. The DNS-323 still can be access from another machine. Any ideas would be helpful.

  21. When installing optware does the /ffp/etc/fun_plug.init file get used?

    I’ve noticed the permissions on /tmp have not been applied as per the chmod 1777 within that file.

    I’ve also added some chmod entries for my.cnf but there don’t seem to be applied either.

    In light of this where do you suggest I make these entries so I don’t have to SSH in and run them manually after a reboot?

    1. sorry disregard my question, I’ve discovered I’m looking at the wrong tmp folder and i’ve set the chmod for opt/etc before the link to opt is made. *facepalm*

  22. This is grand – but does anyone know if there is an implementation of the ‘screen’ tool available anywhere – I’m forever running extended commands which I would normally stick on a screen session to avoid them getting killed via a disconnect…

  23. Hello everyone.
    Sorry for my English.
    I can not install optware.
    In the log says:
    Running: mkdir-p /opt
    Running: mount – bind /ffp/opt/optware/opt
    mv: cannot overwrite directory with non-directory
    mv: cannot overwrite directory with non-directory

    AFP, UPnP, NFS stopped.

    Delete the folder \ffp\opt\optware\. Restarted. He writes the same thing …
    Help please.
    Actually, I only Midnight Commander – to copy from NAS to USBflash.

  24. hi i installed transmission but now i want to add a new folder for downloading torrents because i have added a new hard disc please can someone tell me how to do it,i have very little knowledge of linux.
    thanks

  25. Hi, I have a DNS 320L, and already edit the path on optware.sh to

    # Location of optware package
    # DNS-323/CH3SNAS:
    OPTWARE_FEED_NAME=”dns323″
    OPTWARE_FEED=http://ipkg.nslu2-linux.org/feeds/optware/dns323/cross/unstable
    # DNS-320/DNS-321/DNS-325/DNS-343/CH3MNAS/easyStoreNAS:
    #OPTWARE_FEED_NAME=”cs08q1armel”
    #OPTWARE_FEED=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable

    But I stuck in this error:

    ./opt/share/ipkg/intercept/update-modules
    * Adding default feed “src dns323 http://ipkg.nslu2-linux.org/feeds/optware/dns323/cross/unstable” to /opt/etc/ipkg.conf
    /ffp/start/optware.sh: line 165: /opt/optware/etc/ipkg.conf: No such file or directory
    /ffp/start/optware.sh: line 184: /ffp/etc/profile.d//ffp/etc/profile.d/optware.sh: No such file or directory

    The file and directory exist, but i can not able to install the ipkg package.. Any help?

    1. You need to change the feed to the same as DNS-320…cs08q1armel. Remove all optware stuff and try again. Follow the same path as DNS-320.

      Best Regards,
      Uli

  26. Hello, thanks for the tutorial, I have a question, I would change the management port from 80 to another number, how can I do?

    tks in advance

  27. Thanks for finallly tɑlking about > Installation of Οptware on the D-Link DNS-320, DNS-321,
    DNS-325, DNS-343,DNS-345 and Conceptronic CH3MNAS
    < Loved it!

    Visit my page; blogging websites (LizziĐ”)

  28. Can you help?? UPNP and NFS disabled…

    root@DLink-NAS:~# /ffp/start/optware.sh start
    mv: cannot move `/opt’ to `/opt.bak’: Device or resource busy
    Running: mkdir -p /opt
    Running: mount –bind /ffp/opt/optware /opt

Leave a Reply

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