Unsalted butter • large (about 3 lbs.), peeled and thinly sliced Red or yellow onions • teaspoon, plus more to taste Kosher salt • Beef stock • Chardonnay wine • Dry sherry • All-purpose flour • teaspoon, plus more to taste Black pepper • thick, from 1 loaf) Store-bought baguette • Freshly shredded Gruyère cheese