Step 1The night before, soak the beans in 12 cups of cold water. The next day, drain the beans and reserve the soaking water.
Step 2In a large, heavy pot, saute the carrot, celery, garlic, onion and potatoes in the olive oil until the onions are soft, about 15 to 20 minutes. Add the beans and 8 cups of the reserved water. Stir in the tomato, parsley, basil, dried red pepper and a big pinch of salt, about 1 teaspoon or to taste.
Step 3Bring the mixture to a boil, then reduce to a simmer and cook gently until the beans are tender, about 1 to 1 1/2 hours. Remove a cup or so of the beans and puree or smash, then add back into the soup. Thin the soup with a little water, if necessary. Taste for salt.
Step 4Cook the pasta in abundant salted boiling water (less than a minute for fresh pasta; 8 to 10 minutes for dried).
Step 5Reheat the soup and stir in the cooked pasta. Serve in wide soup bowls. Pass a cruet of olive oil, the pepper grinder and a little freshly grated Parmigiano-Reggiano.