5

The story

I use MacBook Pro from 2012. By default, the recovery partition is OS X Lion (10.7). It is pretty cumbersome to revert back to Lion and then to El Capitan when doing any reinstall, so here comes my question...

The question

How to update the recovery partition to the current operating system (El Capitan)?

  • Do you have to connect your Mac to the internet when using Recovery? – nc4pk Jan 10 '16 at 23:50
6

This applies to OS X Sierra also. Every time I update the OS the recovery partition is left untouched, or at least it appears to be. Long time ago, I searched for a solution and found this post which solved this problem. Read the first post in this thread, written by 'tywebb13'.

http://forums.macrumors.com/threads/yosemite-recovery-update-1-0-bug.1756752/

This instruction involves downloading Lion Recovery Update 1.0, and a shell script (you can create your own with the contents copy-pasted from below), and also an image of the latest OS X (in my case OS X Sierra 10.12.2) and copying a file from that downloaded image. Keep everything in ~/Downloads folder.

Detailed instruction quoted from the source with minor edits from myself: (the script file in Step 2 is also copy and pasted below this quote for completeness)

  1. Download the Lion Recovery Update from http://support.apple.com/kb/dl1464 . (And before you ask, YES. I mean LION recovery update!) Make sure it is in your downloads folder. Download the OS X Sierra or whatever latest version from AppStore. In Finder, go to Applications and look for the Sierra installation app. Right click on "Install Sierra.app" or whatever it's called in Finder, go to Contents/SharedSupport/ Copy or move the InstallESD.dmg file into your ~/Downloads folder.

  2. Download and decompress the file recovery.sh.zip from LINK 4unitmaths.com/recovery.sh.zip and move recovery.sh into your Downloads folder. This file can also be created by copy-paste from below source.

  3. Open Terminal and type the following two commands:

    chmod +x ~/Downloads/recovery.sh
    sudo ~/Downloads/recovery.sh
    
  4. Wait a few minutes for it to finish and return back to a prompt. Reboot with holding down the option key to test your 10.xx.x recovery partition.

This is the content of recovery.sh file from the source link (all credit to 'tywebb13' again):

read -p "Ensure "RecoveryHDUpdate.dmg" and "InstallESD.dmg" are in your Downloads folder and press [Enter]"

#access dmtest from RecoveryHDUpdate.pkg
rm -rf /private/tmp/RecoveryHDUpdate
echo "Expanding RecoveryHDUpdate.pkg"
hdiutil attach -nobrowse ~/Downloads/RecoveryHDUpdate.dmg
pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg /tmp/RecoveryHDUpdate

#access BaseSystem.dmg and BaseSystem.chunklist
echo "Expanding InstallESD.dmg"
hdiutil attach -nobrowse ~/Downloads/InstallESD.dmg

#build Recovery partition
echo "Building Recovery Partition. Please Wait"
/tmp/RecoveryHDUpdate/RecoveryHDUpdate.pkg/Scripts/Tools/dmtest ensureRecoveryPartition / /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg 0 0 /Volumes/OS\ X\ Install\ ESD/BaseSystem.chunklist

#cleanup
echo "Cleaning up"
hdiutil eject /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update
hdiutil eject /Volumes/OS\ X\ Install\ ESD/
sudo touch /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
sudo kextcache -f -u /
exit 0

Tested with Sierra 10.12.2 in December 22, 2016.

1

You don't need to do that. Instead of recovering from the partition, you could just re-download the OS from the App Store during recovery. To do this, just select a network as the first step of the recovery process and be prepared to log in using your Apple ID.

In the rare case that you would actually need to create an offline installer for OSX, you can do so by using the createinstallmedia command in the OSX Installer App. In short:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia \
   --volume /Volumes/MyUSBStick \
   --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

substituting /Volumes/MyUSBStick for whatever your USB stick is called. When you want to recover a Mac, just plug in the USB stick and reboot with the option key down and select the USB stick as boot device.

  • I believe that is the answer. You don't recreate the partition. In fact, you no longer need it. You recover directly from the app store. And the link was only provided as reference. – Krumelur Jan 11 '16 at 20:37
  • I rephrased the answer to make it clearer that the link provides reference to my claim that recovery no longer needs a partition. – Krumelur Jan 11 '16 at 23:06
0

macOS (since 10.12.4) Recovery mode now able to install latest compatible version.

Users holding Command-Option-R at startup will force a netboot, and will install the latest version of the operating system, up to date with all patches.

The previous recovery method, still done by hitting Command-R during startup, restores a Mac to the original version of macOS/OS X that that the machine shipped with, blogger Thomas Brand noted on Thursday. The original behavior had been in place since OS X Lion, which shipped in July 2011.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.