If you have purchased a router that came pre-installed with DD-Wrt firmware, you are now officially an owner of a very capable Linux device. Chances are that you would be quite happy with the default setup. Web User Interface is pretty well organised and offers all of the basic features typically used by the non-technical crowd. For those of you that did not find everything you need in the WebUI, you will have to be courageous enough to venture into the land of CLI. Next, I will try to describe how I went about extending the functionality of my DD-Wrt based router.
All DD-Wrt v24 routers come pre-installed with ipkg package manager. It is the most primitive package manager you will ever see. Nothing compared to apt or yum, but we can make it work with some minor tweaking. Without changing anything, telnetting into the router and running ipkg update on the command line would fail with a nasty error about the "Read-only file system". That is because all of the NAND flash is not writeable by default. One option is to enable JFFS under Administration -> Management -> JFFS2 Support. Doing that is not recommended because flash memory wears out very fast in less than 100K write ops. The instructions provided below will show you the alternative approach of using the external USB flash drive for new software installations.
/opt and click Apply. Now insert the USB stick into the router USB port and verify that it is mounted by refreshing Services-> USB page.ping google.com, and df -h and looking for /dev/sdaX mounted under /opt.cp -a /usr/ /opt/ & cp -a /bin/ /opt/mkdir -p /opt/jffs/tmp/ipkgmount /opt/jffs /jffs & mount /opt/usr /usr & mount /opt/bin /bincp /bin/ipkg /bin/ipkg.orig && cat /bin/ipkg.orig |sed -e "s/--passive-ftp //" > /bin/ipkgipkg update && ipkg list. It should download and list all available packages from OpenWRT repositories. Do ipkg install appname to install anything you like.
sleep 10
mount /opt/jffs /jffs
mount /opt/usr /usr
mount /opt/bin /binWhile the default DD-Wrt features are reasonable enough for an average home network installation, it lacks a lot of configuration features and third party Optware applications available under the most basic flavour of OpenWRT router firmware. The default installation of DD-Wrt seemed very crippled without the ability to add/remove applications and manage running processes and services. Even after enabling ipkg, you are still stuck with the apps compiled for OpenWRT Whiterussian back in 2005-2007. OpenWRT currently offers more than twice as many apps in its latest Backfire distribution repositories.
Back to main index