Sie sind auf Seite 1von 17

InstaDMG

Third-party company and product names mentioned herein are trademarks of their respective companies. Mention of third-party products is for informational purposes only and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the performance of these products.

Table of Contents
Overview
InstaDMG

iii iii 1 1 1 3 3 3 3 3 3 3 3 5 5 5 6 6 7 9 9
i

Requirements
Hardware Software

Structure
AddOns Caches Documentation instadmg.bash InstallerFiles Logs OutputFiles

Setup
BaseOS InstallerChoices BaseUpdates CustomPKG Package Creation

Image Creation
InstaDMG Methodology

InstaDMG

Appendix A: Resources
InstaDMG InstaDMG Forums InstaDMG InstallerChoices.xml Discussion Apple PackageMaker Apple Downloads LANRev InstallEase JAMF Composer WhiteBox Iceberg MindVision InstallerVise MacroMates TextMate BareBones TextWrangler

10 10 10 10 10 10 10 10 10 10 10 10 11 11

Appendix B: Shell Scripts


Delocalizer

InstaDMG

ii

Overview
InstaDMG
InstaDMG is an image creation methodology that creates un-booted Mac OS X deployment images. InstaDMG leverages Apple's native installer package format and disk image frameworks to produce deployment images. This allows InstaDMG to be run from either an external USB or Firewire device or the internal hard drive. The exibility of this process means that deployment images can be built anyplace and anytime with any system that is currently running OS X 10.5. This methodology also provides rapid build changes by replacing or adding additional packages to the build train and then rebuilding the deployment image.

InstaDMG

iii

Requirements
Hardware
OS X 10.5 system with latest system updates installed External USB or Firewire drive optional

Software
InstaDMG 1.4b4 or later OS X 10.5 client retail DVD Latest 10.5.X combo updater Latest OS X 10.5 security patches Latest Apple nonsystem installers Custom package installers Thirdparty package installers

InstaDMG

Structure
The InstaDMG ecosystem is comprised of a set of folders that contain package les, dmg les, xml les, log les and an executable shell script.

AddOns
InstaDMGs default extensions, such as InstaUser and InstaUp2Date are stored in this folder.

Caches
The rst time InstaDMG runs, a copy of the installed base OS is cached in this folder. Upon subsequent runs of InstaDMG, the BaseOS image and InstallerChoices.xml les are checksummed. If the checksums match, the existing BaseOS install will be used with a shadow le. This allows InstaDMG to skip the initial OS install and greatly speeds up the build process. Caching can be disabled with a ag at execution time.

Documentation
This folder contains InstaDMGs documentation.

instadmg.bash
This is the core InstaDMG script. To run InstaDMG, execute the instadmg.bash script as root.

InstallerFiles
The InstallerFiles folder contains the software to be installed by InstaDMG. There are four folders within the InstallerFiles folder BaseOS This folder contains a disk image (dmg) of the retail Mac OS X install DVD. BaseUpdates This folder contains updates for the BaseOS. Typically, these will only include Apple updates. CustomPKG This folder contains custom installer packages. InstaUp2DatePackages The InstaUp2Date tool places its packages here.

Logs
InstaDMG build logs are stored in this folder.

OutputFiles
The nal ASR image les are placed in this folder.

InstaDMG

Setup
BaseOS
Insert the OS X 10.5 client retail DVD Open Disk Utility Select Mac OS X Install DVD in the drive panel list Select File > New > Disk Image from disk1S3 (Mac OS X Install DVD) Select the InstaDMG BaseOS folder to save the disk image Select DVD/CD master from the Image Format popup Click Save

InstallerChoices
The InstallerChoices.xml le controls which Mac OS X Installer packages are installed during the InstaDMG build process. This is equivalent to clicking on an items checkbox in the Mac OS X Install Customize sheet. By default, all items are selected in the Mac OS X Install Customize sheet. As an example, to only install the the GutenPrint print drivers, to not install the Additional Fonts, and to only install the English language localization, the InstallerChoices.xml le would contain: <array> <string>PrinterDriversGroup</string> <string>Guten_Printer_Drivers</string> <string>AdditionalFonts</string> <string>LanguageTranslations</string>

</array> In this example, "click" (disable, since it is enabled by default) the printer drivers checkbox (choiceIdentier "PrinterDriversGroup"), click (enable, since it was disabled by clicking the print drivers checkbox) the Gutenprint Print Drivers (choiceIndentier Guten_Printer_Drivers), and click (disable, since it is enabled by default) the Additional Fonts (choiceIdentier "AdditionalFonts"). The OSInstall.mpkg_choiceIdentiers.txt le contains a complete list of choices that may be used with the OS X 10.5 client retail DVD. For a comprehensive discussion of the InstallerChoices.xml le, see <http://www.afp548.com/forum/ viewtopic.php?showtopic=18907>. Open TextMate <macromates.com> or TextWrangler <www.barebones.com/products/TextWrangler/> Open the InstallerChoices.xml le located in /InstaDMG/Documentation/ InstallerChoices/ folder Open the OSInstall.mpkg_choiceIdentiers.txt le located in /InstaDMG/ Documentation/InstallerChoices/ folder Add to or change the InstallerChoices.xml le based on the choiceIdentier keys listed in the OSInstall.mpkg_choiceIdentiers.txt le Save the InstallerChoices.xml le Copy the InstallerChoices.xml le to the BaseOS folder

InstaDMG

BaseUpdates
Download the latest OS X 10.5 combo update from www.apple.com/downloads On a OS X 10.5 system that has all the latest updates installed: Open System Preferences Click on the Software Update System Preference panel Click the Installed Updates tab Click the Open as Log File button From the log le, determine which additional system updates are required and note the order of release Download the OS X 10.5 updates that were released after the latest combo update from www.apple.com/downloads Create as many folders as updates in the BaseUpdates folder Label each folder starting with the number 01 through N number of updates Place one update in each folder in the order of their release, i.e. OS X combo update in folder 01, OS X security update 1 in folder 02, etc.

CustomPKG
InstaDMG works under the principle that anything added to the image le, applications, settings, preferences, non-OS updates, etc., is built from an installer package. For instance, to set the Date & Time System Preference panel to automatically connect to a specic time server, a package installer has to be created. This package installer is then added to a subfolder within the CustomPKG folder. Package installers should be created for each individual item to be added to the image le, i.e. wireless, date & time, sharing, iLife, iWork, MS Ofce, etc. This may require the repackaging of installers and updates that normally will not install from a nonboot volume. There are a number of tools that are available to assist with package creation both free/ shareware and commercial. Apples PackageMaker (part of the Xcode Tools), JAMF's Composer, LANRevs InstallEase, Whiteboxes Iceberg or MindVisions InstallerVise are a few of the products currently available for package creation. Create as many folders as custom packages in the CustomPKG folder Label each folder starting with the number 01 through N number of packages Place each custom package in each of the folders, one package per folder

InstaDMG

Package Creation
Snapshot Method This method uses a new system service in OS X 10.5, File System Events, to track changes to the le system. By using this service, a snapshot of le system changes can be used to create a package installer. LanRev InstallEase will be used for this example, although any of the previously mentioned products have similar features. Open LANRev InstallEase Click Start Click Continue Click Take Snapshot InstallEase is going to snapshot the entire le system. This may take a few minutes, depending upon how many les, including the OS, are on the hard drive. Once the snapshot has completed, install one piece of software or one update or make a change to one system item Click Take Snapshot InstallEase is going gather up all changes that took place and compare those to the previous snapshot, creating a le difference that will be used for package creation. Delete the Users folder if one was placed in the Snapshot Data Make any other adjustments to the Snapshot Data Click Continue Click Create Save the package Click Create Additional Package or click Quit Copy the package into an empty numbered subfolder in the CustomPKG folder

InstaDMG

PayloadFree Method This method will create an installer that contains no items to install but instead contains actions or scripts for automating tasks. A good example would be an installer package that executes a shell script to remove all localizations from applications in the image le during image creation. PackageMaker will be used for this example, although any of the previously mentioned products have similar features. In the Finder create a new folder called Empty; do not put anything inside the folder Open PackageMaker Enter the Organization information in a reverse URL format; i.e. com.mydistrict Choose a Minimum Target from the popup menu Enter a title in the Title eld Uncheck Volume selected by user Check System volume Drag the Empty folder to the Contents list Enter /tmp in the Destination eld Click the Contents tab Uncheck the box next to the Empty folder to disable the folder Click the Scripts tab Click the PostInstall Action popup and select the script to execute Click Build Save the package Copy the package into an empty numbered subfolder in the CustomPKG folder

InstaDMG

Image Creation
InstaDMG Methodology
InstaDMGs creation methodology provides an un-booted Mac OS X deployment image that is hardware build agnostic. This allows InstaDMG to be run from either an external USB or Firewire device or the internal hard drive. The exibility of this process means that deployment images can be built anyplace and anytime with any system that is currently running OS X 10.5. This methodology also provides rapid build changes by replacing or adding additional packages to the build train and then rebuilding the deployment image. How to Run Open Terminal Type cd <space> Drag the InstaDMG folder into the Terminal window Press Return Type sudo ./instadmg.bash Press Return Enter the local administrators password Press Return Depending upon the size of the build and whether the build has been run previously, the build process may take anywhere from halfanhour to a couple of hours to complete. Command Usage Command: instadmg.bash [options] Options: -a <folder path> Put the nal output in this folder -b <folder path> Look for the base image in this folder -c <folder path> Look for custom pkgs in this folder -h Print the usage information (this) and exit -i <iso code> Use <iso code> for the installer language (default en) -l <folder path> Use this folder as the log folder -n <name> The name to use for the nal output -q Quiet, print only errors to the console -s Enable MacOS X Server installs (not implemented as of 1.4b4) -u <folder path> Use this folder as the BaseUpdates folder -v Print the version number and exit -z Disable caching of the base image

InstaDMG

Appendix A: Resources
InstaDMG
http://www.afp548.com/

InstaDMG Forums
http://www.afp548.com/forum/index.php?forum=45

InstaDMG InstallerChoices.xml Discussion


http://www.afp548.com/forum/viewtopic.php?showtopic=18907

Apple PackageMaker
Included with every OS X 10.5 system with the Xcode Tools installer

Apple Downloads
http://support.apple.com/downloads/

LANRev InstallEase
http://www.lanrev.com/solutions/package-building.html

JAMF Composer
http://www.jamfsoftware.com/products/composer.php

WhiteBox Iceberg
http://s.sudre.free.fr/Software/Iceberg.html

MindVision InstallerVise
http://www.mindvision.com/vise_x.asp

MacroMates TextMate
http://macromates.com/

BareBones TextWrangler
http://www.barebones.com/products/TextWrangler/

InstaDMG

10

Appendix B: Shell Scripts


Delocalizer
#!/bin/sh #set -xv; exec 1>>/tmp/out 2>&1 PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH /usr/bin/logger "starting delocalization" /usr/bin/find -x "$3" \( -name *.lproj -and \! \( -name English.lproj -or -name en.lproj \) \) -exec rm -rdf \{\} \; /usr/bin/logger "starting repairpermissions" /usr/sbin/diskutil repairpermissions "$3" /usr/bin/logger "all done"

InstaDMG

11

Das könnte Ihnen auch gefallen