Replying to India's 503-9 declared, Sri Lanka reached 265-8 before rain and bad light brought an early end on Tuesday, with the prospect of the follow-on still hanging over the hosts.
No.7 Dinusha was unbeaten on 85, which followed his scores of 100 and 84 in the opening Test in Galle, which India won comprehensively to take a 1-0 lead in the two-match series.
Lahiru Kumara was unbeaten on eight, with Sri Lanka still trailing by 238 runs.
Earlier, Pasindu Sooriyabandara (80) led Sri Lanka's resistance after the hosts resumed on a precarious 2-8 at the Sinhalese Sports Club ground.
India seamer Prasidh Krishna (3-47) dismissed Kamil Mishara (19) and Kamindu Mendis (32), while Manav Suthar removed home captain Dhananjaya de Silva (8) to leave Sri Lanka reeling at 5-137.
Sooriyabandara, who made his Test debut as a concussion substitute in Galle, fought hard but fell short of what would have been his maiden Test century.
Attempting to cut a delivery from Ravindra Jadeja, Sooriyabandara could only deflect the ball on to his back thigh. It then rolled on to hit the base of the stumps, with the impact enough to dislodge the bail.
India fast bowler Mohammed Siraj had Niroshan Dickwella caught down the leg side without scoring, while Suthar (3-83) removed Keshara Nuwantha for 18 to keep the pressure on Sri Lanka.
Dinusha struck two sixes and six fours in a fluent innings and looked comfortable against both pace and spin.