iPhoneLinux on the Mac

INFO: This post is now slightly irrelevant and does not work very well, so I wouldn’t recommend using it.

DISCLAIMER: This is recommended for advanced users only. It is probably a bad idea to follow this tutorial if you’ve never opened Terminal before. That being said, this should be relatively easy for most power users.

DISCLAIMER²: Neither I nor the iPhoneLinux team are responsible for any damage to your iPhone through the use of this tutorial. The tutorial does, however, contain a guide on how to back up your NOR just in case something does go horribly wrong (which is extremely unlikely).

The iPhoneLinux team has recently come up with an impressive demo of Linux on the iPhone. Unfortunately, the binaries and instructions included are Linux only. When it came out, I was able to modify the client slightly to allow OpeniBoot to be installed and used from a Mac, and as a bonus I removed the root requirement. Anyway, I just compiled the most recent client build and I’d like to share it with you! I have not yet been able to build OpeniBoot myself, which means we’re stuck with a slightly old build (no file system writing) UPDATE: I was just able to build OpeniBoot myself, but the client cannot seem to connect to it… we’ll have to stick to this for now.

Soon-To-Be Frequently Asked Questions:

- What will this work on?

The original 2G (1G) iPhone, the new iPhone 3G, and the original iPod touch first generation. This will NOT work on the second generation iPod touch (with speakers and volume control) If you need help finding out which iPod touch you have, visit Apple’s support site.

- I hate using a boot menu on startup and Linux sucks. How can I get rid of this?

Launch the OpeniBoot client in Terminal and on the iPhone and run the ‘uninstall’ command. Once it reports that is is done, run ‘reboot’, and you should boot right to the Apple OS.

- Who made this awesomeness??

The awesome iPhoneLinux dev team, lead by planetbeing and other dev team members (but not directly affiliated with the iPhone dev team).

- What is this going to change about my phone/iPod?

It will add a boot menu whenever you turn on, and add the capability to boot Linux kernels on your iPhone via the console.

- What can I do in Linux? Does it support Wi-Fi? How many games can I play?

Linux is currently at a demo-only stage, once it’s booted, all you can really do is use a terminal from your computer. You can’t yet use the multitouch screen to interact in any way, and you can’t yet use WiFi. However, it’s pretty cool to any geek, and the team is working hard on new and exciting features in the form of drivers.

- Help! My iPhone won’t boot!

If your iPhone won’t boot after installing OpeniBoot, it’s likely you need to launch the console again and run “setenv auto-boot true” and then “saveenv”. If it still boots to recovery, you may need to uninstall OpeniBoot as above and then restore your phone.

- What else can I do in the OpeniBoot console?

Not much, but there’s some cool stuff. Type ‘help’ for all of the commands. You can mess around with most of it, just avoid things that seem like they’d change something like anything having to do with “write”, especially the NOR. I don’t know what a lot of the stuff does, but basically anything UNDER nor_erase is fair game (and pretty self explanatory), plus the stuff at the top. If you need to know the syntax of a command, just type the command with no arguments. Examples: Change the display color with “bgcolor 0 200 0″, list the files in your root with “fs_ls 0 /”, or find your battery voltage with “pmu_voltage”.

- Does my iPhone need to be jailbroken to use this?

No, this is much lower level than a jailbreak and you can try out OpeniBoot with no jailbreak.

EDIT: As Will (ChronicProductions) points out in the comments below, you do need to have used PwnageTool or QuickPwn to be able to do this. No wonder I was having so much trouble on my virgin iPod touch ;) You can find PwnageTool and QuickPwn from the iPhone Dev Team’s blog.

- Will this break my phone?

Probably not, it is highly unlikely something bad will happen. However, to stay on the safe side, don’t touch any OpeniBoot commands if you don’t know what they’ll do (especially ones that have to do with the nor), and back up your NOR as described below in the installation process.

- ?????????

If you have another question, feel free to ask in the comments!

Without further ado, you can download the necessary files here.

OpeniBoot set-up:

1. Open Terminal and navigate to the iphonelinux-mac directory by typing “cd ” (note the space after cd) and then dragging the iphonelinux-mac folder to the Terminal window and pressing return.

PLEASE NOTE: While you no longer have to be root to use these utilities, you DO need to be in an Administrator account. If you know the password of an administrative password but do not want to switch users, type “su THENAME” where THENAME is replaced with the administrative user account. You will be prompted for your password. Although you do not see dots or asterisks appearing as you type, it IS recognizing your password. Do not be alarmed if nothing happens while you are typing.

2. Put your iPhone/iPod into recovery mode. If you need help with this, visit http://www.iclarified.com/entry/index.php?enid=367

3. In your terminal window, enter “killall iTunes; killall iTunesHelper” and press return. This will avoid iTunes messing with your phone. If you want iTunes’ autosync feature back, simply restart your computer (or log out and back in) You will need to have the USB libraries before you can use loadibec, so copy them by running “sudo cp libusb.dylib /usr/local/lib/libusb-0.1.4.dylib”. Once again, you will be prompted for your password. Nothing will appear while you are typing it, but it IS registering. Press return when it is complete.

4. Load OpeniBoot onto your phone by typing “./loadibec openiboot-” followed by 2g.img3 if you’re on a first generation iPhone, 3g.img3 if you’re on an iPhone 3G, or ipod.img3 if you’re on an iPod touch (first generation only!). Hit return. If this returns nothing, try restarting your iPhone and trying again.

5. Sit back and admire poorlad’s pretty interface on your iPhone. This will be your new boot menu.

6. In your Terminal window, type “./oibc” but do NOT hit return yet. Press the power button so that OpeniBoot console is selected, and press the home button to enter it. While the text is still scrolling, press the return button to enter the OpeniBoot client. This may take several tries, you can’t press return too early or too late or it won’t work. I have to do it several times to get it going.

7. We will now take a backup of your iPhone’s NOR memory to avoid disaster. In the OpeniBoot client, type “help” just to make sure everything is working. You should see a long list of commands. Now type “nor_read 0×09000000 0×0 1048576″ to read it into memory, and press return. Wait for it to return “Done.”. Then type “~norbackup.dump:1048576″ to send the file to your computer. You might want to keep this file safe, just in case.

8. Install OpeniBoot! Type “install” and wait for the install complete message. Once it’s done, enter “reboot”.

9. Now we’re going to upgrade to the latest version of OpeniBoot I have. We can’t install this directly, as it appears to be some sort of upgrade-only version. Enter the OpeniBoot console just as you did before (although the timing is much easier now), and send the updated OpeniBoot with the command “!openiboot-THEDEVICE.bin” where THEDEVICE is replaced with 2g, 3g, or ipod. Run “go 0×09000000″ to launch it.

10. Once again, type ./oibc into Terminal and launch the console from the iPhone and quickly hit return in the Terminal to connect.

11. Type “install” to upgrade, and wait for the done message. To make the Apple OS boot properly, type “setenv auto-boot true” and hit return. (This is case sensitive, as I learned the hard way. My phone wouldn’t boot without a manual fsboot for a day until I realized I was typing TRUE instead of true) Then use “saveenv” and wait until you see “Environment saved”. Then “reboot” and you’re in a newer version of OpeniBoot! To boot into the iPhone OS, just press the home button.

Linux time!

It’s finally time to run Linux! Follow the steps below.

1. Once again, enter the console. I’m sure this is becoming second nature to you by now.

2. Now we’re going to send over the files required for Linux to boot, the kernel and userland. To send over the kernel, run “!zImage”. Then place it in memory with “kernel”. Send the userland with “!rootfs.arm.ext2.gz” and place it in memory with “ramdisk 3588″.

3. Time to boot! Run ‘boot “console=tty console=ttyUSB root=/dev/ram0 rw”‘ Linux is now booting!

4. Your oibc session will close. Run ./linux to communicate with Linux. You can log in with either the username ‘root’ or ‘default’.

5. If you’d like to see what you’re typing on your iPhone’s screen, run “sh 2>&1 > /dev/tty0″.

Mess with Linux! To reboot, run ‘reboot’.

FINAL NOTE: If you have any questions, read the full FAQ before asking. This tutorial was derived from planetbeing’s original tutorial from ORIGINALREADME in the archive you downloaded. The README file was distributed with the upgrade package, which added the uninstall feature.

Popularity: 10% [?]

This entry was posted in iPhone. Bookmark the permalink.

46 Responses to iPhoneLinux on the Mac

  1. chronic says:

    yo dude,

    just to note, you say it is lower level than jailbreak, which is is in the term ‘jailbreak’, but you still need to be Pwned. without your phone being Pwned, it won’t run unsigned code, and that is what OpeniBoot is :P

    Here is a little guide to utilize the Pwnage 2.0 stack overflow to run OpeniBoot:
    1. Get a patched iBSS and iBEC from a Pwned ipsw
    2. Use xpwntool to unpack the iBSS, but not the iBEC
    4. Kill iTunes Helper and iTunes
    5. Plug in your device in DFU Mode
    6. Go to System Profiler and USB, then make sure under “Apple Mobile Device (DFU Mode)” has the device ID of 0×1222, NOT 0×1227. If it is 0×1227 then you probably did not kill iTunes and / or iTunes Helper
    7. Get geohotz ‘iRan’ tool. It’s for windows, but with a mac libusb you can get it to build and work
    8. Use ‘iRan’ to upload the patched iBSS
    9. Since the ‘iRan’ tool exploited the stack overflow in the bootrom to get it to run the patched iBSS, we can now use iRecovery from http://chronicdev.googlecode.com/svn/trunk/iRecovery/ to send the patched iBEC with no problems, since signature checks are patched out :)
    10. use “./iRecovery -f Patched-iBEC.bin” to send the patched iBEC
    11. spawn a shell with iBoot using “./iRecovery -s”
    12. send it the “go” command
    13. type “/exit”
    14. send openiboot.img now with “./iRecovery -f openiboot.img3″
    15. type “./iRecovery -s” to spawn a shell again
    16. type “go”
    17. type “/exit”
    18. now, type “./oibc”
    19. openiboot client should now be running. select “console” on your device screen
    20. great job! :)

    Now, in a more practical sense, it would be MUCH easier just to use QuickPwn for this, especially because if you are not Pwned then you need to do all of these steps every time you want to load OpeniBoot, so if you ever plan to reboot you might as well just Pwn your device :)

  2. Thomas Ring says:

    What I discovered is that if you run ./oibc before opening the console, that works too

  3. Simon Brix says:

    Thanks alot for the tutorial. There is just one thing I don’t know how to do.

    “To send over the kernel, run “!zImage”. Then place it in memory with “kernel”.” How do i place it in the kernel ?

  4. Andy says:

    I got a bricked iPhone from my friend for a few bucks and wonderd if there is a way to get it working again.
    The process was caused by him trying to use redsn0w wo upgrade it.
    I get an ipwne flash screen that changes to the iphonelinux.org flash and stays there.
    I’m using mac because it actually finds the phone, but can’t restore from itunes.
    Any tips?
    Oh, I’m not scared of cli and am platform agnostic.
    Thanks

  5. shaqeezy says:

    i tried to install openiboot on my iphone but a message in the terminal says ‘cannot exercute binary file’ please HELP!!!

  6. Pingback: How to: Install Android OS on iPhone 2G

  7. Pingback: HOW TO: Install Android On An iPhone 2G | Android Addicted

  8. Pingback: HOW TO Install Android On An iPhone 2G | The Smart Gadget

  9. Pingback: Cara Instal android ke sebuah iPhone 2G | Tarikkabel.Com

  10. Angus says:

    It is actually a nice handy bit of details. Therefore i’m glad that you just shared this valuable details with us. You should keep informed like that. Thank you for sharing.

  11. Pingback: HOW TO: Install Android On An iPhone 2G | DroidZeus

  12. WinX Blog :: iPhone
    :: iPhoneLinux on the Mac

  13. WinX Blog :: iPhone
    :: iPhoneLinux on the Mac

  14. Ali says:

    hi! I’ve installed openiboot and reboot after that then trying to install idroid bud fails so I turned off my iPhone but it doesn’t turn on and doesn’t show anything!!:’( what can I do now??????

  15. The rest of the page, or the body is the part seen by us humans. The importance of meta tags is often overstated when optimizing a website for search engines. Even if you do not want to run your own online diary, you can always hire a professional blogger to write content for you. You can even collaborate with the companies marketing and promotion of blogging sites that not only would take a regular writing for your blog, but also add new articles for social networks (which in my experience leads to good traffic).. space jams for sale http://www.google.co.ve/webmasters/tools/richsnippets?url=run2013.org/ceshi14.html

  16. Audry says:

    Now days hotels in delhi has glued towards the new concept of college accommodation
    auction in India through Indian hotel auction website Bid2Travel.
    Also for the reason that middle paragraph, I would describe a few other
    accomplishment of mine that demonstrates that I have the relevant skills they’re looking for.
    If you have things like mini bars and pay per view television, the software should cope with those and should let you run stock checks on any physical items that need you to keep a close watch on them.

  17. Pingback: Lancel Pas Cher i aait ps de faciite po donne des expications à ton fis | fr5s812nd

  18. Pingback: d ministe de a défense et d ministe de ‘économie Sac Lancel Pas Cher | fr5s812nd

  19. Oh my goodness! Impressive article dude! Thank you so much, However I am experiencing difficulties with your RSS.

    I don’t understand why I am unable to join it.
    Is there anybody else getting similar RSS issues?

    Anyone who knows the solution can you kindly respond?
    Thanx!!

  20. Pingback: louis vuitton outlet canada The NBA’s income has improved by 500spun1 | Prom Runway

  21. Pingback: He a little bit

  22. Pingback: David Moyes It cou

  23. I am sure this paragraph has touched all the internet users, its really really good paragraph on building up new blog.

  24. I every time spent my half an hour to read this blog’s articles or reviews everyday along with
    a mug of coffee.

  25. My family members all the time say that I am wasting my time here at
    web, except I know I am getting familiarity every
    day by reading such pleasant articles or reviews.

  26. One thing I’ve noticed is always that there are plenty of common myths regarding the banking
    companies intentions whenever talking about
    foreclosed. One myth in particular is always that
    the bank would like your house. The financial institution
    wants your hard earned money, not your property. They want the money they lent you with
    interest. Keeping away from the bank is only going to
    draw some sort of foreclosed summary. Thanks for your publication.

  27. Laurene says:

    If you would like to get a good deal from this post then you have to apply such strategies to your
    won web site.

  28. irs levy says:

    And after you know that, you really need to focus on your opponents.

    However, maybe that is why they are commentators and not players.

    All the action starts again with the small blind and everyone left has the
    option to call, raise or fold.

  29. For this reason along with other activity focused classes
    are a much better choice for instructing young children languages.
    “My whole head went flying to the side,” she explained.
    Since it is an MMO (Massively multiplayer online) game, kids will have to team
    up with their friends to help astronauts succeed in their Moon mission.

    Also visit my blog :: farm heroes saga play online free

  30. Catherine says:

    hi!,I love you writing very a lot! share we keep up a correspondence
    extra approximately your article on AOL? I require ann expert in this
    space tto resolve my problem. Maybe that’s you!
    Taking a look fforward to peer you.

    Feel free to surf to myy web page; como pedir vigrx plus en linea
    (Catherine)

  31. cat tree says:

    Howdy! This post couldn’t be written any better!
    Reading this post reminds me of my good old room mate!

    He always kept talking about this. I will forward this article to him.
    Pretty sure he will have a good read. Many thanks for sharing!

  32. Cammy says:

    Amazing blog! Do you have any recommendations for aspiring
    writers? I’m planning to start my own blog soon but I’m a
    little lost on everything. Would you propose starting with a free platform like WordPress or go for a paid option?
    There are so many choices out there that I’m totally confused ..
    Any suggestions? Cheers!

    Feel free to surf to my blog Cammy

  33. I am sure this post has touched all the internet visitors, its really really pleasant paragraph on building up new weblog.

    Feel free to surf to my homepage – Cheapest Car Insurance In PA

  34. I went over this website and I think you have plenty of excellent info, saved to bookmarks.

  35. Pretty nice post. I just stumbled upon your weblog and wished to say
    that I have really enjoyed surfing around your blog posts.
    After all I’ll be subscribing to your rss feed and I hope you write again soon!

    Also visit my web page … cookware reviews

  36. I always emailed this web site post page to all my
    contacts, because if like to read it afterward my
    contacts will too.

    Also visit my page … noah telecharger

  37. I always used to study article in news papers but now as I am a user of web therefore from now I am using net for
    articles or reviews, thanks to web.

    My homepage: enemy telecharger

  38. If you want to grow your know-how just keep visiting this website and be updated with the newest gossip
    posted here.

    Also visit my site :: grand piano telecharger

  39. Hi to every one, because I am actually keen of reading this website’s post
    to be updated regularly. It carries pleasant stuff.

    my blog – breathe in telecharger

  40. s3mo says:

    How to Tell the Difference Between a True and Fake Chanel Bag How to Tell the Difference Between a Real knock-offmanufacturers and a strict policy for repairing Chanel handbags. How to Cleanse Canvas How to Clean Chanel Canvas Share Type carrying a Chanel company logo obviously different from the one Louis Vuitton uses that it’s an easy thank you. When purchasing a classic Chanel purse or piece of luggage, people as being a necessary part of a new wardrobe. There was a time in the United States if you could the exceptions, as these CC images are right side in place. Vacuum cleaner with wand bond Soft cotton cleaning as well as labeled a bag Chanel 5233 Shiny Black Grey Gradient Oval Sunglasses by using something called a model number.

  41. Hi, everything is going perfectly here and ofcourse every one is sharing facts, that’s genuinely fine, keep up writing.

    Here is my webpage … driver genius professional 14 crack

  42. I’m gone to inform my little brother, that he should also pay a visit this webpage
    on regular basis to get updated from latest news.

    My web page Survie Bibliothèque

  43. Louisa says:

    Michael claims that he is proud that Farrah may have finally
    found her calling and says that it isn’t what you do but how you do
    it. Their life may revolve around their next fix, just like any
    other addict. Los Angeles, CA, where Dorothy Stratten was killed.

    My webpage; mangar porno [Louisa]

  44. zquiet says:

    Hi there Dear, are you actually visiting this web site daily, if so afterward you will absolutely take nice experience.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>