  The Einstein static (ES) state is a good candidate for describing the very
early universe in terms of a regular cosmological model in which the Big Bang
singularity is avoided. In the present study we propose an ES solution in the
framework of generalized Rastall gravity (GRG), a modified version of original
Rastall theory in which the coupling parameter is allowed to vary with respect
to the spacetime coordinates. Introducing an ansatz for the Rastall parameter,
existence and the corresponding stability of the solutions are investigated. We
show that the GRG is capable of describing a stable singularity-free state for
the universe. The problem of transition from an ES to an inflationary state is
also addressed. We find that a time variation of the equation of state
parameter from values lying in the range |w|<1/3 to the value w=-1/3 can give
rise to such a phase transition. The vector and tensor perturbations around the
ES solution are studied, as well. In the case of GRG, the vector perturbations
remain frozen, nevertheless, the tenor perturbations can grow in such a way
that the ES solution remains stable provided the ratio of Rastall gravitational
constant to the Einsteinian one always exceeds a minimum value for each tensor
mode.
