Clean the ribs, and trim away any excess fat. In a medium bowl, stir together the sugar, ground black pepper, paprika, 1 teaspoon cayenne pepper, and garlic powder. Coat ribs with the spice mixture. Place the ribs in two 10×15 inch roasting pans, piling two racks of ribs per pan. Cover, and refrigerate for at least 8 hours.
Preheat oven to 275 degrees F (135 degrees C). Bake uncovered for 3-4 hours, or until the ribs are tender and nearly falling apart.
Remove 4-5 tablespoons of drippings from the bottom of the roasting pans, and place in a skillet over medium heat. Cook onion in pan drippings until lightly browned and tender. Stir in ketchup, and heat for 3 to 4 more minutes, stirring constantly. Next, mix in water and brown sugar, and season to taste with cayenne pepper, salt, and pepper. Reduce heat to low, cover, and simmer for 1 hour, adding water as necessary to achieve desired thickness.
Preheat grill for medium-low heat. When grill is ready, add soaked wood chips to the coals or to the smoker box of a gas grill. Lightly oil grill grate. Place ribs on the grill two racks at a time so they are spaced apart evenly. Cook for 20 minutes, turning occasionally. Baste the Texas ribs with sauce during the last 10 minutes of grilling.