Place onion directly on a gas burner or under an electric broiler, and roast it, turning with tongs, until it is lightly browned on all sides.
Cut the ginger in half lengthwise.
Using a side of a heavy cleaver or chef's knife, smash ginger all over.
This will release its full flavor.
Skin chicken bones, and rinse well.
Place bones, onion, ginger and spices in a large soup pot.
Add 3 gallons of water, and bring to a boil over high heat.
Lower heat to medium-low, and simmer for 3 hours, skimming foam and fat off the surface with a slotted spoon until the stock becomes clear and is reduced by half.
Strain stock through a fine sieve, and discard the solids.
Refrigerate overnight.
Next day, remove all fat from the surface.
Bring stock to a boil, and cook 5 minutes; then, add sugar and salt, and serve.