Rinse and sort the beans and bring to a boil in a large pot of unsalted water.
Simmer for about an hour, stirring occasionally and adding water when needed. Cover and soak overnight.
The next day, pour off the soaking water and add enough fresh water to cover the beans. Bring to a boil again and let simmer (stirring occasionally and adding water if needed) until tender enough to eat.
Strain, saving some of the pepper and red pepper.
In the bottom of a large saucepan, heat enough olive oil to coat the bottom of the pan. Add the garlic mixture to the hot oil and stir once. Add the minced onion and cook until the onion is slightly transparent. Add the beans and some of the liquid and heat until hot enough to eat.
Serve over rice.