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.
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.
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.
Attachments
Last edited: