This question already has an answer here:
I remember that there was a stranded spacecraft and several splinter groups made up from its survivors/desendants set up camps nearby, one of which was a "Planet" built up by using deceased crewmembers. It was a short novel, 180-200 pages. I read it in the 80's. The opposing factions of the living had to work together to repair the main spacecraft to escape whereever it was they had been stranded. Edit- IIRC, Gravity played a major factor in the tale.