The fourth-wicket pair added an unbroken 88 together before Leicestershire closed on 102 for three, the grim conditions having allowed for only 37 overs in the day.
There was every chance of a three-day win for Yorkshire when the visitors, following-on, resumed in the morning on three for one, still 328 runs in arrears.
A quick end loomed more likely when Jacques du Toit was caught in the covers by Joe Sayers off Steve Patterson in the second over.
But rain and murky light soon brought the players off and the interruption lasted until 3.30pm at which stage 43 overs had been lost.
Then Patterson struck again by getting Ramnaresh Sarwan lbw pushing half-forward and at 14 for three the end may not have been far away if Boyce and Cobb had not defied both the Yorkshire attack and the weather.
Cobb had introduced himself by driving his first ball for four and with Boyce also in determined mood the pair made sure if unspectacular progress.
Even the introduction of Anthony McGrath, who had ripped out the middle-order in the first innings, could not make a breakthrough, even though Boyce, on 19, edged him just short of Gary Ballance at first slip.
A sliced four to Cobb raised the 50 stand, Leicestershire’s first of the match, and when Adil Rashid came on Boyce drove him through extra cover for four.
A wintry mix of rain and sleet caused a further nine overs to be lost at 5.40pm and on the resumption there was just time for Cobb to hit Rashid to the mid-wicket boundary to take Leicestershire into three figures but another squall brought about the premature close.
Read Chris Waters’s in-depth match report from Headingley in Saturday’s Yorkshire Post newspaper.