While water is coming up to a boil and pasta cooks, make sauce.
Heat a deep skillet over medium heat with extra-virgin olive oil.
Add garlic and cook 3 minutes, then remove.
Add onions and cook 5 minutes then add cauliflower, chicken stock and the rosemary. Cover the pan and cook 15 minutes. Uncover the sauce, add 1 to 2 ladles of pasta water and mash the cauliflower with the back of a wooden spoon or potato masher.
Add the pasta and cheese to the cauliflower and toss to combine. Season the dish with salt and pepper, to taste, and serve.