Using a weak limit for the hopping integral in one direction in the Hofstadter model, we show that the fermion states in the gaps of the spectrum are determined within the Kitaev chain. The proposed approach allows us to study the behavior of Chern insulators (CI) in different classes of symmetry. We consider the Hofstadter model on the square and honeycomb lattices in the case of rational and irrational magnetic fluxes $phi$, and discuss the behavior of the Hall conductance at a weak magnetic field in a sample of finite size. We show that in the semiclassical limit at the center of the fermion spectrum, the Bloch states of fermions turn into chiral Majorana fermion liquid when the magnetic scale $ frac{1}{ phi} $ is equal to the sample size N. We are talking about the dielectric-metal phase transition, which is determined by the behavior of the Landau levels in 2D fermion systems in a transverse magnetic field. When a magnetic scale, which determines the wave function of fermions, exceeds the size of the sample, a jump in the longitudinal conductance occurs. The wave function describes non-localized states of fermions, the sample becomes a conductor, the system changes from the dielectric state to the metallic one. It is shown, that at $1/phi>$N the quantum Hall effect and the Landau levels are not realized, which makes possibility to study the behavior of CI in irrational magnetic fluxes.