Core freezing and resultant compositional convection are likely important drivers for dynamo activity in large terrestrial bodies like the Earth. The solidification of compositional mixtures, such as iron and sulfur, generates mush zones of partial melt at the freezing front, which can eject chemically buoyant or heavy liquid that then drives convection. For smaller bodies such as planetesimals in the asteroid belt, conditions for generating a dynamo are harder to achieve. Nevertheless, evidence for magnetization of achondrite meteorites is abundant, suggesting that many planetesimal cores were somehow magnetized. As such small bodies cool rapidly under low gravity they likely spend much of their evolution with a large poorly compacted partial melt mushy zone. The magneto-hydrodynamic behavior of a deformable partial melt zone can induce magnetism via separation of solid and liquid phases, and conversely magnetism can impose extra forces on the phase separation in the mush zone. To this end, we have developed a new two-phase magneto-hydrodynamic theory for deformable mushes and slurries. The model includes the standard effects of Lorentz forces, and the competition between magnetic field stretching and diffusion. There are additional effects at the liquid pore or solid grain scale, which involve the interaction between phases, akin to Darcy or Stokes drag; these include Lorentz drag, as well as pore/grain-scale diffusive exchange of magnetism between solid and fluid phases, and field stretching due to relative motion between phases. Magnetic induction by gravitational phase separation is most significant after extensive mixing of liquid and solid phases, such as induced by vigorous mechanical stirring due to, for example, tidal and elliptic instabilities, or impacts with other bodies, all of which are conceivably common in the asteroid belt, especially in the early solar system. Gravitational phase separation following such events can induce significant magnetism in the liquid and solid phases, and much more rapidly than can magnetization by large-scale circulation. Magnetic field variances can be at first orders of magnitude larger than an imposed background field, during initial gravitational phase separation of the well-mixed slurry. As the phases separate toward the top or bottom, the solid phase compacts, the separation velocity decreases, and the magnetic field variance likewise diminishes. However, solitary waves in the compacting region can cause an additional large magnetic induction in the liquid, taking the form of strongly magnetized wave packets that can be trapped in the solid. Thus, phase separation, segregation and compaction potentially induce large magnetic field anomalies. A linear stability analysis for convection in a porous medium (with a rigid matrix) is also explored. Pore and grain scale effects, such as field stretching due to phase separation, are found to enhance the influence of the magnetic field on convective instability.