Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Boot from USB on a open firmware #mac

Enter into Open Firmware (hold down Command+Option+o+f when power on), and type:

boot ud:,\\:tbxi

Connecting Internet via Mobile Phone(GPRS)


  • a computer with Mac OS X
  • a mobile phone with GPRS and USB/Bluetooth modem support
  • a CMCC account with GPRS

Modem Script

The software GSG (GPRS Script Generator) can generate the required GPRS Scrpt for you.

(You need to change APN from cmnet to cmwap for using cmwap. Motorola phones may need to change PDP context ID from 1 to 2 or 3. I am using a Moto E2 phone and changed this value to 3 and it works.)

You can also manually download the required script and put it into /Library/Modem Scripts/.

Modem Setup

USB Modem

In Moto E2, Main Menu --> Settings --> Connections: Modem --> USB Modem, USB Setting --> Modem. Then just plug it in. Then go to System Preferences --> Network to set up the USB modem.

Bluetooth Modem

I haven't tested it. But it should work. In your phone, enable Bluetooth modem, then bond your phone to your computer. Mac OS X has a bluetooth device setup guide.

Dial number

*99***3# (since my PDP Context ID is 3. Usually the dial number should be *99***1#.)

Username/password is mobile.


Since we are using cmwap, we need to set proxies in network settings. Select proxy and change the value to (for all protocols). Also, don't forget to set it in your browser.

User agent

In some area, China Mobile forbids your connection for certain user agents. You may need to set your user agent infomation to something like nokia.

In firefox, type in about:config, change the value of general.useragent.extra.firefox to Nokia. Or use the add-on User Agent Switcher.

Additional notes

Adding this in /etc/ppp/options:


(Otherwise, the connection seldom succeeds.)

cmnet also work! :-)

Bandwidth saving

In firefox, use about:config and set the value of network.prefetch-next to false (the default value is on).

BlockFlash and ImgLikeOpera are good add-ons.

-- by Jakukyo Friel <> and under GPL v2

By default, this iBook G4 supports suspending to RAM. We need to modify the open-firmware setting to add support of suspending to disk:

sudo nvram nvramrc='" /" select-dev
" msh" encode-string " has-safe-sleep" property
sudo nvram "use-nvramrc?"=true

You must now restart the Mac for the settings to take effect.

View the current sleep mode:

; pmset -g | grep hibernatemode

Available modes:

Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake. This is the default mode for iBook G4.
Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically. Apple call this safe sleep.
This is the same as mode 1, but it’s for those using secure virtual memory (in System Preferences -> Security).
This is the same as mode 3, but it’s for those using secure virtual memory.

If you want to use hibernation, make sure you have an amount of space equal to your machine’s RAM, plus another 750MB. Then use pmset to change the mode:

; sudo pmset -a hibernatemode 5

If at a later time you want to disable hibernation, you can recover disk space by removimg the sleep image:

; sudo rm /var/vm/sleepimage

When in mode 3/5 (pure hibernation), the machine turns power off and you can even change your battery without losing data! Of course the breathing light stops breathing and you need to press the power button to wake up the machine.

Stop shuting down in favor of hibernation!

-- written by Jakukyo Friel <> and under GPL v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment