Install DD-WRT On a Linux PC

By: Eric Geier
Thursday, October 15, 2009 03:15:52 PM EST
URL: http://www.linuxplanet.com/linuxplanet/tutorials/6873/1/

Taking Advantage of the DD-WRT x86 Port

Last month, we described how to install the wireless router firmware, DD-WRT, onto a regular PC. The X86 port would give you the ability to run the replacement firmware on systems other than router boards running a meager 16MB of RAM and a sluggish CPU. Plus you don't have to track down a supported router. You can use one of your old PCs that are gathering dust.

In the previous tutorial, we used Windows-based tools to install DD-WRT X86. However, if you're using an old hard drive to install it, you might not have Windows installed. If that's the case, you would have to slap the drive into another computer running Windows while you do the install, and then you would have to put it back into the old machine. But there are other ways to go about doing this.

You could, for instance, use Windows PE or BartPE by booting it up and running the physdiskwrite utility, such as we discussed already. However, you don't have to use Windows at all. Another way is to use Linux, which is the method we're going to discuss in this tutorial.

Similar to the Windows method, we'll download the drive image file and burn it to a hard drive. This wipes the drive clean and puts the DD-WRT partitions and file system on it.

Putting the machine together

Like with the Windows method, make sure you have an X86 compatible PC, i386 or greater, which is just about any old PC. The computer must have a hard drive that can be reformatted and repartitioned, which means you need to backup or transfer any important files. You also need at least two network (Ethernet) cards, one for the Internet and the other for the LAN.

Only 16MB of RAM is required, so pretty much any old stick of memory will do. Though a monitor and keyboard aren't required, it's a good idea to have them around in case you have problems and need to access the console.

Optionally, download the DD-WRT image to a flash drive or CD

If you have a thumb drive or CD lying around, you can download the X86 version of DD-WRT ahead of time. Then when you need the disk image in Linux, you can just pop in the drive or CD, instead of having to set up a network connection.

At the time of this writing, the most current release of DD-WRT is version 24 with Service Pack 1. If you're going the free route, download dd-wrt_public_vga.image, or if you're purchasing a license, download dd-wrt_full_vga.image.

Download, burn, and boot Linux

You need to download and burn a Linux distribution that runs in a live CD mode. You can use Ubuntu. It can be loaded directly from the CD without being installed.

When you're ready to get started, insert the Linux disc into the drive of the computer designated for DD-WRT and restart to boot from the CD. If you're using Ubuntu, hit Enter to select the first option, Try Ubuntu without any change to your computer.

Get Prepared for the Burn

After you boot into Ubuntu, make sure you have the DD-WRT image file accessible. If you had put it onto a flash drive, CD, or other removable storage, insert that now. Otherwise, connect to a network so you can get on the Internet to download the image file. If needed, use the download links above.

Take a moment and identify the path to the image file; you'll need to enter this later as part of a command. If you downloaded it in Ubuntu, it may be on your desktop; for example, /home/your_username/Desktop/dd-wrt_full_vga.image. If it's on a flash drive or CD, you can browse to it and copy the path from the Location field.

You should also figure out the path to the drive you're going to write the image file to and use for DD-WRT. In Ubuntu, click System > Administration > System Monitor. Then click the File Systems tab. Reviewing the specs for these file systems may help you identify the right one. You want to use the path displayed in the Device column.

Performing the burn

When you're finally ready to wipe the drive clean and write the image to it, follow these simple steps:

1. We're going to use a Linux command-line utility, so open the console. In Ubuntu, click Applications > Accessories > Terminal.

2. Enter the Super User mode. In Ubuntu, type sudo su and enter your root password.

3. Type dd if=path_to_dd-wrt_image of=path_to_drive. Make sure you input the correct path to the image file and the drive. You should have already figured these out in the previous section.

We did it

That's it; you're done. Eject the CD and reboot. It should boot into DD-WRT.

Plug the Internet into the ether0 interface, which is usually the built-in or on-board Ethernet port, if any. Then the remaining interface(s) are for the LAN. You can connect them to computers or to a switch.

The default IP address is of the router is 192.168.1.1. Since the DHCP server is enabled, users will automatically receive an IP. To access the Web GUI, type the IP of the router into a browser on a computer connected to the LAN. To access the console on the machine, hit Enter. The default username is root and the password is admin.

Discover what you can do with DD-WRT

With the help of Linux, you should now have DD-WRT running on a computer. Take a look at all the tutorials we have on the subject. Maybe extend your range with WDS, build a wireless bridge, use multiple SSIDs, and much more.

Eric Geier is the author of many networking and computing books, including Home Networking All-in-One Desk Reference For Dummies (Wiley 2008) and 100 Things You Need to Know about Microsoft® Windows Vista (Que 2007).

Article courtesy of Wi-Fi Planet

Copyright Jupitermedia Corp. All Rights Reserved.