Daily Tip: How to fix iTunes restore errors by manually editing host files on your Mac

Getting the dreaded "This device isn't eligible for the requested build" error when trying to install an iOS 5 beta, and wondering how to edit your hosts file to get around the problem? Host files can often be used to resolve issues with an iTunes restore, even those that happen due to SHSH saves on jailbroken devices. Follow along for a quick walkthrough, and I'll show you how.

If you're getting an iTunes restore error message, first you'll want to make sure your host file is the problem. As a side note, I am only demonstrating this on a Mac as I don't have a PC but much of the same commands and edits can be done through command prompt on a PC as well.

  1. Open Terminal
  2. Type in ping gs.apple.com and hit Enter
  3. If you see something other than 17.112.176.11: bytes=32 as the reply, you'll need to edit your host file, so continue to the next section.
  4. If you do see the above, you may want to try forcing your device into DFU mode and then restoring. Or try restoring from a different computer as that seems to work sometimes. Your host file is not causing your restore to fail. Something else is causing it.

If you "do" need to edit your host file, follow the steps below to do so.

<

ol>

  • Right click on Finder in your dock and select Go to folder...
  • In the prompt, type /private/etc and hit Ok
  • You may be prompted to enter your password while editing or accessing some of these folders. Simply type in your admin password if asked.
  • Drag the Hosts file from the /etc folder to your desktop and then open it with TextEdit or a simliar program
  • You will need to add the following text to your host file: 74.208.10.249 gs.apple.com (refer to the screen above)
  • Save the file and drag it back into the /etc folder where you originally pulled it from (choose to overwrite or replace if asked)
  • Now we just need to flush the cache in order for the changes to take effect. Open Terminal again and type in dscacheutil -flushcache and hit enter. (The command prompt entry for Windows users is ipconfig /flushdns
  • You should now be able to restore your device in iTunes without any issues.
  • Tips of the day will range from beginner-level 101 to advanced-level ninjary. If you already know this tip, keep the link handy as a quick way to help a friend. If you have a tip of your own you’d like to suggest, add them to the comments or send them in to news@tipb.com. (If it’s especially awesome and previously unknown to us, we’ll even give ya a reward…)

    Allyson Kazmucha

    Help and how to editor for iMore. I can take apart an iPhone in less than 6 minutes. I also like coffee and Harry Potter more than anyone really should.

    More Posts

     

    0
    loading...
    3
    loading...
    0
    loading...
    0
    loading...

    ← Previously

    Apply selective coloring to your photos with Color Range for iPhone and iPad

    Next up →

    Iterate 3: Prototypes

    Reader comments

    Daily Tip: How to fix iTunes restore errors by manually editing host files on your Mac

    10 Comments
    Sort by Rating

    Or you could just edit it in since your already in the terminal.
    sudo nano /private/etc/hosts
    press control-o to save
    press control-X to exit editor

    i did all what u said still doens't work for me. I'm tryin to upgrade 4.3.3 iPad1 3g + WiFi to 5.0.1 please HELP !!!! used pwanage tool used redsnow. I seriously give up on this because i have never faced such problem earlier. Please reply on my email if possible.

    Delete the 74.208.10.249 gs.apple line. This should allow connection to the real apple servers! If not delete the whole host file

    P S : also when i ping it says connection timed out.
    PING gs.apple.com.akadns.net (17.171.36.30): 56 data bytes
    Request timeout for icmpseq 0
    Request timeout for icmp
    seq 1
    Request timeout for icmpseq 2
    Request timeout for icmp
    seq 3
    Request timeout for icmp_seq 4

    Delete the 74.208.10.249 gs.apple line. This should allow connection to the real apple servers! If not delete the whole host file

    This worked for me. Even though my host file was already the "74.208.10.249 gs.apple.com" - I deleted it and retyped it higher up than where it was originally posted. I also had a "#127.0.0.1 gs.apple.com" below it that I just deleted. Worked great!