Drain the soaked beans and put them in a pan of cold water, bring to the boil and then remove from the heat and drain. Put the beans in a pan of fresh cold water, together with the onion and bay leaves. Cook for 30–40 minutes until almost tender, then add salt and cook for a further 20–30 minutes, until completely so. Drain them and put them in a pottery bowl.
Mash the garlic and anchov