Heat a pan over medium flame.
Add all the ingredients except grated coconut - coriander seeds, black pepper, garlic, red chillies, fenugreek and sambar onions.
Roast till the ingredients become golden brown in color and aromatic.
The skin of both sambar onions and garlic should change color and the outer skin must shrink in size.
Transfer the roasted ingredients to a bowl and set aside.
To the same pan add grated coconut & roast till it becomes brown in color and fragrant.
Cook over medium flame and keep tossing it continuously taking care not to burn.
Once roasted transfer to the same bowl and let it cool.
Once cooled, transfer all the ingredients to a blender jar.
Add 1/2 to 3/4 cup water, grind to a smooth paste and set aside.