Recently I have switched from Symbian to Android, so everything in Android is new for me in my Samsung Galaxy S2. After using it for couple of days, I rooted my device so as to install many dev tools. But after browsing in many active Android forums I found that almost everyone is using custom ROMS in their Android phones. So I too thought to give it a try. Lucikly a latest and stable version of CM 7.1 that was released on 10th October and was waiting to flash my Galaxy S2.
So I prepared my phone for flashing and successfully flashed with CM 7.1 in one go. I used that ROM for a single night and found that it was unstable with loads of bugs. So I wanted to flash back to Galaxy S2 Stock Rom the early next morning. I downloaded the correct version of Stock Rom from XDA Forum and flashed it according to the given instruction. The flash process went smoothly but after the process completed and the phone got rebooted, I found that my phone has gone into a boot loop. I removed the battery and started it again but still the same problem persisted. Then I searched over the net but did not find the solution. Now I was almost blank as I did not have good knowledge about Androids. After a few tries I managed to get my phone back, so I am listing the steps below about how i solved the loop boot problem.
Hope this small tut have helped many newbies like me to recover their phone from the boot loop problem after flashing or updating their Samsung Galaxy S2.