The article presents the results of identification and quantitative analysis of the phase composition, fine structure parameters of minerals in carbonate and terrigenous rocks by the use of modern X-ray diffraction (XRD) analysis. To make the XRD analysis, we optimized the modes of x-ray pattern shooting by changing the radius of the goniometer, the system of primary and secondary slits, Soller slits, and the system of detecting the low-content minerals. In processing the obtained x-ray patterns, we considered the size and defects of the crystal grains, the crystallographic mode of arrangements, atomic population of the crystal lattice, the Debye-Waller factor and the instrumental line broadening by the use of the Caliotti function for LaB6. So we determined the type and content of minerals, estimated the period of the crystal lattice, the size of the coherent scattering domains and micro-distortion crystal lattice of the mineral. We compared the obtained data on the presence and quantitative content of minerals with the data of X-ray fluorescence (XRF) analysis and scanning electron microscopy (SEM). Based on the obtained data, reference intensity ratio (RIR) coefficients were selected for a number of minerals typically contained in core materials for quantitative phase analysis by the use of the corundum number method.