for people who say its disgusting, thats because gravemind is made of corpses
Yes.
Graveminds start out as proto-graveminds, which are lots of flood forms glued together. (like that one in Halo 1 with Keyes in it)
Proto-graveminds usually have some purpose, like piloting a complex ship. When that's the case, it may be made up of pilots.
Proto-graveminds share all of the knowledge and memories of the life forms that it may absorb.
It keeps accumulating more mass, and therefore more memories and intelligence, and eventually becomes self-aware.
That is when it becomes a true gravemind.
That's why the gravemind that met chief was a monument to all his (or the UNSC as a whole) sins. It was made up of the covenant he (or the UNSC) had killed.