Cut the pancetta into small cubes and brown it in a dry pan over medium heat for a few minutes, until the fat starts to melt.
Meanwhile, clean and finely chop the onion. Once the pancetta fat has melted, add the onion to the pan. Sauté over low heat, stirring frequently, until it becomes translucent (about 5 minutes).
Then pour the tomato purée and a little water into the pan. Add a pinch of salt and sugar, and cook over low heat for at least 20 minutes, stirring occasionally. Add a bit of pasta cooking water if necessary to prevent the sauce from sticking.
While the sauce is simmering, bring a pot of salted water to a boil for the pasta. Cook the pasta according to package instructions.
Once the pasta is cooked, drain it and add it to the sauce in the pan. Toss everything over medium heat for a minute or two, ensuring the pasta is well-coated with the sauce. Serve garnished with grated cheese and black pepper if desired.