Use a large pot, with a capacity of about 7 ½ quarts/7.1 liters, that will hold all the onions. An enameled cast-iron pot will provide the best surface. Place the pot over medium heat and melt the butter. Add the onions, sprinkle with 2 teaspoons salt, cover, and cook until the onions have heated through and started to steam. Uncover, reduce the heat to low, and cook, stirring occasionally (you should be able to leave the onions alone for an hour at a stretch once they’ve released their water). Season with several grinds of pepper.
Preheat the oven to 200°F/95°C. Place the bread slices in the oven and let them dry completely (you can leave the slices in the oven indefinitely, as the heat is not high enough to burn them).
When the onions have completely cooked down, the water has cooked off, and the onions have turned amber—this will take several hours—add 6 cups/1.4 liters of water. Raise the heat to high and bring the soup to a simmer, then reduce the heat to low. Add the sherry. Taste and season with salt and pepper as needed. If the soup is too sweet, add some vinegar. If you would like a little more depth, add a splash of red wine. I like the onion-to-liquid ratio with 6 cups of water. But if you’d prefer a slightly more delicate soup, add an additional 1 cup/240 milliliters water or to taste.
Preheat the broiler (be sure you've removed the bread from the oven!). Portion the soup into bowls, float the bread on top, cover with the cheese, and broil until the cheese is melted and nicely browned. Serve immediately.The
The onions can be cooked a day ahead, and stored well-wrapped in the fridge. Pack them tightly and well wrapped and freeze for up to a month.