SAN FRANCISCO — Holdout right guard Alex Boone has agreed to a $6 million, two-year contract with the San Francisco 49ers that replaces the two years remaining on his previous deal, a person with direct knowledge of the contract said Sunday.

Boone, represented by the agency of Schwartz & Feinsod, is expected to join the 49ers as soon as Monday as they prepare for their season opener at Dallas next Sunday.

The person spoke Sunday on condition of anonymity because the team had yet to announce Boone's return. He missed the Niners' offseason program and was subject to fines for his absences from the mandatory minicamp and training camp. Those fines will be waived, the person said.

The 27-year-old Boone's presence will be felt immediately for an offensive line that has struggled to protect quarterback Colin Kaepernick in the preseason. Tight end Vernon Davis also skipped the offseason sessions but arrived on time for Day 1 of training camp in July.

Most of San Francisco's veteran offensive line has been together for a while — and the always-animated Boone is the biggest personality of the bunch.

"Invite only," he cracked during training camp last year as a couple other O-linemen exited the ice tubs with him. "You can't just hop into that group. That's a tub club."

San Francisco's offensive linemen made major strides together in 2012 and evolved after a couple of rough outings early last season in Kaepernick's first full season as a starter.

The 6-foot-8 Boone joins left tackle Joe Staley, left guard Mike Iupati, right tackle Anthony Davis and new center Daniel Kilgore. It could take the group a little bit of time to get in sync after Davis missed the entire preseason recovering from offseason shoulder surgery. Iupati struggled during the exhibition season.

Boone, who went undrafted out of Ohio State in 2009, begins his fifth NFL season after starting every game the past two years for the 49ers.