Update to Automated Installs of Mac OS X Lion

Updated tools are here, or if you’ve cloned the Git repo, do a `git pull` to get the changes.

When the “Install Mac OS X Lion” application runs, it queries Apple’s Software Update servers and downloads a package named “MacOS_10_7_IncompatibleAppList.pkg” and copies it and an “index.sproduct” file that lists this package to the “Mac OS X Install Data” directory as part of the preparation for installing Lion.

This package updates a list of software that is incompatible with Lion by updating “English.lproj/IncompatibleApplicationsStrings.strings” and “MigrationIncompatibleApplicationsList.plist”
inside /System/Library/PrivateFrameworks/SystemMigration.framework/Versions/A/Resources/.

Updating this list of incompatible software does not seem to be vital to the installation of Lion. The index.sproduct file must exist, however, or the automated install is aborted. If you do not include the MacOS_10_7_IncompatibleAppList.pkg and index.sproduct files inside the InstallLion.pkg, the postflight script will create an “index.sproduct” file containing an empty “Packages” array.

Still, it’s probably a good idea to include the current version of the MacOS_10_7_IncompatibleAppList.pkg in your InstallLion.pkg if possible.

I’ve provided a tool to help you download the current version of the incompatible app list package. It’s named “getIncompatibleAppListPkg”. It will download the MacOS_10_7_IncompatibleAppList.pkg and create an index.sproduct file, saving both in the current directory. They must be copied to the InstallLion.pkg/Contents/Resources/Mac OS X Install Data/ directory.

Here’s a sample execution of the tool:

% ./getIncompatibleAppListPkg
Downloading http://swcdn.apple.com/content/downloads/02/12/041-1997/jPTmxRrfybSnP8NTRfwggvDn4F9byWBgvd/MacOS_10_7_IncompatibleAppList.pkg...
Writing index.sproduct...
Done.

You’d find MacOS_10_7_IncompatibleAppList.pkg and index.sproduct in your current working directory; you would then copy them to InstallLion.pkg/Contents/Resources/Mac OS X Install Data/

(Note: I found also that I could not add arbitrary packages to the Packages array of index.sproduct; the OS X Installer skipped any packages that were unsigned. Therefore the index.sproduct file is not easily used to install additional arbitrary packages. I was unwilling to go through the effort to convert my additional packages to “flat” packages and sign them to do further testing.)

Update to Automated Installs of Mac OS X Lion

13 thoughts on “Update to Automated Installs of Mac OS X Lion

  1. Holger Bartels says:

    Great Tool! Does it work with 10.7.2? I always get the error :

    Input disk image: /Users/hbartel2/Downloads/20-10-11/packages/InstallESD.dmg

    OSInstall.collection:
    (It’s normal for OSInstall.mpkg to be listed twice)
    ——————————————————————

    /System/Installation/Packages/OSInstall.mpkg
    /System/Installation/Packages/OSInstall.mpkg
    /System/Installation/Packages/JavaForMacOSX10.7.pkg
    /System/Installation/Packages/MacOSXUpd10.7.2.pkg

    ——————————————————————
    Output disk image: /Users/Shared/InstallESD.dmg

    Build custom installation disk image? [y/n] y
    Mounting /Users/hbartel2/Downloads/20-10-11/packages/InstallESD.dmg…
    Copying additional packages to /private/tmp/dmg.RwELfy/Packages
    Copying flat package /Users/hbartel2/Downloads/20-10-11/packages/JavaForMacOSX10.7.pkg
    Copying flat package /Users/hbartel2/Downloads/20-10-11/packages/MacOSXUpd10.7.2.pkg
    Error [Errno 28] No space left on device copying packages to diskimage

    With 10.7.1it works like charme.
    Thanks for help!

    Cheers,
    Holger

  2. I just tried it with the 10.7.2 InstallESD.dmg and it worked fine. I’d think you’d always want to use the updated InstallESD.dmg, and not try to add in a combo update.

    Are you sure you just didn’t run out of space on the volume you were using?

  3. Ryan Taylor says:

    I used the 10.7 InstallESD and received the same error. I tried to add the 10.7.3 combo updater. I have ~120gb free space on the volume.

    1. Again, I recommend always downloading the current Install OS X Lion.app and getting the current InstallESD.dmg (containing the latest rev of Lion) rather than using a older version of Lion and trying to add the combo updater.

  4. I am also getting the ‘[Errno 28] No space left on device’ when I try to build using a 10.7.3 InstallESD.dmg. I am trying to roll several packages into the new InstallESD, including Office 2011 (which weighs in at 1GB+). Perhaps this is why I am seeing an error; the packages are too large?

    Input disk image: /Volumes/Storage/InstallESD.dmg

    OSInstall.collection:
    (It’s normal for OSInstall.mpkg to be listed twice)
    ——————————————————————

    /System/Installation/Packages/OSInstall.mpkg
    /System/Installation/Packages/OSInstall.mpkg
    /System/Installation/Packages/RemoveSymantec.pkg
    /System/Installation/Packages/SEP12.1.1.pkg
    /System/Installation/Packages/Office 2011.pkg
    /System/Installation/Packages/Office 2011 14.1.4 Update.pkg
    /System/Installation/Packages/Communicator 13.1.2 Update.pkg
    /System/Installation/Packages/Error Reporting Installer.mpkg
    /System/Installation/Packages/Office 2011 Settings.pkg
    /System/Installation/Packages/AutoUpdate Installer.mpkg
    /System/Installation/Packages/Adobe Flash Player.pkg
    /System/Installation/Packages/VPN Enabler.pkg
    /System/Installation/Packages/Prefs Installer-fs.pkg
    /System/Installation/Packages/Setup Script-fs.pkg
    /System/Installation/Packages/QuickAdd.pkg

    ——————————————————————
    Output disk image: /Volumes/Storage/andy/Documents/Butler/Mac Management project/Casper/InstallLionPkg/InstallLion.pkg/Contents/Resources/InstallESD.dmg

    Build custom installation disk image? [y/n] y
    Mounting /Volumes/Storage/InstallESD.dmg…
    Copying additional packages to /private/tmp/dmg.XUAf5r/Packages
    Copying bundle package /Volumes/Storage/andy/Documents/Butler/Antivirus/RemoveSymantec/build/RemoveSymantec.pkg
    Copying bundle package /Volumes/Storage/andy/Documents/Butler/Imaging-labs/Packages/Symantec/SEP12.1.1.pkg
    Copying bundle package /Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg
    Traceback (most recent call last):
    File “/Volumes/Storage/andy/Documents/Butler/Mac Management project/Casper/InstallLionPkg/customizeInstallESD”, line 268, in
    main()
    File “/Volumes/Storage/andy/Documents/Butler/Mac Management project/Casper/InstallLionPkg/customizeInstallESD”, line 230, in main
    shutil.copytree(pkg, destination)
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”, line 205, in copytree
    raise Error, errors
    shutil.Error: [(‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Archive.pax.gz’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Archive.pax.gz’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Info.plist’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Info.plist’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/PkgInfo’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/PkgInfo’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/Archive.sizes’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/Archive.sizes’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/background’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/background’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/Description.plist’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/Description.plist’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/Office 2011.bom’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/Office 2011.bom’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/Office 2011.info’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/Office 2011.info’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/Office 2011.pax.gz’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/Office 2011.pax.gz’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/Office 2011.sizes’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/Office 2011.sizes’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/package_version’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/package_version’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/postflight’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/postflight’, ‘[Errno 28] No space left on device’), (‘/Volumes/Storage/andy/Documents/Butler/Scripts/Office 2011/Office 2011 Installer/build/Office 2011.pkg/Contents/Resources/Welcome.rtf’, ‘/private/tmp/dmg.XUAf5r/Packages/Office 2011.pkg/Contents/Resources/Welcome.rtf’, ‘[Errno 28] No space left on device’)]

  5. Andy: it looks like you are trying to use this as a substitute for InstaDMG or System Image Utility! The InstallESD.dmg as shipped from Apple doesn’t have enough room to add lots of stuff. I’ve successfully added a couple of small packages, enough to kick off our software management solution on the first reboot after Lion is installed.

    It would probably be possible to use hdiutil to resize the volume and disk image so it had more free space, but I’m not motivated to work on that particular problem right now since what I have works for my needs!

  6. Hey Greg,

    Have you had a chance to look at Mountain Lion’s installer? Do you think the automated installer will work for deploying ML as well?

    Thanks!

    – Ryan

    1. Ryan: You should use your Mac Developer membership to test that for yourself!
      I’m confident we’ll have a working solution for Mountain Lion when it is released.

Comments are closed.