  Entangled resources enable quantum sensing that achieves Heisenberg scaling,
a quadratic improvement on the standard quantum limit, but preparing large
scale entangled states is challenging in the presence of decoherence. We
present a quantum control strategy using highly nonlinear geometric phase gates
for preparing entangled states on spin ensembles which can be used for
practical precision metrology. The method uses a dispersive coupling of $N$
spins to a common bosonic mode and does not require addressability, special
detunings, or interactions between the spins. Using a control sequence that
executes Grover's algorithm on a subspace of permutationally symmetric states,
a target entangled resource state can be prepared using $O(N^{5/4})$ geometric
phase gates. The geometrically closed path of the control operations ensures
the gates are insensitive to the initial state of the mode and the sequence has
built-in dynamical decoupling providing resilience to dephasing errors.
