Rinse the beans and soak them in plenty of cold water for 12 hours. Drain them and rinse them again under running water. Place them in a saucepan with plenty of water, add a bay leaf and a sprig of rosemary.Bring to the boil and simmer the beans for about an hour over a very gentle heat, adding warm water, if necessary, and seasoning with salt half way through. In the meanwhile slice the bacon into strips.Peel the onion and the garlic, rinse and chop them with the leftover rosemary, the sage and a pinch of parsley. Heat some oil, the broken chilli, the chopped onion and garlic with the herb mix and fry until soft but not golden; then add the strips of bacon and brown them briefly, mixing with a wooden spoon.Once drained, add the boiled beans, cover and simmer for 10 more minutes over a medium heat. In the meanwhile bring to the boil plenty of boiling salted water, toss the pasta in it and drain when al dente then mix it with the bean ragù.Serve with a sprinkle of chopped parsley and grated pecorino on the side.