Setting up debian environment on DNS-323

There are various ways to get 3rd party applications running on the DNS-323. One of it is to compile the program into binaries suited for DNS-323 environment and run it. The other way would be setting up a debian environment on the DNS-323. This type you can compile sources on your own and run on the debian. Kind of kind another Operating System within the DNS-323’s Operating System. No matter which way you choose to go, you would require telnet access, so check out the entry on enabling telnet access on DNS-323.

In this entry we are going the debian way. More advanced users can choose to compile their own images of debian for use on DNS-323. Users like me would pretty much prefer precompiled images that are available to the public.

There are 2 available images:
Debian Sarge 3.1 (83MB) and Debian Edge 4.0 (169MB). Personally I am using the latter so I will be writing this entry in etch flavor.

1. Telnet access to DNS-323
2. Internet connectivity for DNS-323

Step 1
Download Debian Edge 4.0 (169MB) to your DNS-323’s Volume_1 share. What I meant by downloading to the share is that you download it to the network drive. So it should look like


Step 2
Telnet into your DNS-323 and you should be greeted by a command prompt (if you have followed the telnet guide correctly). Next issue the following commands.

# cd /mnt/HD_a2
# ./lnx_bin/busybox3 tar -xf etch.tar

It will take some time for archive to unpack. When the command prompt is back to you. Issue the following command to trigger the Debian environment

# ./lnx_bin/busybox3 chroot etch

You should be in a new shell in the Debian root with the following prompt


Step 3
Update your /etc/resolv.conf so that it can resolve hostnames! You can edit the file using the vi command or simply use the command (echo “nameserver” >> /etc/resolv.conf). We will be using opendns in this example. My /etc/resolv.conf now looks like this


Step 4
You would need to update the packages. So type in the following commands.

sh-3.1# apt-get update
sh-3.1# apt-get dist-upgrade

You should be greeting by a long list of of updates. Let it run while you go for a short coffee break.

Step 5
Secure your new environment by setting a password for root.

sh-3.1# passwd root

Step 6
Installing of various packages so that you can compile sources.

sh-3.1# apt-get install gcc
sh-3.1# apt-get install make
sh-3.1# apt-get install unzip
sh-3.1# apt-get install flex bison
sh-3.1# apt-get install g++
sh-3.1# apt-get install gawk

Your Debian should be fully set up by now. Everytime you wish to access it, you would need to first telnet into your DNS-323 after which you would chroot etch. If you wish to auto start Debian then you would need to edit your fun_plug file. Have fun.


Treat shadowandy!

If these step-by-step guides have been very helpful to you and saved you a lot of time, please consider treating shadowandy to a cup of Starbucks.  

9 thoughts on “Setting up debian environment on DNS-323

  • August 21, 2007 at 6:50 pm


    I’m following this tutorial and encountered problems with step 4. After second line, when it finishes downloading and starts to execute, it throws this:

    dpkg: ldconfig' not found on PATH.
    start-stop-daemon’ not found on PATH.

    I’m using Edge downloaded image, PATH is:

    sh-3.1# echo $PATH

    Any ideas?

  • February 24, 2008 at 8:52 am

    Thanks for the tut!

    How can I do this if I did telnet using fonz’s funplug way?


  • February 27, 2008 at 10:11 pm

    i am trying to setup debian but i always get the following response:

    sh-3.1# apt-get update
    Err etch Release.gpg
    Temporary failure resolving ‘’
    Failed to fetch Temporar
    y failure resolving ‘’
    Reading package lists… Done
    E: Some index files failed to download, they have been ignored, or old ones used

    what gives?

  • February 28, 2008 at 4:04 pm


    From what I see, you have chroot into debian. You need to add nameserver into your /etc/resolv.conf for it to resolve hostnames

  • February 28, 2008 at 5:49 pm

    Hey shadowandy, can you tell me how to chroot into debian with fonz’s funplug please?


  • March 1, 2008 at 3:36 pm


    Just chroot /bin/bash . For example, chroot etch /bin/bash

  • March 8, 2008 at 2:20 pm

    Need help……when I am at step2, it will prompt me:

    tar: Invalid tar magic

    where did I go wrong?

  • March 9, 2008 at 6:14 pm


    if you are running fonz’s fun_plug, just issue the command tar xf etch.tar

  • March 15, 2008 at 8:53 pm

    hi shadowandy,
    just a question here, if i have installed debian and telnet and my nas-323 firmware is 1.0.4, in future when there is an official firmware from dlink,will the firmware removed the debian installation ? or can i update the firmware in future ? thanks! ben

Comments are closed.