prevent sleep when booted in recovery mode or from usb drive?

I like to boot my mac in recovery mode (or from an external usb) so that I can do a clean disk copy and make a clone of my entire drive while nothing is running from it. I attach an external firewire or thunderbolt drive, and use DiskUtility to copy the disk. This used to work great pre 10.8, but now the system goes to sleep part way into the disk copy, thereby interrupting the process. This is very annoying. I've searched other threads and found a couple people who asked about this and got responses w instructions on using the energy saver system preferences panel, but that doesn't help, because the energy prefs panel is not available in the minimally-configured recovery-mode version of 10.8.

Any ideas how to keep the system from sleeping?

MacBook Pro, OS X Mountain Lion (10.8.2)

Posted on Oct 19, 2012 5:50 AM

Reply
5 replies

May 23, 2016 10:03 AM in response to rex wilson

I have El Capitan

The caffeinate command doesn't work or any pmset command because to enter disk utility in order to make de image file, you have to exit terminal and when you exit terminal, all commands are terminated (caffeinate or pmset) and you are back to square one.


There must be a way to prevent the machine from sleeping PERMANENTLY while in recovery mode otherwise, it is useless, you can't babysit the machine for four hours or more to prevent it from sleeping.

Nov 1, 2012 10:12 PM in response to rex wilson

I think I found a way to solve your issue:


http://apple.blogoverflow.com/2012/07/interesting-new-unix-commandsbinaries-in-o s-x-mountain-lion/


The command you're looking for is caffeinate. Just open a Terminal window and execute.


I just invoked the command to keep a file copy (from my previous Mac's Time Machine volume to my new system's hard drive, as opposed to its SSD) going overnight. Prior to this, I had to babysit the system to keep it from falling asleep and pausing the file copy. The true test will be whether my computer is still alive and copying an hour after I hit the Add Reply button here...I'll report back if it works/doesn't work.


I would have invoked the command-specific option of caffeinate, but the file copy has been running for awhile, so I just told my Mac to caffeinate itself for 36000 seconds (10 hours). Should be enough to cover me for this action. I imagine that you'd have to use the timed version of caffeinate for anything running through the GUI, since I haven't yet found a way to invoke, say, Disk Utility from the Terminal.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

prevent sleep when booted in recovery mode or from usb drive?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.