The ground wire goes to the battery luckily the solution is simple. Having worked in automotive electrical some years ago my recommendation is to not hook anything to the battery except the battery cable s.

Diy Subwoofer And Amplifier Installation Nissan Forum
Grounding amp to battery. Then run a single ground to the best source of ground the negative terminal on your cars battery. Positive can go to battery but best to follow manufacturer on location. Usually 8ga or 4ga the reason you keep the ground lines short is to avoid introduction of noise from other sources. If your new radio comes with a fuse on the ground cut it off so as to only fuse the positive lead. The problem arises when you loose the bond between the frame and body battery is grounded to the frame or block you have a difference in potential between grounds think resistance. The best way to ground your car stereo components is to run a 10 or 12 gauge wire from the amp and 12 gauge from all other components such as head unit and active crossovers to a central location.
You always ground to body of the vehicle. Hook the amp to the chassis and make sure there are good conductors that tie the chassis and the engine block together. Never ever connect your radio or amp directly to the vehicle battery. Use less than a 24 run of ground cable if possible and use the same gauge cable as you need for the power line from the battery or distribution block. Btw this debate will likely never die on car audio forums. Thanks for the response.
All boats will have a primary battery for ignitiion and critical electronics and a second battery for everything else that needs power. Thats how ya get the best ground point for an amplifier. Ground loops are caused by bonding your radio to the neg side of the battery when the battery is up front and your amp to the body in the trunk. You run both wires directly to the battery. Well to the secondary battery that is.