Once the pilgrim reach to Jeddah Hajj terminal, Hajj terminal is different than the Jeddah International Airport. Hajj terminal is made of tents. pilgrim has to wait in a lounge where they will sit in a que.
They usually enter in small groups in a immigration foyer. After finishing with immigration they checkout to luggage claim area.
Where they collect their luggage and ahead to Hajj ministry counters where they will surrender their passport.
Here they will be issued a card which will hold the information about the office where their passport will remain in Medina or Mekkah.
So it is the responsibility of pilgrim to take well care of this card. Otherwise it will be very hard to locate his or her passport when they were to leave Medina or Mekkah.