Let the chicken and butter stand at room temperature for 30 minutes. Preheat oven to 425. Remove giblets from chicken, tuck wing tips under the body, and generously season the cavity of the chicken with salt and pepper.
Place the palm of your hand on top of lemon and, pressing down, roll it back and forth on a work surface several times. Pierce the entire surface of the lemon with a fork. Using the side of a large knife, gently press on the garlic cloves to open slightly. Insert lemon, garlic, and rosemary into chicken cavity.
In the center of a heavy-duty roasting pan, arrange the onion slices in two rows, letting the slices and rows touch. Place the chicken on top. Tie the chicken legs together with kitchen twine.
Spread the softened butter over the entire surface of the chicken and season generously with salt and pepper.
Roast until skin is crisp and deep golden brown and juices run clear when chicken is pierced with a fork, about 1 1/2 hours. Insert an instant-read thermometer into the breast, then the thigh. The chicken is ready when the breast or thigh reaches 165 degrees. Garnish with rosemary sprigs.