Running parallel to my other answer, The Starlost could be the "film" you're referring to. It's a 1970s 16 episode TV series involving a boy from an agrarian society who learns the truth of the elders, that they're on a generation ship.
In 2790, four hundred and five years after the accident, Devon (Keir Dullea) a resident of Cypress Corners, an agrarian community with a culture resembling that of the Amish, discovers that his world is far larger and more mysterious than he had realized. Considered an outcast because of his questioning of the way things are, especially his refusal to accept the arranged marriage of his love Rachel (Gay Rowan) to his friend Garth (Robin Ward), Devon finds the Cypress Corners elders have been deliberately manipulating the local computer terminal, which they call "The Voice of The Creator". The congregation pursues Devon for attacking the elders and stealing a computer cassette on which they have recorded their orders, and its leaders plot to execute him, but the elderly Abraham, who also questions the elders, gives Devon a key to a dark, mysterious doorway, which Abraham himself is afraid to enter. The frightened Devon escapes into the service areas of the ship and accesses a computer data station that explains the nature and purpose of the Ark and hints at its problems.
When Devon returns to Cypress Corners to tell his community what he has learned, he is put on trial for heresy and condemned to death by stoning. Escaping on the night before his execution with the aid of Garth, Devon convinces Rachel to come with him, and Garth pursues them. When Rachel refuses to return with Garth, he joins her and Devon.
Eventually they make their way to the ship's bridge, containing the skeletal remains of its crew. It is badly damaged and its control systems are inoperative. The three discover that the Ark is on a collision course with a Class G star similar to the Sun, and realize that the only way to save The Ark and its passengers is to find the backup bridge and reactivate the navigation and propulsion systems. Occasionally, they are aided by the ship's partially functioning computer system.
The catch here is that they don't credit the plot to a piece of literature (although Harlan Ellison initially wrote for it, and eventually published Phoenix Without Ashes, which was a novelization of the show). Also, neither the arc of the series nor the 1980 TV movie, The Starlost: The Beginning (consisting of the first three episodes), seem to follow exactly the plot arc you describe.
Here are the opening titles:
And, potentially of interest, the pitch film: