OS Packages

In addition to building deployable packages of applications and other files, you can build DMGs of preconfigured operating systems. OS packages can save you time and enhance consistency across your network.

While building an OS package with Composer is similar to building one with the Disk Utility application, Composer allows you to clean up the OS by removing unnecessary files before building the DMG.

You can use the following settings to manage OS package cleanup options with Composer:
Compress Disk Image
This option compresses the OS package DMG.
Delete Temp Files
This option ensures the files in /private/tmp are deleted before building an OS package. These files are usually deleted during the startup process.
Delete Virtual Memory Files
This option ensures that Virtual Memory files are deleted before building an OS package, including the potentially large sleepfile. These files are usually deleted and re-created during the startup process.
Delete Special Files
Apple recommends deleting the following files before building an OS package:
  • /private/var/db/BootCache.playlist

  • /private/var/db/volinfo.database

This option ensures that these files are deleted.

Delete Caches
Removes files in the /Library/Caches directory before building an OS package.
Remove System Keychain
Removes the System keychain from the OS to ensure that a new System keychain is created. This can prevent the "This computer already exists" error when binding a computer to a directory service.
Ensure Trashes are Empty
Empties the Trash for any user with items in the ~/.Trash folder. It also updates a user's com.apple.dock.plist file to reflect that the Trash is empty.
Delete MCX Records in the Local Directory Service
Removes the /var/db/dslocal/nodes/Default/computers/localhost.plist file before building an OS package.

Installing and Configuring the OS

For instructions on how to install and configure the OS before building an OS package, see the Creating a Minimal Base OS Image Knowledge Base article.

Packaging the OS

When you're finished configuring the OS, boot to another startup disk to build the DMG.

  1. Open Composer and authenticate locally.
  2. In the toolbar, click New .
  3. Under the Operating System heading in the sidebar, select Build OS Package.
  4. Select the drive you want to package and click Next.
  5. Choose options for removing unnecessary files from the package and click Next.
  6. Enter a package name and select a location to save the package, and then click Build.