Recovery Editor app

Discussion in 'macOS' started by Dalton63841, Jul 6, 2013.

  1. Dalton63841, Jul 6, 2013
    Last edited: Jul 6, 2013

    Dalton63841 macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #1
    I built an app in ApplescriptObjC to work with the Recovery partition. It could probably be improved a lot, but it does work. At the request of others I will post it here. Please for the love of all things sacred, read the whole post before using it. It has been tested on my machine to work with Lion, Mountain Lion, and Mavericks.

    It does use a signed Apple binary, as that is the only way currently that I know of to interact with the Recovery partition(in this manner) without breaking it. Because it uses a signed binary that is not my intellectual property, I will not distribute that file, but I will explain how to get it and add it to the app.

    ***Adding the binary that makes the application work***
    This step MUST be done before you use the app, or it will NOT work.

    1. Download the Lion Recovery Update. Make sure it is in your downloads folder.

    2. Now open terminal and do the following commands.
    Code:
    hdiutil attach -nobrowse ~/Downloads/RecoveryHDUpdate.dmg
    pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg ~/Desktop/Recovery\ Update
    3. Now on your desktop you will see a folder called Recovery Update. Inside that folder, is a file called RecoveryHDUpdate.pkg. Right click that file and click "Show Package Contents". Then you will see a folder called Scripts. Inside that folder is a folder called Tools. Open that folder. There you will see a file called "dmtest". Just move that Finder window to the side for now.

    4. Now download and unzip the Recovery Editor.app.zip file. Right click Recovery Editor.app and click "Show Package Contents". Open the Contents folder, then open the Resources folder, then open the Files folder.

    5. Now go back to the other Finder window, and copy the "dmtest" file into the Files folder.

    6. Delete the Recovery Update folder on your desktop. The app is now usable.

    ***Instructions for use***

    1. REBOOT! Throughout normal use, plugging in external drives or flash drives, the mount points can change. While there is a certain amount of error handling in this app, it is always safest to remove any flash drives or external storage and then reboot before using apps that tamper with mount points.

    2. Launch the app. Here you will see only 4 buttons. The first two have no options. Click and they run.
    2a. "Check Recovery Partition Status"
    After a new install, or after messing with partitions, this button will tell you yes there is a recovery, or no there isn't. Short and sweet. Most will probably find this one useless, but after multiple tinkerings I found it necessary to keep track.

    2b. "Destroy Recovery Partition & Reclaim Space"
    Just as it sounds. Some people prefer to not use a recovery partition at all. This removes it and adds that hard drive space back into the main partition.

    The last 2 will pop up a window to have you choose the InstallESD.dmg for the version of recovery partition you want. Most if not all know how to get the InstallESD.dmg from the installer. It's not a hidden file. If you don't know how to get the InstallESD.dmg a 5 second google will show you.

    2c. "Build/Update Standard Recovery Partition"
    If you don't have a recovery partition, this will make one. If you have one, but want to change the OS X version it recovers to, this will update it. This is identical to the factory recovery partition.
    It does take a few minutes to run, so just let it go.

    2d. "Build/Update Offline Recovery Partition"
    If you don't have a recovery partition, this will make one. If you have one, but want to change the OS X version it recovers to, this will update it. This one is special in that it can be used as an alternative to a flash drive installer. When you boot into it, you will see the exact same thing as with a flash drive installer. It works completely offline. It is recognized as a valid recovery, so FileVault and Find My Mac still work perfectly.
    The downside is that it does take up 5.5GB of space, so if hard drive space is short you probably don't want this. Also, building this type of recovery is VERY slow. On my 2009 model it takes almost 30 minutes to finish. That is because it has to make a copy of the original recovery system, write 5GB worth of install packages, convert the copy to a compressed read only image then THEN write that 5.5gb image to the recovery partition. It does finish though. Just get the app running and then go have some coffee.
     

    Attached Files:

  2. unobtainium macrumors 68000

    Joined:
    Mar 27, 2011
  3. Dalton63841 thread starter macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #3
    No problem! Let me know how it works for you. I've used it mostly to jump between different OS versions, like a flash drive installer without needing a flash drive.
     
  4. VMSwizard411 macrumors newbie

    Joined:
    Dec 12, 2010
    Location:
    Charlotte, NC USA
    #4
    Thank you for the efforts!

    For me, both this application and the recovery.sh script (output attached) fail because when the InstallBSD.dmg gets mounted, its name is

    Mac OS X Install ESD​

    but you're expecting it to be

    OS X Install ESD​

    I was able to easily hack my copy of recovery.sh so that it then worked in my case.

    The source InstallESD.dmg is coming from my copy of Install OS X Mountain Lion.app dated July 25, 2012 with a version of 1.3.12.

    Since the file chooser cannot go into packages, it might also be really helpful for some users if this application could allow choosing the saved copy of Install OS X [Mountain] Lion.app and you then look into the package for the needed dmg.
     

    Attached Files:

  5. Dalton63841 thread starter macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #5
    I knew it would end up being something like that to catch me... I'll tweak it a bit and make a new version when I have time.
     
  6. ssn637 macrumors 6502

    Joined:
    Feb 12, 2009
    Location:
    Switzerland
    #6
    Hi Dalton

    I really appreciate your work on this application, it's awesome!

    One question: Could you please modify it to allow for the inclusion of additional utilities (such as iPartition or iDefrag) from the boot menu? And making Safari visible (if it is not)? I tried adding these manually and modifying the associated .plist file but they're not showing up in the menu.

    Thanks

    Geoffrey
     
  7. jb510 macrumors regular

    jb510

    Joined:
    Sep 19, 2007
    #7
    Thanks for this! Worked perfectly to recreate a recovery partition I lost doing to format and fresh install from flash drive.
     
  8. mooninite macrumors member

    Joined:
    Oct 7, 2013
    #8
    No worky!

    When I run option #4, to create an Offline Recovery Disk, I get an error about being required to have 12GB free during the installation...

    Uh...

    i've got almost 3 TB free.

    Any ideas???
     
  9. Drzed macrumors member

    Joined:
    Oct 25, 2009
    #9
    Thank you SOOO much for this tool! I have tried countless other methods to create a recovery partition after an Apple tech stuffed up my HDD after a repair without success. I followed your instructions and it's worked! Couldn't believe my eyes when the iMac successfully rebooted and started Filevault encryption that I've been trying for nearly a year without any luck.

    Thanks again and your effort in posting all the details is hugely appreciated!:)
     
  10. kildjean macrumors regular

    kildjean

    Joined:
    Apr 16, 2005
    Location:
    Useless, TX
    #10
    Dalton;

    I followed all your steps... I ran the Recovery Editor, and the partition checker works great. So when I choose the offline recovery, it tells me it cannot mount InstallESD.dmg:

    Error! InstallESD.dmg failed to mount.

    Then it goes back to the main menu. I tested the .dmg and its working fine...

    Can you advice?
     
  11. pa-geographer macrumors newbie

    Joined:
    Oct 26, 2013
    Location:
    PA
    #11
    Hi Dalton,

    I'm having the same experience. I also tried mounting the .dmg then running the app again (choosing the third option to update the existing recovery partition) but still got the above error message. Using Mountain Lion 10.8.5.
     
  12. UliB macrumors newbie

    Joined:
    Oct 29, 2013
    #12
    Recovery Partition OS X 10.9.0 and 3,25 TB Fusion Drive

    Thanks a lot for your Recovery Editor!
    I just managed to upgrade my self-made Fusion Drive (although I read logical drives this size could not be repartitioned) with a recovery partition by running it with the InstallESD.dmg extracted from the Mavericks installer.
    Excellent! :D
     
  13. Kno-Blauch macrumors newbie

    Joined:
    Jul 29, 2011
    #13
    no errors shown but not working

    Hi,

    I followed your guide and it should have worked as described, it showed a progress bar but quit wothout any messages yet when I check again if there is a valid recovery partition, it says there isn't YET FileVault 2 AND find my mac are both successfully activated and working perfectly YET I can't boot into my recovery HD (I have a fuison drive self built in my MacBook Pro Mid 2009). Any help/ideas how to solve this?
     
  14. EskimOasis macrumors newbie

    Joined:
    Mar 1, 2014
    #14
    Many, many thanks!

    Dear Dalton63841,

    I registered to MacRumors only to thank you.
    I did run my MacBookPro for years without noticing that I didn't have any Recovery HD on my computer (for some mysterious reasons). And when my HD crashed last week, it was a pain in the ass, then making a clone of my old HD on the brand new installed HD inside my MacBook Pro didn't create a Recovery HD (neither an update from 10.9.1 to 10.9.2).

    Now, I am more confident since I have created my partion Recovery HD 10.9 thanks to you and your work.
    Thank you again and best from Paris (France).
    :)
     
  15. Edalincam55 macrumors newbie

    Joined:
    Jan 1, 2015
    Location:
    PK
    #15
    Pretty good post. I just stumbled upon your post and wanted to say that I have really enjoyed reading your posts.I've read your post and wish it again.
     

Share This Page