Step 1 Heat the oven to 400 degrees. Combine garlic and olive oil and let sit to infuse for 5 minutes. Strain and discard garlic; set aside the oil.
Step 2 Slice the potatoes lengthwise into one-fourth-inch-thick pieces and place in a baking dish with the onion. Drizzle 2 tablespoons garlic oil over potatoes and sprinkle with 1 teaspoon salt and chopped rosemary. Stir to combine. Roast in the oven 30 minutes without stirring.
Step 3Season the fish inside and out with salt and brush inside and out with the remaining garlic oil. Thinly slice and seed the lemon and place all but 2 or 3 slices in the cavity with the sprig of rosemary.
Step 4Stir the potatoes and place the fish on top. Arrange the remaining lemon slices on top of the fish and roast until a knife easily penetrates the flesh and the top fillet begins to lift easily, about 25 to 30 minutes.
Step 5Carefully transfer the fish to a warm platter. Let stand for a few minutes while arranging the potatoes on both sides and serve hot.