Ok, thought I'd start off the openWRT HOWTOS :P
Part 1. Flashing the firmware
- Get the openWRT firmware (with modified mount_root) from here
- Get the root2hdd.sh script from here
- Unrar that file to give you the .trx image
- Put your router into flash mode (unplug power, hold down EZ-Setup and plug power back in. Hold down EZ-Setup until ready light stops flashing)
- Check that your computer can ping the router at 192.168.1.1
- Upload the trx image ('tftp -i imagename.trx' in windows or
for linuxCode:tftp 192.168.1.1 tftp>binary tftp>trace tftp>put imagename.trx- Wait 30 seconds, then unplug router and plug back in again
- once the ready light has gone out, telnet to 192.168.1.1.
- Set a password for root
(from now on, you will have to login via ssh instead of telnet)Code:passwd root- do 'fdisk -l' to list the detected hard drives - note the name of the IDE drive device
- do 'fdisk /dev/harddrivename'
- issue the following commands to create a new ext3 partition WARNING - this will erase anything on your drive!
- n, enter, 1, enter, enter, t, enter, 1, enter, 83, enter
- pressing p and enter should show that you now have one partition on the disc of type linux
- press w and enter to write the disk changes, then do 'fdisk -l' again to get the partition name
- copy root2hdd.sh to /tmp using scp (puttyscp.exe for windows I think)
- modify the boot_partition variable to your hard drive device (with the part1 on the end)
- chmod +x /tmp/root2hdd.sh
- /tmp/root2hdd.sh
- as long as this completes successfully, you should now be able to reboot your router
Part 2. Configuring the router
Some extra packages need to be installed to enable full functionality of the router. You can compile them yourself by downloading the openWRT kamikaze source and putting M next to programs you want in the configuration(important ones listed below) - you can now find the ipkgs in a rar file here - kindly hosted by markc.
- Install the important ipkgs - that is, bridge, dnsmasq, iptables, the updated kernel with wifi drivers, kernel module brcm-wl.
- edit dnsmasq.cont as required (you need to set the fields with @@ parameters in them)
- start and stop the firewall to create the /etc/config/firewall file (/etc/init.d/firewall start/stop)
- follow the examples in that firewall file to setup port forwarding as required
- symbolically link /etc/init.d/dnsmasq to /etc/rc.d/S41dnsmasq - so that it runs on startup
- do the same with /etc/init.d/firewall (choose a different number from 41 for conventions sake )
- NOTE: the default layout of firewall will now prevent you connecting to ssh from the WAN side, uncomment the 2 rules in /etc/firewall.user to allow login from WAN-side
- reboot the router to get the new kernel running
- login to the router again and run /sbin/wifi detect > /etc/config/wireless
- edit this wireless file as you see fit to match your requirements (change ssid etc) more info on this here
- This should give you the basic router setup requirements!