Preheat oven to 400 degrees. Combine potatoes and onion in a bowl. Add olive oil and toss to coat evenly. Sprinkle rosemary, salt and pepper on potato mixture and stir to combine.
Pour potato mixture on a cookie sheet and roast in the oven for 25-30 minutes, flipping potatoes and onions halfway through. Depending on the size of your potato and onion pieces, they may cook faster or slower. Keep an eye on them so they don’t burn.
Remove from oven and season to taste with additional salt and pepper.