 After finishing school (in four or five years) he attended, while working in a variety of railroad jobs, the Samara railway technical school, allowing him to become a railway technician after graduation.During the 1905 revolution, when Gerasimov was sixteen and working on the railroad, he got involved in an armed revolutionary detachment (druzhina) of railway workers, and became increasingly involved with the socialist underground.In 1906, he was arrested and imprisoned, but after six months escaped through a tunnel leading to a secret Russian Social Democratic Labour Party apartment.