Installing Lion and Mountain Lion instead of “Imaging”

Now that you can create an Installer package to install Lion or Mountain Lion, you have the possibility of using this package instead of an “image” to initially setup/configure a machine.

This may not be initially obvious.

If you’ve used InstaDMG or Apple’s System Image Utility to build a deployment image, you might notice that the components you use are very similar to the components you use to create a Lion or Mountain Lion installer package. Those components are:

  1. OS X installation media (usually an InstallESD.dmg)
  2. One or more additional packages to install after the OS is installed.

The difference is that InstaDMG “compiles” those components into a disk image that you “restore” to a target volume. System Image Utility can do that as well, or it can create a NetInstall workflow that just installs the components in order.

An advantage of the “compiled” disk image approach is speed. It’s much faster to restore a disk image to a target volume than it is to install the components seperately.

But there are advantages to the “install the components” approach as well:

  1. You can upgrade or reinstall OS X on a current boot volume without affecting user data. “Imaging” requires erasing the target first.
  2. Installing Lion or Mountain Lion causes the appropriate Recovery HD to be created automatically. If you use an imaging approach, you have create the Recovery HD separately; either by capturing and deploying an image of the Recovery HD, or using another scripted process to create it.
  3. InstaDMG and SIU generally limit you to building an image on the same OS; in other words, you can only build Mountain Lion images on a Mountain Lion machine, and Lion images on a Lion machine. createOSXinstallPkg allows you to create Lion and Mountain Lion installers on Snow Leopard, Lion, and Mountain Lion.

It’s possible to use DeployStudio to install Lion or Mountain Lion on a target volume using a package created by createOSXinstallPkg. You can upgrade an existing volume, or erase and install to an empty disk. Rich Trouton has documented these options:

Explore posts in the same categories: Deployment, Lion, Mountain Lion, OS X, Packaging

19 Comments on “Installing Lion and Mountain Lion instead of “Imaging””

  1. donmontalvo Says:

    Great article, a real eye opener.

  2. Problem still exists with upgrades or re-installs, if you are trying to clear out some pesky configuration issues…. Best is to drum up a pre-install script to delete all files excluding /Users and maybe preserve others in /Applications , it will give you a “clean” install every time.

    • GregN Says:

      Sure, but that’s no different than traditional imaging. But with imaging, you _have_ to erase the destination first. With _installing_, you can erase the destination, or not, as you choose.

      • But, keep in mind you would only need to erase the target drive if you were performing a block-level copy of your image, If time is not your enemy, a selective file erase and file-level copy of your image will do the job quite well. It works great if you have a flat partition with the both the OS and Users, and you want to preserve all accounts but end up with a freshly installed OS.

    • TGB Says:

      Our entire imaging process is based around exactly that: for everything at the top of the drive, if it’s not “Users”, delete it. Then do a non-erasing install of an OS dmg, eg: created by FileWave Lightning. This allows us to upgrade even 10.5 directly to 10.7 or 10.8, or recover a malfunctioning machine.

      When someone reports a fault, we won’t do any more than minimal fault investigation before simply running an image refresh. User’s data remains exactly where it always was, nothing needs to be backed up, old OS and apps are stripped off, SOE apps and system configuration are restored to known state, user pops open their catalogue and installs optional software again. Set it going, tell the user to go to lunch and it’ll be ready to use when they get back.

      The PKG method above is technically clever, but doesn’t allow bare-metal installs via NetBoot, because it essentially installs the installer. Nor does it allow a machine to be “refreshed”.

  3. motionbugob Says:

    I would like to add a quickadd package (jamf user and management) after installing and updating the machine, but it fails for me, is there another way?

    • GregN Says:

      I don’t know anything about “quickadd” packages from JAMF. If a package works in a Lion NetInstall nbi, it should work with createOSXinstallPkg.

      I’m guessing the package has a postflight script that uses tools that are not available in the Lion/Mountain Lion install environment, or is making other (invalid) assumptions about its environment.

      • motionbugob Says:

        Oh, right forgot about that, yeah it installs a binary and then has a post flight script that runs after to run an inventory and register it with the software server.

        So flat packages only then right?

        Thanks for this tool, it is awesome, will have to play with it.

  4. GregN Says:

    Bundle-style packages work fine with createOSXinstallPkg. Packages (flat or bundle) with scripts might have issues if the scripts make too many assumptions about their environment or use tools that are not available in the Lion/ML installl environment. It sounds like this QuickAdd package is built to work only on the currently booted OS volume, so it’s going to fail if installed as part of a Lion/ML install.

  5. Rolf Says:

    Hello Greg

    We love this tool already :-) !
    While using and testing it we discovered that the OS X updater overwrites the User Template folder (as it should). We use custom German.lproj folders and would like to have them intact. So we came up with the idea that it would be great if we could use your tool to deploy our already finished ML.dmg inculding lots of new Apps as well…
    Would that be possible ?
    Or do you have another idea how to pack a complete dmg into a package for deployment ?

    • GregN Says:

      Why not package your modifications (such as the modifications to the User Template German.lproj folders), additional apps, etc and add them to the list of packages to install?
      Or implement a solution like Munki.

  6. Rolf Says:

    We looked at Munki (GREAT TOOL :-) ) but for us it’s a bit over the top, also creating packages for all the software is not an option right now (not enough staff). Your Installer really made us very happy and we figured that if we prepare a full dmg and just could use it to deploy or update an existing system this would be great. I guess this is not possible because an image is designed for block copy installs, and we need file copy so that we don’t overwrite user homes (am I correct ?). Can you think of any way to accomplish what we would like without repackaging or Munki, starting from just an image, using your installer trick ?

    • GregN Says:

      It might be possible, but would require writing a new tool from scratch. Certainly not as simple as a tweak of createOSXinstallPkg, which really only sets up Apple’s Lion/Mountain Lion installer to run.

  7. [...] Installing instead of imaging: [...]

  8. [...] which is great for a wide number of deployment tools – or – use the thin-imaging or no-imaging technique where Apple’s own installer handles the magic behind the scenes. But for now [...]

  9. [...] mehr Installer statt Images; mehr dazu sicher am 12. Sept. 2012 um 16:10 [...]

  10. Digna Connie Says:

    Hi, I have thought about buying the software DubTurbo Beatmaker and was hoping somebody could give me an actual genuine assessment of the computer software. Numerous websites that feature appraisals are literally affiliate websites endorsing the software package so I don’t believe that the opinions are legitimate. Cheers in advance for all information somebody can provide.

  11. […] a “vanilla” image created with tools such as AutoDMG or createOSXinstallPkg,   […]

Comments are closed.


Get every new post delivered to your Inbox.

Join 187 other followers

%d bloggers like this: