After dismissing India for 327 in the first innings, England moved to a comfortable 178 for two in 65 overs before the stumps were drawn on the second day, with the visitors trailing by 149 runs.
At close, the left-handed Cook, who had scored a big century in the first Test, was unbeaten on 87. The more aggressive Pietersen was batting on 62 after a stay of 127 minutes during which he faced 85 balls and hit nine fours.
Cook batted for 251 minutes and faced 209 balls, striking a six and ten fours in the process.
The third wicket duo has so far put on 110 runs in 186 balls. For the record, Cook has batted for 960 minutes in all in the three innings he has batted during the series.
With three more days left in the second game of the four-match series in which India are 1-0 ahead, a result is on the cards on a track that is aiding the spin bowlers.
England, though, looked to have a slight advantage with a settled and experienced pair at the wicket and some more batting to follow.
On a wicket where the spin duo of Monty Panesar and Graeme Swann ran through the star-studded Indian batting line-up in which Cheteshwar Pujara (135) and Ravichandra Ashwin (68) stood out, the trio of home team spinners looked largely clueless against the determined Cook and Pietersen.
Barring the twin strike by left-arm spinner Pragyan Ojha in the space of 11 balls just before tea, the home side's spin attack looked far less menacing than both Panesar (five for 129) and Swann, who ran through the tail today to end up with figures of four for 70.
Cook again showed monumental patience to lead his side's reply. Anything bowled at the stumps was blocked, balls outside the off were cut while the ones outside the leg were swept. He gathered his runs mostly in singles to frustrate the
Indian spinners, just like he had done for nearly 12 hours in Ahmedabad.
With a sweep shot before tea, Cook surpassed Pujara as the highest run-getter in the series. The shot, incidentally, hit Pujara on the right side of his rib cage, forcing him to leave the field and seek medical attention. He did not come out to field after tea.
Substitute fielder Ajinkya Rahane, too, had to duck at times to avoid getting hit by the England captain's sweeps. He eventually received a painful blow on his left elbow by Kevin Pietersen's powerful sweep off Harbhajan Singh.
Pietersen, who looked in a hurry in the opening game, adopted a slightly different approach. He dispatch Harbhajan with lofted shots but played cautiously against Ojha, who had dismissed him twice in the first game. The batsman was also careful against Ashwin.
Pietersen, however, survived a confident appeal for a catch off Ashwin when he was on 45 in a team score of 146 for two.
Umpire Aleem Dar, who gave a wrong decision to send back Zaheer Khan in the morning by declaring him caught in the leg trap, did not agree to the Indians' vociferous appeal against Pietersen when the ball ballooned to backward short-leg
fielder Virat Kohli.
Pietersen soon raced to his half-century with a back foot cut off Ashwin in 63 balls.
He had come to the crease after Ojha struck two blows in his three-over spell late in the second session to dismiss opener Nick Compton and Jonathan Trott in successive overs.
Cook and his opening partner Compton had negotiated the spinning ball to raise the visitors' hopes till Ojha struck.
Ojha had the dogged Compton caught at slip with a sharply turning ball for 29 and then fooled Trott with an arm ball to trap the batsman leg before as England slumped from 66 for no loss to 68 for two.
Their dismissals brought together Cook and Pietersen who batted out the last session while adding 101 runs.
Neither Ojha nor off spinner Ashwin, who took four wickets in the first game, got the same amount of turn or bounce that Panesar found in the morning.
Both were also guilty of not sticking to a consistent line, with Ashwin slightly better than his spin partner till Ojha came on for a fresh spell to claim two quick wickets.
Harbhajan, playing his first Test after the disastrous tour to England in 2011, started off well by getting some turn and bounce, but later on became predictable and could not trouble the batsmen.
While Ojha was the most successful Indian bowler of the day with two for 65, Ashwin and Harbhajan gave away 54 and 47 runs, respectively, without tasting success. Zaheer Khan bowled economically in short spells.
Harbhajan was not summoned into the attack till the 25th over while Yuvraj Singh was not given a single over by skipper Mahendra Singh Dhoni.
In the morning, England finally dismissed Pujara for the first time in three innings as India were all out 22 minutes before lunch.
Pujara was the ninth man out at 316, after batting for almost the entire day yesterday and with just half an hour left for lunch today.
It was Pujara who pulled India out of a deep hole on the first day when India were struggling at 169 for six at one stage. He was lured out by Swann and wicketkeeper Matt Prior did the needful.
Pujara's seven and a half hour vigil lasted 350 balls. He struck 12 fours.
The Rajkot¿born player had made an unbeaten 206 in the first Test.
But despite Pujara's brave effort, India, resuming on 266 for six, lost their remaining four wickets for the addition of adding 61 runs with Swann sending back Pujara, Harbhajan and Zaheer in the space of 10 balls.
India's last four wickets added 158 runs, which helped them bounce back from the precarious position.
Panesar, who dismissed overnight batsman Ashwin, finished with a five-for, his first against India and 11th overall.
Gambhir,Trndulkar and to less extent Sehwag are certainly yoke around our teams neck. They will not come good noe. Harbhajan is also past his time and must make way for some more enterprising spinner. It is sad that Kohli is not performing because his batting place has been awkwardly disturbed. Our cricketing master must pay attention to these things and think dispassionately rather going by the past glory of these players.It will rather more honourable for these players if they are politely told to make for new faces.