Setting up debian environment on DNS-323 (9)


    May 23rd, 2007 | Tags: ,

    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.

    Pre-requisites
    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

    \\DNS-323\Volume_1\etch.tar

    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

    sh-3.1#

    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 208.67.222.222″ >> /etc/resolv.conf). We will be using opendns in this example. My /etc/resolv.conf now looks like this

    nameserver 208.67.222.222

    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.





    9 responses

    1. Hi

      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.
      dpkg: `start-stop-daemon’ not found on PATH.

      I’m using Edge downloaded image, PATH is:

      sh-3.1# echo $PATH
      /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/bin

      Any ideas?

       
    2. Thanks for the tut!

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

      Thanks

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

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

      what gives?

       
    4. xhaos,

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

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

      Thanks

       
    6. Chad,

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

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

      tar: Invalid tar magic

      where did I go wrong?

       
    8. jere,

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

       
    9. 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

       

    RSS Feeds




    Treat shadowandy!


    Like to treat shadowandy a cup of Starbucks?

    Recent Comments



    Friend's Blog



    Interesting Links



    Previous Postings



    Copyright © 2005 - 2010 www.shadowandy.net  110 queries. 1.266 seconds.Go back up ↑