Finely chop the pancetta, removing any rind; finely grate the pecorino and parmesan and mix together.
Beat the eggs in a medium bowl and season with a little freshly grated black pepper; set aside.
Add 1 tsp salt to the boiling water, add the spaghetti and, when it returns to the boil, cook at a constant simmer, covered, for 10 minutes or until al dente.
Squash the peeled garlic cloves with the blade of a knife to bruise them.
While the spaghetti is cooking, melt the butter in a large frying pan or wok and add the pancetta and bruised garlic.
Cook on medium heat for about 5 minutes, stirring often, until the pancetta is golden and crisp; remove and discard the garlic.
Turn the heat to low under the pancetta. When the pasta is ready, lift it from the water into the frying pan with the pancetta, keeping the reserved pasta water.
Mix most of the grated cheese with the eggs, keeping a small handful back for sprinkling.
Take the pan off the heat and quickly pour in the egg and cheese mixture, lifting the spaghetti with tongs so the mixture thickens without scrambling and coats the pasta.
Add several tablespoons of the reserved pasta water to loosen the sauce as needed; season with a little salt if necessary.
Twist the pasta onto serving plates and serve immediately with the remaining cheese and a grating of black pepper; add more hot pasta water if it becomes dry.
Tips
Reserve some pasta cooking water to loosen the sauce if it becomes too thick.
Remove the pan from the heat before adding the egg mixture to avoid scrambling the eggs.
Serve immediately with extra grated cheese and a generous grinding of black pepper.