Heat oven to 375° F. Working on a baking sheet, remove the giblets and neck from the cavity. Reserve the neck and discard the giblets. Using a paper towel, pat the turkey dry of juices. Stuff with the thyme and half the onions.
Tie the legs together with kitchen twine. Tuck the wing tips underneath the body (this will prevent them from burning).
Rub the turkey all over with the butter and season with 1 teaspoon salt, making sure to reach the crevices of the legs and wings. Be careful not to tear the delicate skin.
Place the turkey neck, carrots, celery, and remaining onions in a large flameproof roasting pan. Put a roasting rack in the pan and place the turkey on top of it.
Roast the turkey, basting every 30 minutes with the pan juices. (Basting will not make the meat moister, but it will produce an evenly browned skin.)
If the turkey begins to darken and there is still a substantial amount of cooking time left, tent it loosely with foil. If the vegetables begin to scorch, add some broth to the pan.
Continue roasting until the thickest part of a thigh registers 165° F, 21/2 to 3 hours. Tilt the turkey to empty the juices into the pan. Transfer the turkey to a carving board, tent with foil, and let rest for at least 25 minutes. Reserve the pan and its contents for Basic Gravy.