Life in the Middle Ages was difficult for most. Peasants lived in poverty as serfs bound to the land, often eating only black bread, lentils, and vegetables. Nobles' lifestyle was not as luxurious as believed, though they ruled from fortified castles built for defense on hills or protective landforms. Boys trained from a young age to become pages and then squires, learning knightly skills until proving themselves in battle and undergoing a ceremony to become a knight, with a code of chivalry emerging in the late 1100s dictating knightly conduct.