Preheat the oven to 230°C/210°C fan. Make a base for the lamb by spreading out the garlic, onion, and rosemary over the base of a roasting pan. Rub lamb with olive oil and season liberally with salt and pepper all over. Place the lamb on the bed of onions and garlic. Roast in the oven for 20 minutes to brown the skin. Remove the lamb from the oven. Reduce heat to 150°C/140°C fan.
Pour the stock and wine into a saucepan and bring to the boil. Pour the liquids into the roasting tray but not over the lamb.
Cover the roasting pan with aluminium foil and roast for a further five and a half hours. Remove the lamb from the pan and place it on a warmed plate and cover loosely with foil. Allow to rest for 20 minutes.
Make the gravy by removing the rosemary from the bottom of the pan and spooning out most of the fat. Place over medium heat on the stove and, when bubbling, sprinkle over the flour then whisk in a cup or two of water depending on how thick you like your gravy. Check for seasoning.
Serve with roast vegetables.