rex wilson

Q: 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

Close

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

  • All replies
  • Helpful answers

  • by iansltx,Solvedanswer

    iansltx iansltx Nov 1, 2012 10:12 PM in response to rex wilson
    Level 1 (10 points)
    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.

  • by rex wilson,

    rex wilson rex wilson Nov 2, 2012 3:36 AM in response to iansltx
    Level 1 (75 points)
    Nov 2, 2012 3:36 AM in response to iansltx

    excellent find! thank you very much.

  • by btesser,

    btesser btesser Aug 12, 2013 6:33 AM in response to iansltx
    Level 1 (0 points)
    Aug 12, 2013 6:33 AM in response to iansltx

    To launch Disk Utility from the terminal type:

    /Volumes/[Your disk name]/Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility

     

    Thanks for the tip on caffeine

  • by Scartaris7,

    Scartaris7 Scartaris7 May 23, 2016 10:03 AM in response to rex wilson
    Level 1 (4 points)
    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.

  • by Eric Root,

    Eric Root Eric Root May 24, 2016 8:21 AM in response to Scartaris7
    Level 9 (70,250 points)
    iTunes
    May 24, 2016 8:21 AM in response to Scartaris7

    You might want to consider starting a new discussion. Since this one is a couple of years old, less people are likely to look at it. You can link to this one.