What do you mean by "when firmware is being installed"?
What command are you running? It should be something like:
If you try to download a file which is not a leJOS NXJ binary file, you will get a data abort. After a data abort, you will need to remove a battery or wait for the NXT to switch itself off.