Modify Startup Script on Iomega/Lenovo ix4-300d NAS

We want our installed applications to be started whenever we start or restart our NAS without having to login with ssh and start the service manually. This can be done by creating a “Startup” script and telling your NAS to execute it every boot/reboot. Then we can add as many services as we want.

!!! Doing this will void your warranty !!!
!!! Do this on your own risk, this may break your NAS !!!

Creating a Startup Script
Add code for and older
Add code for and up
Adding Startup Services
Startup Script Example

22 thoughts on “Modify Startup Script on Iomega/Lenovo ix4-300d NAS

  1. Hi,
    I followed the instructions and it went well until I wanted to change the startup file, there is no “nano” folder
    I have an X2 instead of a X4.

    grt, Guido verholen(Belgium)

    • “nano” is the program that allows you to edit text files, you can change every “nano” by “vi” or “vim”, these are text editors but are a bit different:
      -to insert text => type i then type your text
      -to save => ESC -> :wq -> enter

      you can also try to install “nano” by using one of the following lines:
      – /opt/bin/ipkg install nano
      – apt-get install nano

      always double check your files before restarting, wrong code can break your Nas!!

  2. Hi Steven

    I was attempting to do this and when I went to say I noticed the filename was sohoprocs.xml so I decided to not save my changes.

    Running /opt/, the file is now empty… Have I totally screwed something up?

    • root@NAS:/# /opt/ << First time open, CTRL+X, N to save changes
      root@NAS:/# /opt/ << Empty File Now?
      mkdir: cannot create directory `/tmp/apps': File exists
      mount: could not find any free loop device
      umount: /tmp/apps: not mounted

      • The should not be empty after execution, this file should be executed after every update to restore your servers. I would recommend removing your files and try this guide again, i found a small fault in the guide… this may be the problem.

        • Sorry, the isn’t empty, but the sohoProcs file that it generates doesn’t populate with any values since running it that first time. It’s blank when I run /opt/ for some reason

          • sounds like the editconfig has a wrong path or filename and created a new file, paths and filenames are case sensitive… did you copy-paste the file or just typed it? check if your editconfig is the same as mine.

          • I copy pasted everything listed above.

            Thought I’d try and start over so I deleted the and the, and also removed /tmp/apps


            root@NAS:/opt# rm
            root@NAS:/opt# rm
            root@NAS:/opt# cd ..
            root@NAS:/# nano /opt/
            root@NAS:/# chmod +x /opt/
            root@NAS:/# nano /opt/
            root@NAS:/# chmod +x /opt/
            root@NAS:/# /opt/
            mount: could not find any free loop device
            umount: /tmp/apps: not mounted
            root@NAS:/# /opt/
            mkdir: cannot create directory `/tmp/apps’: File exists
            mount: could not find any free loop device
            umount: /tmp/apps: not mounted

            I should’ve just saved the file the first time it generated 🙁

  3. Looks like my programs aren’t starting up after reboot. I can start them myself.

    rm /opt/init-opt.log
    echo “Last bootup:” >> /opt/init-opt.log
    date >> /opt/init-opt.log
    echo “Wait one minute, so that the storage pool
    is mounted” >> /opt/init-opt.log
    sleep 1m
    # Services after this line
    /opt/bin/python2.6 /mnt/pools/A/A0/Downloads/.apps/sabnzbd/ –server $
    echo “SABnzbd Started” >> /opt/init-opt.log
    /opt/bin/python2.6 /mnt/pools/A/A0/Downloads/.apps/CouchPotatoServer/CouchPotat$
    echo “Couchpotato Started” >> /opt/init-opt.log
    /opt/bin/python2.6 /mnt/pools/A/A0/Downloads/.apps/Sick-Beard/ –da$
    echo “Sickbeard Started” >> /opt/init-opt.log
    # Services before this line
    sleep 360d

    • is the script executed? check if there is a “init-opt.log” file, also did you do the chmod +x (add execute rights)? you can try “chmod 777 /opt/”. also are you logged in as root?

      • I think so. Following guide. I just keep having issues. Not sure why because first time I did this wasn’t near as hard.

  4. In the last firmware update (4.x) I think it is LEVEL 2 where you have to add

  5. I have PX-300D running version When I run /etc/ and modify the XML under Group Level 1, paste the new program …i am unable to save the sohoProcs.xml doing CTRL+O -> Enter. i get the following message: “Error writing /tmp/apps/usr/local/cfg/sohoProcs.xml: Read-only file system” .

  6. Hello, I think I bricked It. I followed the instructions above (copy and pasted.) I cannot access the nas any more–web access, share or ssh. I rebooted the nas, it goest through disk configuration, displays the ip address and time. I tried to press the arrow keys but it doesn’t switch displays. When I try to access the webgui, it stuck at “processing” and the nas display goes blank. The firmware is

    Please, is there a way to revert back or re-image the firmware?
    Thank you!

    • I managed to ssh into the nas while it was booting. While having the xml file opened in nano, I somehow prevented something to execute and the box booted fine. I reverted the changes and reboot. NAS is back to normal now.

  7. Hi Steven! After modifications of the startup script my IX4-300d NAS hangs on 75% load. Only ping, no shares, no web or ssh access. Is it possible reset to factory defaults any way?

  8. I am trying to run this on PX6-300d.

    I login with root user, download scripts, its ok.
    When I run, I could not write config, and then run step by step to check.

    I get “mount: warning: /tmp/apps seems to mounted read-only”.

    Whats is wrong?

    May be its not compatible with px6-300d?



Leave a Reply