Rinse beans in cold water. Place in a bowl with water to cover; soak for 30 minutes to 1 hour.
Transfer soaked beans to a large pot; fill with 3 quarts water. Add onion and garlic. Cover and cook over low heat until boiling, about 30 minutes. Add bouillon and season with salt. Cook, adding more water as needed, until beans are tender, 30 to 40 minutes more.
Heat oil in a skillet over medium heat. Add a few scoops of cooked beans, 1 clove of cooked garlic, and about 1/2 of the water from the pot. Bring to a simmer and mash. Season with salt and pepper.