Yes indeed. Apparently some of the carbon will come along with hydrogen as methane when you bake it out of the rock. Separating straight to carbon and hydrogen is a hassle, though, as the carbon clogs the catalyst.

Perhaps crashing a carbonaceous asteroid into the moon or disassembling in orbit and landing the results may work?