We consider compact minimal surfaces of genus 2 which are homotopic to an embedding. We prove that such surfaces can be constructed from a globally defined family of meromorphic connections by the DPW method. The poles of the meromorphic connections are at the Weierstrass points of the Riemann surface and are at most quadratic. For the existence proof of the DPW potential, we give a characterization of stable extensions of spin bundles S by its dual in terms of an associated element of . We also show that the family of holomorphic structures associated to a minimal surface of genus in S 3 is generically stable.