There was music pumping through the Red Sox clubhouse after Friday’s much-needed 12-2 pasting of the Tampa Bay Rays in the home opener.

Several of the players’ children were underfoot, playing impromptu games of catch or looking to grab handfuls of bubble gum as their fathers conducted interviews.

Dinner plans were being made and spirits were high right up until the televisions on the ceiling showed a replay of Jacoby Ellsbury’s injury in the fourth inning.

Kevin Youkilis winced and David Ortiz muttered an expletive as they again watched Rays shortstop Reid Brignac land on Ellsbury’s right shoulder. What looked painful at the time seemed worse in slow motion.

“That’s tough to watch,’’ Ortiz said. “That’s one of our best players right there.’’

It is uncertain how long Ellsbury will be out, although a baseball source Friday night said the center fielder has a dislocated or partially dislocated shoulder and will miss 6-8 weeks.

The Red Sox are already without left fielder Carl Crawford, closer Andrew Bailey, and a crowd of others. Ellsbury, who finished second in the American League Most Valuable Player voting last season, would make it 10 players on the disabled list.

The loss of Ellsbury took some of the joy from what was a satisfying victory for the Sox after a 1-5 road trip. It was their eighth straight victory in the home opener.

The Sox battered five Tampa Bay pitchers for 16 hits and six walks. Leading, 4-1, after seven innings, the Sox sent 14 batters to the plate in the eighth inning and scored eight runs.

Kelly Shoppach had three hits, scored three runs, and drove in two against his former team. He also had his first career stolen base, his belly-flop slide drawing laughs from the sold-out crowd.

Youkilis drove in three runs and Ortiz drove in two on a day when the entire lineup contributed.

After a road trip fraught with frustration, the Sox found a lot of holes.

“Everyone needed just to know it’s not the baseball god turning against us,’’ manager Bobby Valentine said. “We hit balls hard and they caught them. Today we hit balls soft and they didn’t catch them. That’s a really good thing.’’

Josh Beckett appreciated the run support on a day when he didn’t need much.

The righthander, trashed by Detroit in his first start, stuffed the Rays for eight innings. He allowed one run on five hits, putting to rest concerns that his injured right thumb was more debilitating than he and the Sox were letting on.

Beckett, booed a bit when introduced for his role in last season’s collapse, heard only cheers once he started pitching.