Gallium nitride is grown by plasma-assisted molecular-beam epitaxy on (111) and (001) silicon substrates using sputter-deposited hafnium nitride buffer layers. Wurtzite GaN epitaxial layers are obtained on both the (111) and (001) HfN/Si surfaces, with crack-free thickness up to 1.2 (mu)m. Initial results for GaN grown on the (111) surface show a photoluminescence peak width of 17 meV at 11 K, and an asymmetric x-ray rocking curve width of 20 arcmin. Wurtzite GaN on HfN/Si(001) shows reduced structural quality and peculiar low-temperature luminescence features. However, growth on the (001) surface results in nearly stress-free films, suggesting that much thicker crack-free layers could be obtained.