Praise be to Allaah.
If the matter is as you describe, then you may cover your head whilst you are in ihraam, and expiate for that by sacrificing a sheep and giving it to the poor in Makkah, or by feeding six poor persons in the sanctuary, giving each one half a saa’ of dates or some other staple food, or you may fast for three days.
This applies to ihraam for Hajj. Similarly, if you enter ihraam for ‘Umrah you must offer another expiation.
And Allaah is the Source of strength. May Allaah send blessings and peace upon our Prophet Muhammad and his family and companions.