Here are the steps I took; (TAKEN FROM IPHONE DEV BLOG)
1. I upgraded to Itunes 7.7
2. Connected my iphone. It deteced the iphone and asked for an upgrade, I just cliked download only. This is how I got the original firmware form apple

Then disconnected iphone just after the download started.
3. Before opening the pwnagetool I put my iphone in dfu mode. I tried at least 4 times to do that. The trick was to hold down the power and home botton wait until it restarts. Then pluck it into the dock wait for ten seconds during the apple logo and then release it . It is totally black but itunes recognized it as in recovery. This is the dfu we need.
4. I did not choose the expert mode. Chosed iphone 1g . It had found the restore firmware that itunes had already downloaded. Asked me for the bootloaders. I browsed both of them respectively and then it created the custom ipws.
5.Clicked next and it recognized the dfu but asked for shutdown. I had problem here before, It said that it can not put the device in dfu mode. This time it detected and asked for a shutdown. I just pressed both power and home button until it restarted. Then watch for the screen. It tells you when to release the power button and when to release home button. Then it was ok. My iphone was ready to be restored with the custom ipws. The tool gave a message everything ok and i must just close pwnagetool and use itunes.
6. I didn't do anything to iphone just left it where it was in dfu mode. Itunes had already gave the message that it needs to restore my iphone. I just said ok. The restore screen was in front of me. Just pressed alt button on the keyboard and while pressing it i clicked restore, and I showed itunes gently my custom ipws. It restored it successfully.
7. After that the phone rebooted, bootneutral was opened automatically , first it neutral the boot and then flashed the baseband. All was automatic. Then after the last reboot, there it was jailbroken and unlocked with all features working.
I took these steps and it is working flawlessly.