Preheat oven to 375 degrees F. Separate the cloves of garlic (you should have about 30 cloves) and peel. Mince four of the cloves. Set aside remaining garlic cloves.
In a small bowl, combine minced garlic with 1 tablespoon of the olive oil, 1 tablespoon of the rosemary, the ground black pepper, and 1/4 teaspoon of the salt. Rub minced garlic mixture over chicken.
Place six of the garlic cloves into the cavity of the chicken. Tie legs to tail. Twist wing tips under back. Place on a rack in a shallow roasting pan. Insert oven-going meat thermometer into center of an inside thigh muscle. Do not allow thermometer tip to touch bone. Roast, uncovered, for 1 1/2 to 1 3/4 hours or until drumsticks move easily in their sockets and meat thermometer registers 180 degrees F.
Meanwhile, place sweet potatoes, onion wedges, remaining garlic cloves, 1/2 tablespoon of the rosemary, and 1/4 teaspoon of the salt in a 1392-inch baking pan. Drizzle vegetable mixture with remaining 1 tablespoon olive oil; toss to coat. Place in oven on a separate rack and roast, uncovered, for 50 to 60 minutes or until tender, stirring every 15 minutes.
Remove chicken from oven. Cover loosely with foil and let stand 15 minutes before carving. Serve chicken with vegetables. Carve chicken,discarding skin before serving.