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:
- OS X installation media (usually an InstallESD.dmg)
- 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:
- You can upgrade or reinstall OS X on a current boot volume without affecting user data. “Imaging” requires erasing the target first.
- 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.
- 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:
19 thoughts on “Installing Lion and Mountain Lion instead of “Imaging””
Great article, a real eye opener.
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.
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.
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”.
“The PKG method above is technically clever, but doesn’t allow bare-metal installs via NetBoot, because it essentially installs the installer.”
Sure it does. See this post for one method: http://derflounder.wordpress.com/2012/07/25/installing-mac-os-x-10-8-x-on-an-erased-hard-drive-using-deploystudio-and-createosxinstallpkg/
Of course, if NetBoot installs are the only way you are installing Lion/Mountain Lion, there are other, more efficient options, like creating a NetInstall set using Apple’s System Image Utility.
“Nor does it allow a machine to be “refreshed”.”
Yes, it does as well. The technique you describe above (removing everything except /Users) would would with a Lion/Mountain Lion installation package as well.
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?
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.
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.
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.
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 ?
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.
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 ?
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.
[…] Installing instead of imaging: https://managingosx.wordpress.com/2012/08/01/installing-lion-and-mountain-lion-instead-of-imaging/ […]
[…] 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 […]
[…] mehr Installer statt Images; mehr dazu sicher am 12. Sept. 2012 um 16:10 […]
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.
[…] a “vanilla” image created with tools such as AutoDMG or createOSXinstallPkg, […]
Comments are closed.