Heat oil in a stockpot and add onions. Fry on medium-low heat until they are a medium golden brown, about 12 minutes.
Add crushed ginger and garlic, and fry for 30 seconds.
Add whole spices (cardamom, cinnamon stick, bay leaf, black peppercorns, cumin seeds) and fry for 1 minute.
Add peas and fry for a few seconds.
Add 4 cups water, salt and rice. Bring to boil.
Lower to a simmer, and let the water boil out, about 10 minutes.
Once the water has boiled out, remove from heat. Wrap a tight-fitting lid with a cloth and place it firmly on the pot. Bring the dial back to the lowest point and let the rice steam for 12 minutes.
Remove from heat, place in serving dish and fluff the rice with a fork.