Pick through the beans and remove any rocks or bad beans. Bad beans are those that are shriveled, broken, or off in color.
Place the beans into a colander and rinse, then place into a large pan.
Add the onions and garlic to the pot.
Add 8 cups of water and bring to a hard boil.
Reduce heat to medium and simmer for 1 1/2 to 2 hours or until the beans start to get tender. Add water as necessary to keep the beans submerged in water. I usually have to have 2 to 3 cups during this part.
Once the beans are mostly tender, add the remaining ingredients and reduce the heat to medium-low and slow simmer the beans, stirring frequently for another 1 1/2 to 2 hours or until most of the liquid has been absorbed by the beans and some of the beans start to break and stick to the bottom of the pan.
Reduce the heat to low and continue to cook, stirring frequently for another 15 minutes or until most of the liquid is gone.
Remove the beans from the heat and mash with a potato masher and serve.