Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mac-hacks

macrumors regular
Original poster
Jan 14, 2011
118
0
Swimming In Tsunami
Prerequisites:
OS X Mountain Lion.app
Lion Recovery Update v1.0
LuggagePackages

* To Avoid Permission Issues. Create Root Account and Login as Root when your ready to start guide.
* Google it if you do not know how create root account
* Your apps need to be set with following permissions: drwxr-xr-x root admin )
* This guide will only show you how to customize BaseSystem.dmg. How you use it will be up to you.
* IMPORTANT"There only 123.5 MB available space on RecoveryHD."
* You have 2 options if want to use RecoveryHD on your disk.
A) Keep 3rd party apps under 123.5 MB. If this is path you choose, delete BaseSystem.dmg normally in /dev/disk0s3 aka "Recovery Partition" and replace it with the one from guide.
B) Know how to add space to partition, I will not show you in this guide. I may get to it at later date.

____________________________________________________________


1) Copy and Paste Utilities.plist we need to Hack to desktop.

* Commands below assume "OS X Mountain Lion.app" is in /Applications. Change path if you need to.

Code:
$ hdiutil attach /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/InstallESD.dmg  
$ cp /Volumes/Mac\ OS\ X\ Base\ System/System/Installation/CDIS/OS\ X\ Utilities.app/Contents/Resources/Utilities.plist ~/Desktop

* Create Project folder and name it Recovery. Add another folder named inside of it. Name it RecoveryHD:

Code:
$ mkdir /tmp/Recovery
$ mkdir /tmp/Recovery/RecoveryHD && cd /tmp/Recovery/RecoveryHD

2) Preparation:

You will only have 100 MB by default. We add 1GB to .dmg, you can add more if you need it.

Locate Applications and paths for source files.

You will need to run mdfind for each app.

Open terminal and run:

Code:
		$ mdfind "application name" 
		# You may need to run $ mdfind "Company-Name-for-Software"
Example:
Code:
$ mdfind Disk Warrior
# You should see lines like below with directories. You will need save output from terminal window to txt file. 
		
/Applications/DiskWarrior.app
/Users/~/Library/Preferences/com.Alsoft.DiskWarrior.prefs

Open TextEdit.app or Notes.app and copy paths and save this text file we will need it shortly..

3) Time to Hack:

Open text editor or Xcode we need add "BundlePath", "Application.app", "Path", "TitleKey", and "name" to Utilities.plist for each Application you want to add GUI Menu/ RecoveryHD.

To find "Path" -> "String", use "control + click" -> "Show Packages" -> navigate to /Contents/MacOS/"name-of-app".

Example:
Code:
		<dict>
			<key>BundlePath</key>
			<string>/Applications/DiskWarrior.app</string>
			<key>Path</key>
			<string>/Applications/DiskWarrior.app/Contents/MacOS/DiskWarrior</string>
			<key>TitleKey</key>
			<string>DiskWarrior</string>
		</dict>

Copy and paste to bottom Utilities.plist found on ~/Desktop.

Screen-Shot-2013-01-08-at-8.57.51-AM.jpg


*** "SignatureCheck"* add "-skipSignatureCheck 1" Argument to <key- Path -> for all apps you plan to RecoveryHD Menu.
* Very Important and do not skip this!!!

Code:
		<key>Arguments</key>
			<array>
				<string>-skipSignatureCheck 1</string>
			</array>
			<key>BundlePath</key>

Example how should look like with Xcode.

Screen-Shot-2013-01-08-at-6.01.38-PM.jpg


4) BaseSystem:

* Create tmp folder for hack BaseSystem.dmg :

Code:
$ mkdir /tmp/Recovery
$ mkdir /tmp/Recovery/RecoveryHD
$ hdiutil attach /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/InstallESD.dmg
$ hdiutil convert /Volumes/Mac\ OS\ X\ Install\ ESD/BaseSystem.dmg -format UDRW -o /tmp/Recovery/BaseSystem.dmg
# Skip next line if you plan to re-size RecoveryHD or use dmtest to repackage ReccoveryUpdate.
$ cp -r /Volumes/Mac\ OS\ X\ Install\ ESD/mach_kernel /Volumes/Mac\ OS\ X\ Base\ System\
$ hdiutil eject /Volumes/Mac OS X Install ESD
$ hdiutil resize -size 2g /private/tmp/Recovery/BaseSystem.dmg
$ hdiutil attach /private/tmp/Recovery/BaseSystem.dm
* Add Utility Software and Source files to BaseSystem.dmg:

Code:
$ cp ~/Desktop/Utilities.plist /Volumes/Mac\ OS\ X\ Base\ System/System/Installation/CDIS/OS\ X\ Utilities.app/Contents/Resources/Utilities.plist

Add Applications and Source Files:

* Replace Utilities.plist with Hack Version:

* Copy source directories paths to match same paths on Mac OS X Base System.
* Use Paths from mdfind data we copied to .txt file.

Code:
$ cp -r /Applications/"Name-Of-Software"app /Volumes/Mac\ OS\ X\ Base\ System/Applications
$ cp -r /Library/Application\ Support/"Name-Of-Software" /Volumes/Mac\ OS\ X\ Base\ System/Library/Application\ Support
Example:
Screen-Shot-2013-01-08-at-6.35.49-AM.jpg

Code:
$ cp -r /Applications/SpeedTools\ Utilities\ Pro.app /Volumes/Mac\ OS\ X\ Base\ System/Applications
$ cp /Library/Application\ Support/SpeedTools\ Utilities\ Support /Volumes/Mac\ OS\ X\ Base\ System/Library/Application\
Support

5) Final Steps:

Eject, Convert, Rename and move BaseSystem.dmg

Code:
$ hdiutil eject /Volumes/Mac\ OS\ X\ Base\ System
$ hdiutil convert /private/tmp/Recovery/BaseSystem.dmg -format UDRO -o /private/tmp/Recovery/RecoveryHD/BaseSystem.dmg
$ sudo rm -rf /private/tmp/Recovery/BaseSystem.dmg
Then Save RecoveryHD.dmg to your backup folder.

You can stop here and make bootable USB or Netboot image from BaseSystem.dmg.

6) You can try either of these script1 and script 2for restoring RecoveryHD to Disk. Both have instructions on how process works.

I tested baseSystem.dmg with FLASH Drive. I've never used dmtest so Im not sure what it will do. I figure 10.8.3 will be release in near future so Im going to wait. I need to do clean OS restore on my testing rig and If lose OS it want be big deal. I limited on time to do 2 restores if some thing goes wrong. My clone is corrupt.

Tip:
* You can delete "alias" /Volumes/Mac OS X Base System/System/Installation/Packages
and replace it with /Volumes/Mac OS X Install ESD/Packages from installESD.dmg.

* This will allow you to install OS X over existing OS with out deleting your files.

* It does not create RecoveryHD!!!

Screen-Shot-2013-01-08-at-1.30.04-PM.jpg
 
Last edited:

Marx55

macrumors 68000
Jan 1, 2005
1,945
775
AWESOME!!! Thanks! Now, Apple should allow to install third-parties on the Recover partition. At least DiskWarrior.
 

mac-hacks

macrumors regular
Original poster
Jan 14, 2011
118
0
Swimming In Tsunami
AWESOME!!! Thanks! Now, Apple should allow to install third-parties on the Recover partition. At least DiskWarrior.

It still needs some work to make it easier to add apps to recoveryHD. I was hoping developer who knows more about packaging scripts & imaging with asr would pick up where I left off. I was trying to write bash script to do work. "ASR" man page is limited on details for making asr.dmg. Other Tricky part of script will be to copy 3rd party app manifest to Utility.plist. Probably best approach would be to take the top Utility apps and either make gui or have folder with manifest that the script scans and uses any manifest in that folder. My 1st few attempts writing script failed. Im limited on time and waiting on 10.8.3 to be released before I spend anymore time on it.

I think if some one has time. To write script to make shadow sparseimage of basesystem.dmg to copy over hack Utility.plist & .app to /Applications/Utilities/ with there support files and sets right permissions. Use the guide on github, creating RecvoveryHD with luggage & dmtest. I think will work. I don't have time to spend on it at moment.
 

jroskos

macrumors newbie
Jul 17, 2013
2
0
We're having a heck of a time with this..not sure if something has changed or we are doing it wrong, but we've added the application and necessary plist file, but the app doesn't seem to launch. We can see it in the menu, but it doesn't launch. We tried two different apps with out any luck. Am wondering if it is is something to do with the "-skipSignatureCheck 1" argument? Below is one example of what we are using...is it correct?

Code:
	       <dict>
			<key>Arguments</key>
				<array>
					<string>-skipSignatureCheck 1</string>
				</array>
			<key>BundlePath</key>
			<string>/Applications/Disk Inventory X.app</string>
			<key>Path</key>
			<string>/Applications/Disk Inventory X.app/Contents/MacOS/Disk Inventory X</string>
			<key>TitleKey</key>
			<string>Disk Inventory X</string>
		</dict>

Thank you for any help on this.
 

MrMacintoshBlog

macrumors 6502
Sep 21, 2009
458
311
Chicago, IL
We're having a heck of a time with this..not sure if something has changed or we are doing it wrong, but we've added the application and necessary plist file, but the app doesn't seem to launch. We can see it in the menu, but it doesn't launch. We tried two different apps with out any luck. Am wondering if it is is something to do with the "-skipSignatureCheck 1" argument? Below is one example of what we are using...is it correct?

Code:
	       <dict>
			<key>Arguments</key>
				<array>
					<string>-skipSignatureCheck 1</string>
				</array>
			<key>BundlePath</key>
			<string>/Applications/Disk Inventory X.app</string>
			<key>Path</key>
			<string>/Applications/Disk Inventory X.app/Contents/MacOS/Disk Inventory X</string>
			<key>TitleKey</key>
			<string>Disk Inventory X</string>
		</dict>

Thank you for any help on this.


Same thing happend to me any ideas
 

Dalton63841

macrumors 65816
Nov 27, 2010
1,449
8
SEMO, USA
What is the purpose of LuggagePackages in this? Here is a tutorial I did a while back to turn the Recovery partition into a completely offline installer(much quicker restores), AND/OR adding applications to the Recovery partition. It isn't limited by the amount of partition space, because when the new files are written by dmtest it will adjust the size to fit automatically. The only necessary files are the dmtest executable and a BaseSystem.dmg and BaseSystem.chunklist either from an installer or from the Lion Recovery Update package.

https://forums.macrumors.com/threads/1598564/
 
Last edited:

jroskos

macrumors newbie
Jul 17, 2013
2
0
Thanks Dalton, but I am looking to do this on a flash drive versus the local Recovery HD. I did try your process and just copy the BaseSystem.dmg over to a OS X Recovery Drive, but the issue appears to be permissions I think. For whatever reason, I can set the correct permissions on the [application].app correctly, but when I copy or move it to the dmg, it goes to admin:staff? If I try to chown it within the dmg it doesn't give me an error, but still retains the admin:staff ownership?

Any ideas how to "force" it? I've su'd it and tried logged in as root with no luck?
 

matt06sg

macrumors newbie
Jun 5, 2014
2
0
Does it work on 10.9, 10.10

Hi.

Not sure anyone is actively on it. But I just am just trying on 10.10 but not able to. Wondering if anyone is able to make it work on 10.8? I don't mind to play around with it a little but it I had followed the instruction carefully but no avail.

matthew
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.