Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Boot another OS while OS X is hibernating System 10.4
A month ago, I started an "uptime race" with a friend (who is using a Windows XP PC). Since I'm using both Mac OS X (which is my main OS) and Linux, soon I was hating the idea of not being able to boot and use Linux. So I've come up with a simple (and obvious) way to boot Linux without losing my Mac OS X uptime.

Definitions and prerequisites
  1. Deep Sleep = Safe Sleep = Hibernate mode = Suspend to disk
  2. If your PowerPC Mac is not one of the latest 15- or 17-inch PowerBook G4s, you have to manually enable Safe Sleep, and it may not work on all models.
  3. Download one of the apps to go straight to Safe Sleep, like the widget DeepSleep or the script SuspendNow!. Actually, this isn't strictly necessary: you can also put your Mac to sleep and then remove the battery (on a laptop) or unplug the AC cord (on a desktop) to make it go to Deep Sleep.
Read on for two solutions to boot another OS without losing your running OS X session...

Editor's warning: If you're going to try this hint, please do so with a current backup, and at your own risk. I tried it on my MacBook Pro (see my note at the end), and it seems fine after a few trials. However, who knows what might happen when cycling between two OSes like this, so you're on your own if you proceed and your machine turns into a quivering blob of plasma...]

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.]
    •    
  • Currently 2.00 / 5
  You rated: 4 / 5 (5 votes cast)
 
[24,335 views]  

10.4: Boot another OS while OS X is hibernating | 17 comments | Create New Account
Click here to return to the '10.4: Boot another OS while OS X is hibernating' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Boot another OS while OS X is hibernating
Authored by: ghay on Mar 06, '07 07:36:31AM
I have rEFIt installed on my Intel MBP and can confirm that you can boot to other oses when waking from hibernation.

http://refit.sourceforge.net/


[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: clayhinson on Mar 28, '07 02:17:02PM

I have installed rEFIt (using the manual install - it's the only way to get the computer to wake up into rEFIt from Safe Sleep) and can confirm that you can start up OSX from there, and it will wake up your system and resume your session.

You can also start Windows XP from here (while OSX is hibernating), but after doing so, and shutting down, the system somehow loses the flag that tells it that it's hibernating, and OSX does a cold boot.

Does anyone have any more information on how to boot other OSes and then back into a hibernating OSX session with rEFIt?



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: diamondsw on Mar 06, '07 08:22:02AM

Apple specifically warns against this, as OS X has no way of knowing what has changed while it is in hibernation. Any changes made to the disk or nvram will very likely cause a failure to restore, a crash, or data loss.

But what's data integrity versus measuring how long your uptime is? :-p



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: marco.trive on Mar 07, '07 10:17:40AM

I'm not aware of any consequence that booting another OS and then waking a Mac from deep sleep might cause.
Of course, partitions and important Mac OS X files must NOT be changed while under another OS.
(I don't have write access from Linux on hfs+)

My uptime has reached 35 days (vs 30 days of my friend's Windows XP) but then I had to reboot after installing a kernel extension.

BTW I don't think that I'll reboot again until Leopard comes out.



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: DavidRavenMoon on Mar 07, '07 02:26:54PM

Uptime on OS X will be forever unless you reboot! I never crash, and until my SCSI card started preventing deep sleep, never shut my Mac down either.

I like rebooting though. Makes things run faster after having a dozen apps open all day. It also clears out a lot of temp and cache files.

---
G4/Digital Audio/1GHz, 1 GB, Mac OS X 10.4.8 • www.david-schwab.com • www.myspace/davidschwab • www.imanicoppola.net



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: neuralstatic on Mar 06, '07 08:51:13AM
either i'm crazy, or this can't be what he meant....
"Actually, this isn't strictly necessary: you can also put your Mac to sleep and then remove the battery (on a laptop) or unplug the AC cord (on a desktop) to make it go to Deep Sleep."
taking power away from a regularlyl sleeping mac can't make it write to the hard drive an impromptu hibernation session....

[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: googoo on Mar 06, '07 10:05:04AM

The hibernation information is written on the front end as the computer goes to sleep. See this article (written by none other than robg) on deep sleep.

-Mark



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: Watchful on Mar 07, '07 06:29:25AM

ALL modern macs basically hibernate when put to sleep. If power is not lost, it wakes up instantly. If power was lost, it will take a minute, but it will restore itself.

So yes, that is what he meant. If you remove power, the computer still has the hibernation image.



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: digitol on Mar 06, '07 06:49:11PM

I know it's ticky-tacky but, true mac users refer to the "alt" key as the COMMAND KEY or Apple Key. Alt is ugly. Alt is for the windoze world. Please help keep our world clean. :P



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: digitol on Mar 06, '07 06:51:49PM

i meant option key. is just option key not alt, ever. Period, end of story.



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: nickv2002 on Mar 06, '07 11:42:25PM

True, but only if you're using an Apple or other Made for Mac keyboard. The author might have been attempting to avoid any confusing for people with Macs using Windows style keyboards (of course, such people should know that Option is the same as Alt).



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: marco.trive on Mar 07, '07 12:25:38PM
I just wanted to be as clear as possible and I think that this is the only way to be clear to switchers and to powerusers.
alt = option
and
command = apple key

Apple note: http://docs.info.apple.com/article.html?artnum=24566

[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: marco.trive on Mar 07, '07 12:31:36PM
If someone is having problems with a corrupted/bad image that refuses to boot (==Mac doesn't awake from deep sleep) just enter open firmware (turn on your mac and immediately press command+alt+o+f) and write: setenv boot-image And then: mac-boot

[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: marco.trive on Mar 08, '07 02:38:40PM

Reboots fix things but I still think that relaunching the slowed-down app or loggin out and then logging in back fixes more or less everything...

BTW it's cool to boot Linux and then reboot OS X with all the stuff you were working on still there.

Bye!



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: Whosawhatsis on Mar 10, '07 06:55:09AM

This also works for booting in firewire target mode. Enter safe sleep, boot holding T, then restart when done. Of course, it's not a good idea to try to write to the drive in this way, but I don't see any reason you couldn't do this to copy files off of the machine as fast as possible (assuming no gig ethernet). Sure, IP over firewire is probably safer, but this is geekier and should be a bit faster.

---
I was offered a penny for my thoughts, so I gave my two cents... I got ripped off.



[ Reply to This | # ]
Boot two OSX's
Authored by: bumper314 on Mar 26, '07 05:42:21PM

I'm trying to use this hint to boot two different installations of OS X Tiger, without much luck.

Scenario 1) Two installs are on different partitions.
If I hibernate one installation then try to boot into the other (by holding down the option key during power up and selecting the second installation) it looks like it's going to boot (I see the grey screen with the apple logo), but then just resumes the hibernated partition.

Scenario 2) Two installs are on different physical drives.
If I hibernate one installation then try to boot into the other, I do succeed in booting, but when I go back to the first installation, it does a cold boot (doesn't restore the hibernated state).

Anyone else try either of these scenarios with success?



[ Reply to This | # ]
10.4: Boot another OS while OS X is hibernating
Authored by: leono on Oct 29, '07 02:28:34PM

Anyone have any luck getting this to work? My experience is that once you boot another OS, you can't get back to your sleep image.



[ Reply to This | # ]