Cook the pasta for half the cooking time on the package.
Peel and mince the onion and garlic.
Add the pasta and cook for another 3-4 minutes.