Formation of the lower ionosphere