Ramirez singled and scored in the third and led off the eighth with his second homer to make it 2-0. That was enough for Floyd (3-4), who struck out eight and walked two after going 0-3 in his previous five starts. Bobby Jenks pitched a perfect ninth for his 10th save in 10 chances.
Duke (5-4) was a tough-luck loser despite allowing just six hits while striking out seven over eight innings.
But after seeing their season-high five-game win streak end with Thursday's 5-4 loss to Washington, the Pirates did little against a team and a pitcher mired in misery.
The 19-run pounding and Peavy's refusal to allow San Diego to trade him to Chicago were just the latest setbacks for a struggling White Sox team that has high expectations. One of the biggest disappointments for the defending AL Central champions has been Floyd, a 17-game winner last season who hadn't won since April 19.
His ERA entering the game was 7.71 - 9.95 in his previous five outings. But he finally showed his old form Friday.
He didn't allow a runner past second and the closest Pittsburgh came to scoring was when Eric Hinske sent a fly to deep right that Jermaine Dye caught against the wall.
Duke was almost as good.