Preheat the oven to 210 C, Gas Mark 6. Cook the pasta in a large saucepan of boiling water for 8-10 minutes or according to packet instructions, until al dente. Drain and refresh.
Meanwhile place a large non stick frying pan over a medium high heat. Add the oil and fry the pancetta for 4-5 minutes, stirring often, until browned.
Add the onion and cook for a further 5-6 minutes, stirring often, until softened.
Add the butter to the pan and when it has melted stir in the flour and cook for 30 seconds. Gradually stir in the milk and bring to a gentle simmer. Cook for 5 minutes, stirring, until thickened.
Cut the cheese into small cubes and stir two thirds into the sauce. As soon as the cheese has melted remove the pan from the heat, add 1 tbsp thyme leaves and season to taste with sea salt and freshly ground black pepper.
Add the cooked pasta to the sauce and stir well. Transfer to a buttered ovenproof dish and dot the remaining cheese on top.
Bake for 20-25 minutes or until golden brown and bubbling. Sprinkle with the remaining thyme to serve.