Geared steam locomotive
This gearing is part of the machinery within the locomotive and should not be confused with the pinion that propels a rack locomotive along the rack between the rails. The geared steam locomotives that have been built have been for conventional track, relying on the adhesion between wheels and rail.
Rack railway
Originally almost all cog railways were powered by steam locomotives. The steam locomotive needs to be extensively modified to work effectively in this environment. Unlike a Diesel locomotive or electric locomotive, the steam locomotive only works when its powerplant (the boiler, in this case) is fairly level. The locomotive boiler requires water to cover the boiler tubes and firebox sheets at all times, particularly the crown sheet, the metal top of the firebox. If this is not covered with water, the heat of the fire will soften it enough to give way under the boiler pressure, leading to a catastrophic failure.