Friday, March 9, 2007

How to Boot another OS while OS X is hibernating?

The Easy Way (PowerPC and Intel)
  1. Power on your Mac and press Alt/Option
  2. Choose the system to boot
  3. If you choose Linux, when you'll shut it down and the turn your Mac on again, your computer will wake from deep sleep (just like nothing really happened).
The Geek Way (PowerPC only)
  1. Write down the number of the Mac OS X and bootloader (like Yaboot) partitions. In my case, I have Yaboot on /dev/hda2 and Mac OS X on /dev/hda12.
  2. Put your mac to Safe Sleep.
  3. Power on you computer and immediately press Command-Option-O-F. Note that if you have security mode set to "full," this step is not needed, as it will happen automatically.
  4. You will se a command prompt; just to be sure type printenv. If needed, insert your password. Now jot down the value of boot-device. In my case (Mac OS X is on the twelfth partition of my disk), it is /pci@f4000000/ata-6@d/disk@0:12,\:tbxi. Be careful! The value is not /pci@f4000000/ata-6@d/disk@0:12,\:tbxi \:tbxi; the line just says what the actual value is, plus the default value (\:tbxi).
  5. You now have to change boot-device to the value of the bootloader partition (or directly to the number of the Linux partition you only have two OSes). In my case:
    setenv boot-device /pci@f4000000/ata-6@d/disk@0:12,\:tbxi
    Be careful -- there's only one backslash.
  6. Type mac-boot and press Return.
That's it; you're done. When you're finishing using Linux, reboot and your Mac will wake from deep sleep just like nothing happened.

You may be wondering: why should I take the geek way? There are two reasons:
  1. You may want to show that even on a Mac you can do complicated things :)
  2. You have security mode set to "full," and the easy way doesn't work.
Please also notice that, with the geek way, you actually get feedback that your Mac is waking from Deep Sleep while, with the easy way, you won't. In the latter case, just be patient: your Mac has not frozen. Have fun and break every uptime record! By the way, I won the uptime race. Next round will be Leopard vs Vista.

[robg adds: Note that I tried this with my MacBook Pro and Windows XP in Boot Camp, and it did not work. When I first tried it, OS X was set to use Windows XP as the startup disk. When I pressed the power key from Deep Sleep mode (with or without the Option key held down), Windows would boot, seemingly leaving me stuck in Windows (since the Option key was being ignored). To get out of this loop, I set the startup disk (using the Apple-supplied Control Panel in Windows XP) to OS X and rebooted. When I did, OS X booted from a cold start, ignoring my deep sleep state.

Then I switched the startup disk in OS X to my OS X partition, and tried again. This time, when waking from deep sleep, the Mac simply woke from deep sleep, again ignoring the Option key. I tried various combinations, including restarting instead of shutting down in Windows XP, but all to no avail. So it seems, at least on my sample size of one unit, that this trick won't work on a MacBook Pro.]

No comments:

Your Ad Here