"DD-WRT":http://www.dd-wrt.com/wiki/index.php/WRT54G_v4_Installation_Tutorial has a great tutorial for the somewhat tricky installation with V23 and above. You have to install the mini version first which is called mini_generic.bin then you reset and you upgrade to DD-WRT standard and again use generic.bin
You only want to use generic.bin by the way when using the web user interface which is the normal way. If you use TFTP then you have to use the specific versions.
In terms of recovery, there are two different set of instructions on the web. Linksys used to have a dedicated utility, but now you just use tftp built into Windows XP. YOu basically run the tftp command as the router is booting and it should take using the "TFTP":http://www.dd-wrt.com/wiki/index.php/Installation#Flashing_with_TFTP instructions on the DD-WRT wiki.
There is amazing "feature list":http://www.dd-wrt.com/wiki/index.php/What_is_%22DD-WRT%22%3F#Feature_List includes things like Client Mode, Afterburner that are too numerous to understand, although the "HOW TO":http://www.dd-wrt.com/wiki/index.php/Configuration_HOWTOs#HOWTOs_for_basic_configuration_scenarios list is really useful:
* "Afterburner":http://www.dd-wrt.com/wiki/index.php/Afterburner you should only use this is you have the special client cards from Linksys that enable this kind of optimization or if you have a notebook with a Broadcom chipset. Look in the Wireless LAN Card setup and see if there is a property in Advanced Tab called Afterburner. "Hyperwrt":http://www.hyperwrt.org/forum/viewtopic.php?pid=5228 has more information on this which has lots of trade names include Afterburner, Speedbooster, SuperSpeed, 125mbps, Gplu and G+