I Hated using frozen ginger/garlic and came across a recipe my mother in law uses which lasts for months in the fridge:
Loads of garlic (i soak mine in water for easy peeling)
loads of ginger (have not discovered any easy formula)
Peel both and throw in blender
using a hand held blender, add salt and oil (cooking oil is fine) (both act as preservatives) blend all together until you have a paste, store in any closed container, keeps well in the fridge and doesnt change colour either.
i use a little oil, maybe 2 tablespoons, a pinch of salt to every blend ( you will know if you have not added enough oil, cause it will turn green)