Old English bolt "short, stout arrow with a heavy head;" also "crossbow for throwing bolts," from Proto-Germanic *bultas (source also of Old Norse bolti, Danish bolt, Dutch bout, German Bolzen), perhaps originally "arrow, missile," and from PIE *bheld- "to knock, strike" (source also of Lithuanian beldžiu "I knock," baldas "pole for striking").
Applied since Middle English to other short metal rods (especially those with knobbed ends): meanings "stout pin for fastening objects together" and "part of a lock which springs out" are both from c. 1400. A bolt of canvas (c. 1400) was so called for its shape. Adverbial phrase bolt upright (like a bolt or arrow) is from late 14c. Meaning "sliding metal rod that thrusts the cartridge into the chamber of a firearm" is from 1859. From the notion of an arrow's flight comes the bolt of lightning (1530s) and the sense of "a sudden spring or start" (1540s).
"bar or bolt used to fasten a door, window, etc.," c. 1300, from Middle Dutch or Middle Low German slot (compare Old Norse slot, Old High German sloz, German Schloss "bolt, bar, lock, castle;" Old Saxon slutil "key," Dutch slot "a bolt, lock, castle"), from Proto-Germanic stem *slut- "to close" (source also of Old Frisian sluta, Dutch sluiten, Old High German sliozan, German schliessen "to shut, close, bolt, lock"), from PIE root *klau- "hook," also "peg, nail, pin," all things used as locks or bolts in primitive structures.
"wedge-shaped piece or bolt which fits into a hole used in fastening or tightening," 1640s, of uncertain origin; perhaps a shortened form of cotterel, a dialectal word for "cotter pin or bolt, bracket to hang a pot over a fire" (1560s), itself of uncertain origin. Cotter-pin is attested by 1849.
"short, heavy, square-headed, four-edged bolt or arrow for a crossbow," mid-13c., from Old French quarel, carrel "bolt, arrow," from Vulgar Latin *quadrellus, diminutive of Late Latin quadrus (adj.) "square," related to quattuor "four" (from PIE root *kwetwer- "four"). Now-archaic sense of "square or diamond-shaped plane of glass" is recorded from mid-15c., from Medieval Latin quadrellus "a square tile."