The Ultimate DNS-323 Setup: Part 2 – Debian Installation
By the end of this guide you will have
-A fully stable and remotely operable BitTorrent client on your DNS-323. I will show you how to setup 1) A remote web interface and 2) A Windows desktop application that is very similar to uTorrent that can remotely control and monitor your torrents.
-Have your DNS323 download torrent files for you with a single click and without using anything but the Firefox web browser.
-Have your DNS323 automatically extract RAR archives after they are downloaded.
-Store and maintain your torrent downloads on the DNS 323.
-Stream videos and movies from you DNS 323 to your Xbox 360 or Playstation 3 (or similarly compatible device).
Introduction:
This guide will walk you through the steps to turn you Dlink DNS 323 into a fully functional Linux server with the capability to download Torrents extremely easily (using the Transmission BitTorrent Client), remotely administer those torrents via a web interface (Transmissions built in Clutch interface) and a uTorrent like desktop app for Windows (Transmission Remote .NET).
Required Skills and Software
-Set your home router to assign your DNS-323 a static IP
-Basic Linux command line skills
-SSH client (Putty on Windows or OSX comes with one, available from iTerm)
Debian Linux
To run an advanced setup like this, you must install Debian Linux on your DNS-323. Debian is a full operating system that will run in a self contained environment. It will note replace or overwrite anything from Dlink and you may remove it at anytime. You will still be able to access the Dlink web interface just as before.
The Debian installation takes 5-10 minutes as there is a fun-plug package that automates all of the work for you. Debian is installed in a chroot environment which means it is completely separated from the rest of the DNS-323 software.
For Fonz’s Fun Plug Users Only (If you are using an unmodified DNS-323 skip to the next step)
If you (like I was originally) are currently running Fonz’s Fun Plug you will first have to remove it before you can install Debian. Fonz’s Fun Plug is a nice system but is not as powerful or as up to date as a full Debian Linux system.
To remove Fonz’s Fun Plug, delete the funplug directory in /mnt/HD_a2/fun_plug. It is possible it can be done via Windows Explorer (or whatever) if you changed its permissions/owner, otherwise do it from the command line. I will assume you know how to do it as you install it in the first palce.
(Please be careful using rm -rf, you can destroy a Linux system with one wrong delete)
rm -rf /mnt/HD_a2/fun_plug
chmod -R 777 /mnt/HD_a2/ffp
rm -rf /mnt/HD_a2/Nas_prog
Reboot the DNS-323 and delete the /mnt/HD_a2/ffp directory.
Debian Installation
You are now ready to install Debian. This is very simple using the Debnas Fun Plug package. Fun Plug is a mechanism that comes with the DNS-323 that allows users to boot custom scripts. This allows us to boot to a chrooted operating system so easily. You can find the DNS-323 Debian Installer at http://sourceforge.net/projects/debnas/. At the time of this writing 0.5 is the latest version. Version 0.5 installs an older version of Debian which is unfortunate but Debian itself provides a way to easily update itself to the latest version available.
Download and extract the Debian Installer package to Volume_1 of the DNS-323. SSH to the DNS-323 an extract the DebNas package (tar -jxvf debnas-0.5.tar.bz2 or by using 7-zip from Windows Explorer). There should now be linux.tar and the fun_plug file in the Volume directory now.
Reboot the DNS-323 and Debian will install automatically. Installation will take several minutes. SSH will become enabled when the device eventually boots. Be patient, the DNS-323 is roughly the equivalent to a 10 year old computer. As awesome as it is, it’s slow as hell. SSH to the 323. The default login credentials are:
Username: root
Password: 12345678
Root is the equivalent of Administrator on other types of systems. You can do a lot of damage using the root account if you don’t know what you’re doing. Create a new unprivileged account and change the root password. You can add a new user by using the useradd command. Don’t forget to change the root password with the passwd command. You can find a pretty good command line tutorial here http://www.ee.surrey.ac.uk/Teaching/Unix/.
Upgrade Debian
Now you have a full Linux environment on the DNS-323 with all of Debian’s software packages at your disposal. Most Linux systems have a software manager that allows you to easily install common software. Debians system is among the best.
The first step is to upgrade to Debian Lenny, a more recent stable version of the operating system. As root, edit /etc/apt/sources.list.d/etch.list, replacing the word etch with lenny. I also changed the mirror url to a North American mirror rather than the German one by removing the de. in the url. You may also rename the filename from etch.list to lenny.list if you feel so inclined.
Now we need to update the repository packages listing and upgrade to lenny. You may have GPG issues which you can resolve by following the guide here :
apt-get update
apt-get dist-upgrade
This will take a while to download and then upgrade. When it is done reboot Debian. I had to reboot using the command ‘reboot -f’. When Debian comes back up, it will be running Lenny. When it comes back up, update to make sure everything is current.
apt-get update
apt-get upgrade
This will likely take a very long time and require some interaction. It is a good idea to reboot the system (although likely unnecessary) after a system wide upgrade. Type reboot from the command line.
Installing New Software
As mentioned previously, Debian has a fantastic software manager. Most of the software you need can be installed automatically for you. The only downside to this is often, software you like and use often is not updated to the latest version. The only thing we will install manually however is our BitTorrent client.
To install a software package use the following command. You may find many tutorials on the internet about using apt-get.
apt-get install <package name>
The apt-get system supports dependencies as many Linux programs require other programs to operate properly. Apt-get has a dependency system and should resolve and install all the required packages for you.
List of Packages to install
As root:
apt-get install automake
apt-get install build-essential
apt-get install sudo
apt-get install wget
These will install the tools we need to be able to install the latest versions of Transmission, straight from the developers website.
I would also suggest intstalling the Network Time Daemon. It will keep the time on you DNS-323 in sync with servers on the internet. For some reason the time on my DNS-323 always gets reset or is wrong without it.
apt-get install ntp
/etc/init.d/ntpd start
(It has been a year since I installed my original DNS-323 system. I cannot remember the exact packages I installed to get everything to operate. If I am missing something essential from the list please comment below and I will add it. Thanks.)
Pingback: D-Link All-in-One Mobile Companion (DIR-505) | TheBestRouter.net