Preheat the oven to 350°. In a large mixing bowl, toss the onions, potatoes and chicken legs with the salt and 5 tablespoons of olive oil.
Arrange the onion and potato pieces evenly across a deep baking tray, then place the chicken legs on top. Bake for 1 hour.
In a small mixing bowl, whisk together the grated garlic, lemon juice and the remaining 2 tablespoons of olive oil. Season to taste with salt and pepper.
Remove the baking tray from the oven; the chicken should be brown and crispy. Spread the lemon-garlic mixture on top, then return the tray to the oven for 8 minutes.