Cut off tips from garlic cloves still on the bulb (leave skin on) and place them on an aluminum foil square that you can wrap it in. Drizzle some olive oil on the garlic bulb. Wrap it in aluminum foil. Place wrapped garlic on the baking sheet.
Bake garlic for 25-30 minutes, depending on the size of the bulb.
Take out of the oven and set aside to cool down.
Preheat medium pot over medium heat and add oil.
Add diced onion and saute until transparent.
Add can of crushed tomatoes and roasted garlic. (Easiest way to get garlic out of the skin is to gently squeeze it out.) Stir well and bring to simmer.
Add bay leaf, basil, thyme, sugar, salt, and pepper. Stir well, lower heat to low, cover and cook for about 45 minutes. Stir once in a while.
Take out bay leaf.
Add Parmesan cheese and transfer the content of the pot into a blender. Cover and blend until smooth.
Pour sauce back into the pot and let it cook for a new more minutes, so that the cheese gets a chance to incorporate.
While sauce is cooking, cook pasta according to package instructions, strain and set side.
Preheat oven to 350.
Mix pasta with pasta sauce and 1 cup of Mozzarella cheese. Transfer into a lightly greased casserole dish.
Top pasta with some more fresh basil and Mozzarella cheese. Bake for 15-20 minutes.