It really boils down to a few basic issues.
1. You have a trashy output from the alternator, could be due to loose/dirty/poor connection(s) or an internal problem with the alternator diode bridge.
2. Your head unit had very poor DC input filtering and/or is connected in such a way there is a bad ground, a ground loop or in some way it is sensitive to picking up and amplifying alternator ripple.
3. Your interconnects between the head unit and the main amp have bad shielding, bad grounding or somehow is causing a ground loop.
You may need to isolate your head unit, you may need to remove it from the dash and make sure the metal chassis is not touching anything.
You could temporarily connect the head unit in the trunk at the main amp and connect it to the same power connection as the main amp. This should cure you temporarily from any noise. The slowly work the head unit back to the front of the car, possibly even powering the head until from the same connection as the primary amp.
Again, ground loops are likely the issue, however, without hearing how bad the noise is, it may be actually be a bad diode in the alternator putting out too much AC Voltage??