We present an automated scheme to systematically sample energy landscapes of crystalline solids, based on the ideas of metadynamics and evolutionary algorithms. Phase transitions are driven by the evolution of the order parameter (in this case, 6-dimensional cell vectors) and aided by atomic displacements corresponding to both zero and non-zero wave vectors, enabling cell size to spontaneously change during simulation. Our technique can be used for efficient prediction of stable crystal structures, and is particularly powerful for mining numerous low-energy configurations and phase transition pathways. By applying this method to boron, we find numerous energetically competitive configurations, based on various packings of B12 icosahedra. We also observed a low-energy metastable structure of Si(T32) which is likely to be a product of decompression on Si-II. T32 is calculated to have a quasidirect band gap of 1.28 eV, making it promising for photovoltaic applications.