Step 1 Warm the olive oil in a large, heavy-bottomed stockpot over low heat. Cook the onion with the garlic, rosemary, thyme and bay leaf until the onion is translucent, about 5 minutes.
Step 2 Add the ham hock or slab bacon, vinegar, 2 cups of the stock and the beans. Increase the heat and bring to a boil. Reduce the heat to low and simmer gently, barely bubbling, until the beans are tender, 1 1/2 to 2 hours, adding stock or water as needed to keep the beans covered. Skim any foam that rises to the top. Gently stir the beans once every 30 minutes. Season with salt and pepper to taste.
Step 3Remove the ham hock or bacon and bay leaf. Allow the ham hock or bacon to cool. Using your fingers, separate the meat from the fat and the bone, shred the meat and add to the beans. Or, cut the bacon into one-quarter-inch dice and add to the beans.