Place the turkey in a large roasting pan. Using kitchen shears, cut off the first two joints of the wing, leaving the drumettes attached to the bird (reserve the wings for turkey stock). Let the turkey come to room temperature for 1 to 2 hours.
In a small bowl, mash together the butter and lemon zest with a fork. Smear the butter mixture all over the turkey. Squeeze lemon juice over the bird and put the lemon halves in the cavity. Place 2 onion halves in the turkey cavity, and the others in the pan. Sprinkle the thyme, salt and pepper over the turkey.
About 20 minutes before roasting, position a rack in the lowest part of the oven and preheat to 400 degrees . Tie the legs of the turkey together. Transfer to the oven and roast for 1 hour. Rotate the pan a half-turn, lower the temperature to 350 degrees and roast for 1 hour longer. After the second hour, using a bulb baster or brush, baste the turkey with the pan juices. Continue roasting, basting once or twice, until the bird registers 150 degrees to 155 degrees on an instant-read thermometer inserted into the inner thigh, about 30 minutes longer. Using tongs or a sturdy spatula and a two-pronged fork, tilt the turkey to pour any juices from the cavity into the pan.
Transfer the turkey to a large carving board, tent with foil and let rest for 30 minutes before carving and while you make gravy.