How and where photosynthesis evolved in the ancestors of cyanobacteria (along with a discussion of endosymbiosis).