In situ formation process and mechanism of bulk MgB_2 before Mg melting