

: OK, you have told us what NOT TO DO, now please tell us what TO DO! Let us take the most usual case where someone has installed a bad image on their router. To recover from this situation you need either the original NVRAM contents, or a version of CFE with the correct defaults. This is why we have the warnings not to wipe NVRAM. In some cases however, the defaults embedded defaults (in the CFE shipped with the device) don't match the actual hardware and CFE will fail to boot. This means that in most cases you can just wipe everything but CFE and it'll happily boot, recreate NVRAM and start waiting for a firmware via TFTP. Second mistake - embedded within CFE is a set of NVRAM defaults to be used if the NVRAM partition is missing. You should always try to use the CFE version that came with the device rather than attempting to replace it with some random CFE you found on the internet. The biggest mistake people seem to make with JTAG is the “wipe everything and reflash bootloader” ( CFE for broadcom devices) approach they either can't find the correct CFE version after wiping the device, or they reflash with a CFE which is incompatible with their device. While the JTAG can technically be used to watch every instruction and register as the system boots, the recovery software only uses it for DMA access to the flash chip, making it somewhat a blind recovery mechanism. It's one of those amazingly useful things that allows you to recover from pretty much anything that doesn't involve a hardware failure.
