In a large pot, cover the bones or carcass with water and boil for 10 minutes.
Drain off the water, along with any impurities floating in it, then refill the pot with cold water.
Simmer with the vegetables for 2-3 hours.
Strain and set aside.
Caramelized Onions
In a large pot, ideally heavy-bottomed, caramelize the onions with the butter and sugar over low heat for about 30 minutes, stirring occasionally, until evenly deep golden brown.
Optional: deglaze with white wine.
Soup
Pour about 2 L of the stock into the pot with the onions and simmer over low heat for 20 minutes.
Transfer the soup to ovenproof bowls.
Arrange the toasted bread on top.
Sprinkle generously with grated Gruyère.
Bake in a 230-degree oven until the cheese is melted and golden.