Sensing of magnetic fields by living organisms -- magnetosensing -- is best understood in magnetotactic bacteria. Recently work has provided new insight into the biogenesis of bacterial magnetosomes, and links these organelles to a newly recognized prokaryotic cytoskeletal filament which organizes magnetosomes into a sensory structure capable of aligning cells with the geomagnetic field.