We show that the G2 holonomy equation on a manifold with boundary, with prescribed 3-form on the boundary, is elliptic. The main point is to set up a suitable linear elliptic boundary value problem. This result leads to a deformation theory. In particular we establish the existence of certain G2 cobordisms between two small deformations of a Calabi-Yau 3-fold.