In a large bowl, combine the potatoes, olive oil, onions and garlic. Season with salt and pepper.
Cut six 12-inch square sheets of foil and place them on a baking sheet. Put one-sixth (about a cup) of the potato mixture in the center of each piece of foil. Fold the sides of the foil over the potatoes, covering them completely and sealing them into packets.
Transfer to the grill and cook until tender, 15 to 20 minutes.