Preheat the oven to 130C/275F/Gas 1.
In a bowl combine the onions, potatoes and thyme. Season with salt and pepper.
Layer the potatoes and onions in a roasting tin and place the lamb on top skin-side up.
Cut small incisions in the lamb using a small knife and stick the whole garlic cloves in the holes, pushing them into the meat to prevent them burning while the meat cooks.
Pour the chicken stock over and place in the oven for 4-5 hours, or until the potatoes are crisp on top and soft inside.
When cooked, remove the lamb from the oven, cover with aluminium foil and set aside to rest for 20 minutes.
Serve with French beans (or any green vegetable of your choice).