Note: Only iPhone 3GS with old bootrom is supported. Also there are too many jailbroken apps that are currently broken on iOS 4.2. Therefore proceed at your own risk only. I am not responsible if you end up bricking or locking your phone. Proceed if you are an advanced user only, and know what you are doing. Otherwise, wait for the official tools.
Step 1: Download and run PwnageTool 4.1.2 from the download link given at the end of this post.
Step 2: Download the latest release of PwnageTool Bundle for iPhone 3GS on iOS 4.2 (click here to download), and then extract it on your desktop.
Step 3: Download iOS 4.2 GM for iPhone 3GS. You can get it officially if you are a registered apple developer. Otherwise, you can grab it from somewhere around the web. Hint: Google it !
Step 4: Copy the downloaded PwnageTool to your desktop. Right click on the PwnageTool icon and click on “Show Package Contents” (see the screenshot below).
Step 5: Go to Contents/Resources/FirmwareBundles/ and paste iPhone2,1_4.2_8C134.bundle file here. Close the folder.
Step 6: Move atvBundlePatcher.sh and Info.plist.patch files to the location where you extracted the PwnageTool in Step 4.
Step 7: Rename atvBundlePatcher.sh to atvBundlePatcher.command. Double click this file that will open the Terminal executing the script (See the screenshot below).
Step 8: When you are finished, close all open windows and start this bundled version of PwnageTool. Simple check for “Expert Mode” and browse iOS 4.2 .ipsw file for iPhone 3GS (See the screenshot below).
Step 9: Check “Build” and then click next. Wait till PwnageTool creates the custom .ipsw file that you can restore to jailbreak your iPhone.
Step 10: In this step you need to enter DFU mode:
Hold Power button and Home button for 10 seconds.
Release the Power button but keep holding the Home button for 10 seconds.
Your device should enter the DFU mode.
Step 11: Al last, you need to restore your iPhone 3GS to this recently created custom iOS 4.2 file. To do this, run iTunes, click on the iPhone icon from the sidebar in iTunes. Press and hold left “alt” button (If you are restoring on Windows, press the “Shift” key) on the keyboard then Click “Restore” (Do not click “Update” or “Check for Update”) button in the iTunes. Release the “alt”/“Shift” key.
iTunes will ask for the location for your custom iOS 4.2 file. Select the recently created custom iOS .ipsw file and click “Open”.
Step 12: Wait till iTunes does the rest for you. Do not mess up with iTunes at this stage and be patient. This will install the new iOS 4.2 on your iPhone 3GS. Your iPhone’s display will show a progress bar indicating the progress of restore. When it is done, your iPhone will automatically reboot to the jailbroken iPhone 3GS running iOS 4.2.