How to go back to stock iOS 7.1.2 via DFU or another method?

Oct 28, 2008
So I jailbroke with Pangu a few days ago. I was successful but I ran into stability issues and crashes with it. The crashes affected regular non jailbroken apps like Chrome and Heywire....and these apps I use a lot. I haven't played with many other non stock apps but these ones do have issues.

What I tried to do tonight which almost was a major disaster, is erase my device via my device. Fortunately,upon reboot my iphone 5 got caught in endless boot loop.

I then plugged in my iPhone 5 into my emergency iTunes back up laptop that has one clean fresh DFU installed recovery. I then interrupted the bootloop and went into DFU mode.

When I was connected to iTunes, I got the recovery mode prompt and that I must recovery my device and that it would update to the latest (iOS 8) as well. I hit cancel. I did not see any option to do a simple DFU recovery back to an unbroken jailbroken state.

I managed to reboot my phone and to my surprise, the iPhone didn't erase anything. I am back to my jailbreak state;however, is there a way to get me back to a non jailbroken state and recovery my device using the previous DFU (7.1.2) have on my machine? I do not wish to update to iOS 8, ever.
Nov 14, 2008
Cairo, Egypt.
Right now you can restore to iOS 7.1.2 because Apple is still signing it. You can do that by holding SHIFT (or ALT, I don't remember) and clicking Restore in iTunes, which will let you locate your IPSW (firmware file) and restore from it.