Preheat your oven to 350 F.
Slice up the onions, add 2 tablespoons of butter to the skillet and sauté them for 5 minutes.
Then add the garlic with one more tablespoon of butter and sauté for another 5 minutes.
In the meantime, peel your potatoes and cut them thin (I used my food processor to cut up 2/3 of my potatoes, which literally took 15 seconds. I then thinly sliced 1/3 of potatoes to have nice round slices for the top layer.
Butter your 11" oval baking dish and start assembling the casserole.
Add 1/3 of your potatoes for a single layer; then add 1/2 the onions, 1/3 of your rosemary, salt, and pepper (season every layer).
Repeat with another layer.
Arrange the top layer of potatoes in a way that the rounds overlap slightly on each other;
Pour over the stock so it submerges almost all of the potatoes. However, the top layer stays slightly elevated above the stock (so that it will get crispy).
Add more rosemary, salt, and pepper.
Add little pieces of butter (1/3" squares) on the potatoes and drizzle with extra virgin olive oil (about 2 tablespoons of butter)
Cover with foil and bake for one hour.
Take the foil off, raise the oven temperature to 425F and bake for another half hour.
In the meantime shred 1/2 cup of Gruyere Cheese and chop the parsley.
Remove the potatoes from the oven, sprinkle with cheese and return to the oven for 5 minutes, until the cheese has melted.
Serve with chopped parsley and enjoy!