Deploying Mavericks via Casper Self Service

Disclaimer: All credit for this method goes to
Greg Neagle for creating the amazing createOSXinstallPkg
and Rich Trouton for his First Boot Package Install.pkg.

Check the linked pages (if you don’t know them yet) to get an understanding of how we’re putting the pieces together.

Of course it would be possible to deploy the Mavericks installer as it is from the App Store.
However, as we learned, upgrading to Mavericks removed Java from your Mac, and the user would be greeted with the iCloud sign-in dialogue once the upgrade is completed.

Maybe you don’t want that. And maybe you want to add a “postupgrade” script to the installer to make Mavericks fit your environment. Maybe you want to tweak the authorization database since /etc/authorization is deprecated in Mavericks…

Lots of reasons not to go with the standard installer.
I’ll try to explain how to do this.



Building a payload-free package with Composer

We need our postupgrade configuration script to be wrapped in a pkg.
Launch Composer and create a new empty package.
Click the triangle next to your package in the sidebar, then right-click on “Scripts”, select “Add Shell Script” -> “Postinstall” or “Postflight”.

Composer1Then paste your script contents into the script editor and save it.

Composer2Select “Build as PKG” to finish the build process.


Preparing First Boot Package Install.pkg

Right-click the package you downloaded, select “Show Package Contents” and navigate to
You will find six numbered folders in there.
Each pkg we want to install on first boot goes into one folder.

Payload-free package to run the configuration script:

FBPI1Java for OS X installer:


Of course you don’t need to have exactly six pkgs, however you can add additional folders as needed. Remember the 350MB size limit!


Building the Mavericks installer pkg

Here’s where createOSXinstallPkg comes into play.
We’re going to bake our prepared First Boot Package Install.pkg into the Mavericks installer.
To do that, fire up Terminal and run

sudo /path/to/createOSXinstallPkg --source /path/to/Install\ OS\ X\ --pkg /path/to/First\ Boot\ Package\ Install.pkg --output /path/to/Output.pkg

createOSXinstallPkg1Grab a coffee while it does its thing.


Deploying the Mavericks installer via Self Service

Once your package is ready, upload it to Casper Admin.
We’re almost done!

Now we’ll create a policy to cache the installer on our clients.

Create a new policy:

Policy1Add the Mavericks installer package we just uploaded:Policy2 Choose “Cache” from the Options

Policy3Scope it to a group or single computersPolicy4Choose a triggerPolicy5And set it to “Once per computer”Policy6Give it a name and a categoryPolicy7Now we need to know which clients are done caching the installer.
Therefor we need a create smart group:

SmartGroupIn order to make the Mavericks installer available in Self Service, we create another policy.

Upgrade1Scope it to the smart group we created:Upgrade2Make it available in Self Service, upload an icon and add a description:Upgrade3Install the cached installer:Upgrade4Add “shutdown -r now” in the “Run Command” field to trigger a rebootUpgrade5Our policy should now show up on the clients on which we cached the installer!

SelfService1 SelfService2When the user selects “Install”, the Mavericks will run for 5-10 minutes and reboot the computer afterwards.
It will then boot into the actual OS X installation environment and upgrade the OS which takes about 45 minutes, depending on the machine you run it on.
When the upgrade is done, the computer reboots again.
Now the First Boot Package Install.pkg kicks in and runs our script & installs Java,
plus whatever else you set it up to install.
During this, the end user will see the grey Apple bootscreen with the spinning circle.

Once all packages are installed, the Mac will reboot one last time and is then ready for the user to log in.

So far this method has worked very well for me, however
I’m sure there are smarter/better ways to achieve the same result and if you know one,
please let me know!
Same goes for any errors/mistakes you find in my posts.

Thanks to Mr Greg Neagle and Mr Rich Trouton for their amazing work,
and for sharing it with the Mac admin community.

11 thoughts on “Deploying Mavericks via Casper Self Service

  1. Hi Chris,
    I am getting following error, any idea?

    Output path: /Users/templahum/InstallOSX_10.9.1_13B42.pkg
    Creating package wrapper…
    Creating MacOSXInstaller.choiceChanges…
    Downloading and adding IncompatibleAppList pkg…
    Error 7 retrieving
    curl: (7) Failed connect to; Connection refused

    Traceback (most recent call last):
    File “/Users/templahum/Desktop/NEW-UPGRADE/createOSXinstallPkg_20131007/createOSXinstallPkg”, line 964, in
    File “/Users/templahum/Desktop/NEW-UPGRADE/createOSXinstallPkg_20131007/createOSXinstallPkg”, line 926, in main
    getPkgAndMakeIndexSproduct(destpath, os_vers=os_version)
    File “/Users/templahum/Desktop/NEW-UPGRADE/createOSXinstallPkg_20131007/createOSXinstallPkg”, line 571, in getPkgAndMakeIndexSproduct
    url = findIncompatibleAppListPkgURL(catalog_url, package_name)
    File “/Users/templahum/Desktop/NEW-UPGRADE/createOSXinstallPkg_20131007/createOSXinstallPkg”, line 514, in findIncompatibleAppListPkgURL
    catalog = plistlib.readPlistFromString(catalog_str)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/”, line 103, in readPlistFromString
    return readPlist(StringIO(data))
    TypeError: must be string or buffer, not None

    • Are you behind a proxy?
      If so, try running
      export https_proxy=https://your.proxy.server:port
      before running createOSXinstallPkg

      • Yes, that seems to be the reason 😀 Thank you. It worked when Im at home.
        But I ws not able to fix this proxy with the command you gave me. Never mind, i will study and fix it soon. My main objective is achieved.
        Thanks again! 😀

  2. Hi Chris,
    What you mentioned in para 1, line 3 is what I need little help on.
    I am unable to stop iCloud popup on first login screen. I have added all the items from derflounder to my existing script but it does not seem to be able to stop iCloud.
    Do you think deploying the script as it is and as a separate package will help?

  3. Sorry for delay. Well it seems it was not making change because the LOCALIZATION variable was incorrect. I have changed the script and testing it now. Thank you for the guidance, I will let you know the results.

  4. hello, not sure if this needs to be asked to you, or on the blog that has mavericks packager. Hope you can help like you did to others 🙂
    I have a script that runs post installation and does lots of settings on the Mac. Problem is when I deploy it along with Upgrade to 10.9 package, and have set the priority to run after OS is upgraded…the problem I am facing is that after Mac boots post upgrade, the script takes 2-4mins to run and the user logs in meanwhile 🙁
    So if I bake it according to your post and keep in the 1st folder inside fb, it does not installs and works at all. Is there a separate place to keep a post install script that I have written?

    • Hey,
      i’m not sure if this works with a PAC file.
      You could try downloading the PAC file and view it in an editor.
      There should be a line near the end like
      return "PROXY your.proxy.server:port";
      which you can then export.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.