Adjust an oven rack to the lower third of the oven and preheat the oven to 450 degrees F.
Lay 2 large sheets of aluminum foil on a sheet pan. In a large bowl, combine the potatoes, onion, 1 1/2 teaspoons salt and 1/4 teaspoon pepper. Use a rubber spatula to toss well to coat. Divide the mixture in the middle of each of the foil sheets. Dot with the cubes of butter and place the rosemary sprigs on top. Bring the edges of the foil up and around the potatoes and seal tightly. Place the packets on a baking sheet and roast, until the potatoes are tender, 30 to 35 minutes.
These packets can also be cooked on the grill over indirect medium high heat for the same amount of time.