Code Monkey home page Code Monkey logo

createosxinstallpkg's Introduction

Important note

This project is no longer under development.

macOS 10.12.4 broke createOSXinstallPkg. Update to the current GitHub code to regain partial functionality: you will not be able to add additional packages, and you'll have to provide your own copy of brtool from previous macOS Sierra installer apps or older createOSXinstallPkg-created packages.

Due to Apple changes, it's likely-to-virtually-certain that some functionality of createOSXinstallPkg is gone forever: nothing we do will bring back the ability to insert additional packages to be installed.

I think it's probably better longer-term for the community to focus on new tools and new workflows using the startosinstall binary inside the Install macOS.app. Munki 3 supports this workflow.

If you need to install macOS with additional packages, I suggest you continue using createOSXinstallPkg with a 10.12.3 installer, and then allow Apple Software Update to upgrade machines to 10.12.4 and beyond.

createOSXinstallPkg

This tool allows you to create an installer package from an "Install OS X.app" or an InstallESD.dmg. You can use this package to install OS X on an empty partition, but perhaps more interestingly, you can also use it to upgrade existing OS X installations to a newer version of the OS X. There are many tools and workflows that support the installation of Apple packages; you can use these together with an OS X installation package to upgrade machines to the latest version of OS X.

This is especially interesting when used with tools like Munki -- you can automate the upgrade of a group of machines while still preserving user data, or offer an upgrade as a "Self-Service"-type option where a user can initiate an OS X upgrade themselves without needing to have administrative rights.

Please read this important 10.10+ note

Getting Started

What you need

This toolset, which includes:

createOSXinstallPkg
Resources/installosxpkg_postflight

You may put the toolset anywhere you'd like, but keep the Resources folder and its contents in the same directory as createOSXinstallPkg.

You'll also need an installation source for OS X (10.7 through 10.11 currently supported): a copy of the "Install Mac OS X Lion.app", "Install OS X Mountain Lion.app", "Install OS X Mavericks.app", etc, install application you can get from the Mac App Store.

Finally, and most importantly, you'll need the rights to install the OS X version on the machines you manage. Just because this tool allows you to create an OS X installation package does not mean it is legal for your organization to install it on all your Macs.

(Since Mavericks, Yosemite, and El Capitan are free, one assumes you can install them with abandon. However, I am not a lawyer, and this does not constitute advice or a recommendation.)

How to use it

You must run createOSXinstallPkg with root privileges.

sudo ./createOSXinstallPkg --source /path/to/Install\ OS\ X\ Mountain\ Lion.app

This creates an installation package in the current directory named InstallOSX_[version]_[build].pkg, where "version" and "build" are the version and build numbers of the OS X version that will be installed.

sudo ./createOSXinstallPkg --source /path/to/Install\ OS\ X\ Mountain\ Lion.app --output /path/to/some/directory/

sudo ./createOSXinstallPkg --source /path/to/Install\ OS\ X\ Mountain\ Lion.app --output /path/to/output.pkg

Adding the --output option allows you to specify an alternate location and/or name for the output package.

sudo ./createOSXinstallPkg --source /path/to/Install\ Mac\ OS\ X\ Lion.app --pkg /path/to/LocalAdmin.pkg --pkg /path/to/DisableSetupAssistant.pkg

The --pkg option allows you to add one or more packages to be installed after the OS is installed. You may specify multiple packages. They will be installed in the order given at the command line.

sudo ./createOSXinstallPkg --source /path/to/Install\ Mac\ OS\ X\ Lion.app --identifier 'com.example.installosx.pkg'

The --identifier option allows you to change the package identifier, which is by default 'com.googlecode.munki.installosx.pkg'.

sudo ./createOSXinstallPkg --plist /path/to/xml.plist

Options to createOSXinstallPkg can be stored in a plist file. This allows you to save the "ingredients" and "recipe" for a package for future reuse.

Example plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Source</key>
    <string>/Volumes/Data/Applications/Install OS X Mountain Lion.app</string>
    <key>Output</key>
    <string>/Volumes/Data/OSX_Install_Packages</string>
    <key>Packages</key>
    <array>
        <string>/Volumes/Data/Packages/LocalAdminAcct.pkg</string>
        <string>/Volumes/Data/Packages/DisableSetupAssistant.pkg</string>
        <string>/Volumes/Data/Packages/munkitools-0.8.3.1610.0.mpkg</string>
        <string>/Volumes/Data/Packages/munki_kickstart.pkg</string>
    </array>
    <key>Identifier</key>
    <string>com.example.installmountainlion.pkg</string>
</dict>
</plist>

If an option is specified in the plist and also explicitly at the command-line, the command-line "wins". (Note this means also that since multiple packages can be specified, that packages in a plist and packages at the command-line are not merged; the packages given at the command-line are the only packages used.)

How it works

The package generated by createOSXinstallPkg is a 'payload-free' package -- that is, it does not install anything from the traditional Archive.pax.gz payload found in most packages. Instead, the real work is done as a package postflight script located at [PACKAGE]/Contents/Resources/postflight.

The postflight script performs the actions that the GUI "Install Mac OS X Lion" or "Install OS X Mountain Lion" application does when you choose to install OS X.

Those actions are:

  1. Create an OS X Install Data directory at the root of the target volume.
  2. Mount the InstallESD.dmg disk image.
  3. Copy the kernelcache and boot.efi files from the disk image to the OS X Install Data directory. (The kernelcache is copied to the Recovery HD helper partition if the target volume is encrypted with FileVault 2.)
  4. Unmount (eject) the InstallESD.dmg disk image.
  5. If the InstallLion.pkg is on the same volume as the target volume, create a hard link to the InstallESD.dmg disk image in OS X Install Data, otherwise copy the InstallESD.dmg disk image to that directory.
  6. Create a com.apple.Boot.plist file in the Mac OS X Install Data directory which tells the kernel how to mount the disk image to use for booting. (This file is instead created on the the Recovery HD helper partition if the target volume is encrypted with FileVault 2.)
  7. Create a minstallconfig.xml file, which tells the OS X Installer what to install and to which volume to install it. It also provides a path to a MacOSXInstaller.choiceChanges file if one has been included in the package.
  8. Create an index.sproduct file and an OSInstallAttr.plist in the OS X Install Data directory. These are also used by the OS X Installer.
  9. Set a variable in nvram that the OS X Installer uses to find the product install info after reboot.
  10. Use the bless command to cause the Mac to boot from the kernel files copied to the OS X Install Data directory.
  11. If the target volume is a Core Storage or Apple RAID volume, setup/update boot helper partitions (these are the ones that show up as type "Apple_Boot" in the output of diskutil list).

Since most of the work is done with a postflight script, and since that script may need to do a lengthy copy of around 4GB of data (if the package is not on the target volume), you may see a long delay at the "Running package scripts" stage of installation. This is normal. (Annoyingly, the Installer.app displays "Install time remaining: Less than a minute" for several minutes during this stage.)

The next step would be to reboot, but the postflight script does not do this; it just exits. The package is marked as requiring a reboot, so whatever mechanism is used to install the package is responsible for rebooting as soon as possible after the install.

Upon reboot, the machine boots and runs the OS X Installer just as if you had run the "Install Mac OS X Lion" or "Install OS X El Capitan" application manually. It creates or updates a "Recovery HD" partition and installs OS X on the target volume, displaying the OS X Installer GUI. When installation is complete, the machine reboots a second time, this time booting from the new OS X installation.

Preinstall checks

A "Distribution" file, located at InstallOSX.pkg/Contents/distribution.dist controls the InstallCheck and VolumeCheck logic.

createOSXinstallPkg copies InstallCheck and VolumeCheck logic from the OSInstall.mpkg found in the Install.app or InstallESD.dmg. This means that the resulting package will use the same logic as Apple when deciding if a machine/volume is a valid install destination. (One exception -- createOSXinstallPkg disables the check for command-line installs; without disabling this check you would not be able to install Lion or Mountain Lion using Munki or ARD or any other mechanism that uses the command-line /usr/sbin/installer.)

The distribution.dist declares the install size is 8388608 KB (8* 1024 * 1024 KB, or 8GB), which should prevent attempted installation on volumes with less than 8GB free space. You can edit this number if you'd like.

Customizing the install

Installer choice changes

You'll find a MacOSXInstaller.choiceChanges file at InstallOSX.pkg/Contents/Resources/OS X Install Data/MacOSXInstaller.choiceChanges

See man installer for more info on ChoiceChangesXML files.

Additional packages

The most likely customization you will want to do is to add additional packages to be installed after the OS install. Some examples might include a package that keeps the Setup Assistant from running when the machine first starts up under Lion, or a package that triggers your software installation management system to run, check for, and install any updates on the first boot after OS X is installed.

Additional packages are added to the InstallOSX.pkg by using the --pkg option to createOSXinstallPkg:

sudo ./createOSXinstallPkg --source /path/to/Install\ Mac\ OS\ X\ Lion.app --pkg /path/to/LocalAdmin.pkg --pkg /path/to/DisableSetupAssistant.pkg

You can specify multiple packages. They will be installed in the order given.

Notes on additional packages

The OS X install environment is very stripped down. There are many command-line tools that are not available when booted into this environment. Python and Ruby are not available, either. This can affect pre- and postflight scripts in packages. You may find that some packages that rely on pre- or postflight scripts to perform important tasks will fail to run properly in the OS X install environment. Check the install log at /var/log/install.log after the install is complete, or open the log window during installation to monitor pre- and postflight scripts.

This issue may limit which packages you can use successfully in the OS X installation environment. You should carefully audit and pre- and post- scripts in any packages you add to your install to be certain they will run correctly in the OS X install environment.

To get an idea what tools are available in the OS X install environment, boot into the Recovery HD. The tools available in this environment are the same as those available in the OS X Install environment.

An additional limitation: the InstallESD.dmg volume has a limited amount of free space. To date, that space has been around 350MB. This is more than enough for some basic configuration/bootstrapping packages. But don't try to add Microsoft Office or iLife or Adobe Photoshop CS6. Not only are they too big to fit in the available space, they all contain pre- and post- scripts that are almost certain to fail in the OS X install environment.

The best approach for additional packages is to add only what is necessary to boot the machine and connect it to your software deployment system -- Munki, Casper, Absolute Manage, etc, and let the software deployment system take over and install everything else once the machine is booted into a full OS.

Further note on additional packages and Yosemite (and El Capitan)

Apple has made an undocumented change in Yosemite that affects this tool. If you add any additional packages for installation as part of the OS install/upgrade, they must all be distribution style packages; not component packages.

If you have an existing flat component pkg, you can convert it into a distribution pkg:

productbuild --package /path/to/component.pkg /path/to/distribution.pkg

I have not tested bundle-style distribution pkgs; would be interested to know if those are supported as well.

If there are additional packages that the OS X installer does not like, this will result in an error dialog upon reboot:

Failed to open OS X Installer.
The path /System/Installation/Packages/OSinstall.mpkg appears to be missing or damaged.

with two buttons: "Restart" and "Startup Disk"

The same issue affects customized NetInstall images created with System Image Utility.

If you add additional packages to a customized NetInstall of 10.10 or 10.11, they must be distribution -style packages, or you get the same error.

Note on installing OS X on FileVault-encrypted volumes

Installing Lion, Mountain Lion, Mavericks, Yosemite or El Capitan requires a reboot after the install is set up, but before the actual OS X Installer runs. When installing to a FileVault-encrypted volume, after the initial reboot, the pre-boot unlock screen appears. Someone will have to manually unlock the FileVault-encrypted volume before the actual OS X installation can occur. Once the disk is unlocked, installation should proceed normally. Apple's Install OS X.app does some undocumented (and probably non-third-party-supported) magic to cause an authenticated reboot; this bypasses the pre-boot unlock screen.

If your software deployment tool supports doing an authenticated reboot on Filevault-encrypted machines, you should select that option to avoid this issue. (JAMF Casper is one such tool.)

createosxinstallpkg's People

Contributors

chilcote avatar fuzzylogiq avatar gregneagle avatar keeleysam avatar nmcspadden avatar timsutton avatar wildeep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

createosxinstallpkg's Issues

Macos Sierra package install fails with read-only mount

Hi,
I'm creating the package using the Macos Sierra beta package
When I install it on a 10.11.6 encrypted with FileVault 2, it fails with this error:

Aug 19 19:44:46 ops31 installd[387]: ./postflight: Traceback (most recent call last):
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 1088, in
Aug 19 19:44:46 ops31 installd[387]: ./postflight: main()
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 1080, in main
Aug 19 19:44:46 ops31 installd[387]: ./postflight: updateHelperPartitions(installvolumepath, install_data_path)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 820, in updateHelperPartitions
Aug 19 19:44:46 ops31 installd[387]: ./postflight: RPSdir = setupHelperPartition(mountpoint, install_data_path)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 761, in setupHelperPartition
Aug 19 19:44:46 ops31 installd[387]: ./postflight: shutil.copy(item, helper_root)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 119, in copy
Aug 19 19:44:46 ops31 installd[387]: ./postflight: copyfile(src, dst)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
Aug 19 19:44:46 ops31 installd[387]: ./postflight: with open(dst, 'wb') as fdst:
Aug 19 19:44:46 ops31 installd[387]: ./postflight: IOError: [Errno 1] Operation not permitted: '/private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788/System/Library/CoreServices/boot.efi'

some debug print I added in the postinstall:

Aug 19 19:44:46 ops31 installd[387]: ./postflight: item: /OS X Install Data/boot.efi
Aug 19 19:44:46 ops31 installd[387]: ./postflight: mountpoint: /private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788
Aug 19 19:44:46 ops31 installd[387]: ./postflight: install_data_path: /OS X Install Data
Aug 19 19:44:46 ops31 installd[387]: ./postflight: helper_root: /private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788/System/Library/CoreServices
*** end debug print

So it fails trying to copy "/OS X Install Data/boot.ef"i to "/private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788/System/Library/CoreServices"

When I check the mount point, I find that it is read-only:

$ mount
/dev/disk2s2 on /private/tmp/PKInstallSandbox.0Vpmg1/tmp/tmpbJvxWW/dmg.o50o99 (hfs, local, nodev, nosuid, read-only, noowners, nobrowse)

Any idea how I can solve this problem?
Thanks for your help,
Fuzzycheck

How to create a Distribution PKG for El Capitan 10.11 Installer

I tried many times to add a Package "DisableSetupAssistent.pkg" to the Installer, but it dosen´t work. The Script in the PKG won´t execute at the Installation, the manual Install of the additional PKG work fine. I have read the Information for Yosemite, that only Distribution Packages will be supported. Mens this the same for El Capitan? I think yes, and i created a Distribution Package with the App "Packages", but it won´t work. A convert from a Jamf Composer FlatPackage was failed. How did you create those Packages to include this?

run OsxInstallPkg with SIP enable

Hello,
I'm working on the project to create OSXInstallPKg
But want to ask expert here that: Have a way to around the context SIP enable. To run the install package in OSX EL Capitan. I do not want to disable SIP.

Thank

firmware-updates

Hi

Will this package run the firmware-updates that the app does?

I don't know if this is the right place to ask questions, if not it would be great if somebody could point me to the correct forum.

Thanks
Niklas

OS installation does not kick off after reboot - macOS Sierra

Hi,

I am trying to create Sierra OSXinstallPKG and so far I am not successful.

Package install successfully and asks for a restart, after the restart OS installation does not kick off automatically... instead it stays on the manual installation process asking to accept license and to select the volume to continue the installation.

I am using the latest createOSXinstallPKG script "Modified Aug 2016 for installs under SIP"

Please suggest if I am using the correct script for building the package ? or can I modify the script to automate the OS installation ?

Thanks,
Kumaresh

Blessing install data folder causes error and pkg install fails

Hi there,

We are testing on OSX 10.12.2 NBI created with AutoImagrNBI 1.3.4 with imagr.app 1.3.8.1, trying to install OSX 10.12.3.

The OSXInstall pkg fails to install and from install.log has error
'Could not set boot device properly: 0xe00002bc'
'Failed to bless OS X installer for startup: Command ... '

It seems the, '-setBoot' option on the, 'bless' command causes this.
If I run the pkg with the modified script removing the above option the package runs fine.

This however does not happen when we run the same package on the DeploymentStudio NBI. Is there a workaround or a fix for this?

Thanks

Missing BaseSystem.dmg, macOS High Sierra 10.13

When attempting to run createOSXinstallPkg against the installer for macOS High Sierra I am getting the error "Missing BaseSystem.dmg in /Applications/Install macOS High Sierra.app". It looks like Apple has changed the location of BaseSystem.dmg. In 10.12, it was located inside the InstallESD.dmg disk image as a hidden dmg. It was at the root of the mounted disk image. It now appears to have been moved to outside of the InstallESD.dmg disk image.

createOSXInstallPkg-generated macOS Sierra installer is leaving `OS X Install Data` folder in root level of boot drive

I've noticed that a couple of macOS Sierra installers generated by createOSXInstallPkg are leaving behind an OS X Install Data folder on the root level of the boot drive.

I've observed this behavior with two separately generated macOS Sierra 10.12.0 build 16A323 installers:

  1. When using a stock createOSXInstallPkg-generated macOS Sierra installer with no added packages.
  2. When using a createOSXInstallPkg-generated macOS Sierra installer with added packages

Screenshot is attached.

screen shot 2016-09-23 at 3 05 05 pm

Minor issue relating to trailing slashes

In the documentation (readme.md) there are no trailing slashes mentioned in usage examples. If a trailing slash is not used on a 10.11 install then the following is reported : "Install OS X El Capitan.app doesn't appear to be an OS X installer application!"

Adding a trailing slash (eg. "--source /Applications/Install OS X El Capitan.app/") will result in perfect operation.

This project is just excellent! Thanks for all the hard work on making it just work so well!

macOS 10.12/10.12.1 hdiutil Issue?

Hello,

A seemingly new issue. Since I upgraded my Mac to macOS 10.12/10.12.1, it seems that after I run createOSXInstallPkg the Install.ESD does not automatically unmount. After running the build (which works great), running it again gives an hdiutil error like:

Examining and verifying source... Error: "hdiutil: attach failed - Resource busy " while mounting InstallESD.dmg. Could not mount diskimage /Applications/Install macOS Sierra.app/Contents/SharedSupport/InstallESD.dmg
After I restart this is resolved. Is anyone else experiencing this error?

Thank you for this great tool. Any help would be greatly appreciated.

Shawn

PHASE:Running package scripts

I have Deploystudio set up on a 10.11.5 machine. I get my computers to netboot to it no problem.
Created with createOSXinstallPkg
Deploystudio used to copy this in under 4 minutes and then the machine would reboot and start installing OS X 10.11.5. Now, it seems to be stuck and the log on the machine says something like
"2016-06-17 10:37:44.425 DeployStudio Runtime.bin[293:17608] installer:PHASE:Running package scripts"
But it never finishes. Does the same thing with a 10.10.5 package I used months ago successfully.
Any ideas why this isn't working?

createOSXinstallPkg + First Boot Package Install Generator - install error- The package %@ is missing or invalid

Hi

I have noticed on certain machines during an upgrade when tailing the
install log i see the following error:

installer[60829]: External component packages (1) trustLevel=100 (trust
evaluation failed: Error Domain=PKInstallErrorDomain Code=106 "The package
“%@” is missing or invalid." UserInfo=0x7faee8cd74e0
{NSLocalizedDescription=The package “%@” is missing or invalid.,
identifier=com.googlecode.munki.installosx.pkg})

I used First Boot Package Install Generator to create distribution style
first boot package. I am not sure why its only happening on certain
machines.

Any idea?

full error report here: http://www.wepaste.com/installerror/

If prompted for pwd leave field blank.

package installs successfully, but OS installation does not kick off after reboot.

Hi greg, I'm seeing an intermittant issue with deploying 10.10.1 using createOSXinstallPkg. In some installation attempts, the package created by createOSXinstallPkg will install successfully, but when the machine is rebooted, the OS installation does not actually begin. So far, each case has been solved by running the same pkg again- on the 2nd try, the installation does run. We're seeing this with probably 5-10% of attempted installations.
I haven't had any luck tracking down what's causing this in log files. Any ideas where I should start looking, or what might be going on here?

macOS Sierra 10.12 not working but code seems present

Been trying to use your script to create working packages for Dell Kace K1000.

I've looked at the script's code, it says it's already updated to work with macOS Sierra 10.12. Even looked at the content of the .app file, and the file names and locations seem to be the same as previous versions.

When the script gets to this, it fails:

TMPDIR = tempfile.mkdtemp(dir='/tmp')
source = options.source or plist_options.get('Source')
source = source.rstrip('/')
if source.endswith('.app'):
if not os.path.isdir(source):
fail('%s doesn\'t exist or isn\'t an app!' % source)
installesd_dmg = os.path.join(
source, 'Contents/SharedSupport/InstallESD.dmg')
osinstall_mpkg = os.path.join(
source, 'Contents/SharedSupport/OSInstall.mpkg')
if (not os.path.exists(installesd_dmg) or
not os.path.exists(osinstall_mpkg)):
fail('%s doesn\'t appear to be an OS X installer application!'
% source)

Here is the command I'm entering: sudo ./createOSXInstallPkg --source /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/
I've looked at the source mentioned in the code, Contents/SharedSupport/InstallESD.dmg, and it exists.

Is there something that can be done on my end to make sure it works or the code needs to be updated/modified to work with 10.12 ?

Thanks!

Error : Missing basesystem.dmg in high Sierra.app

Getting the mentioned error when I try to create vanilla OS pkg of High Sierra using the brtool guideline however same method works well with Sierra 10.12.6

basesystem.dmg is not missing in high Sierra.app it is there under shared support folder

Feature Request: .adtmpl support

In reading your post about the excellent new --make-fake-app feature, it struck me that some redundant work could potentially be avoided if createOSXinstallPkg could parse a list of packages in the AutoDMG template format. Altering the command from the post, it could look something like:

sudo ./createOSXinstallPkg --source /Applications/Install\ macOS\ Sierra\ Developer\ Beta.app --make-fake-app --plist /path/to/AutoDMG_VM.adtmpl

Since the AutoDMG and createOSXInstallPkg plists have a lot in common, it would make sense to parse it under the --plist option. In the example above, --source would override anything in the .adtmpl file (although you could also choose to just parse the Additional Packages and document that source was not supported).

Not enough space to copy all packages to InstallESD.dmg!

I try to add a package to 10.9.5,
why is warning about InstallESD.dmg,
if does not copy anything inside ?

sudo /Users/adam/Desktop/createOSXinstallPkg-master/createOSXinstallPkg --source /Volumes/10.9.5\ Mavericks/Install\ OS\ X\ Mavericks.app --pkg /Users/adam/Desktop/SecUpd2016-004Mavericks.pkg --output ~/Desktop/
Password:
Examining and verifying source...

InstallESD.dmg: /Volumes/10.9.5 Mavericks/Install OS X Mavericks.app/Contents/SharedSupport/InstallESD.dmg
OS Version: 10.9.5
OS Build: 13F34

Output path: /Users/adam/Desktop/InstallOSX_10.9.5_13F34_custom.pkg
Additional packages:

SecUpd2016-004Mavericks.pkg

Total additional package size: 362841 Kbytes

Checking available space on /Volumes/10.9.5 Mavericks/Install OS X Mavericks.app/Contents/SharedSupport/InstallESD.dmg...
Not enough space to copy all packages to InstallESD.dmg!
Available space: 112640 KBytes

Installer changes OS language

The installer changes the language on the machine. Normal behaviour?

e.g. Upgrade a OS X 10.9 machine in german to OS X 10.11 and the machine is in english after the reboot. OSXInstallerPKG was created on a machine with OS X 10.11 with german as primary language. The installer app was downloaded from the same machine with a german Apple ID.

Resulting pkg terminates with an error

I have tried several times and on several hosts to create a pkg for 10.11.6. I'm using very simple command (since more verbose commands failed as well) sudo /Users/localadmin/Documents/createOSXinstallPkg/createOSXinstallPkg --source /Users/localadmin/Documents/createOSXinstallPkg/Install\ OS\ X\ El\ Capitan.app/ --identifier com.apple.installosx.pkg. The error I get is: "The Installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance."

Please help, any assistance would be greatly appreciated.

Thank you

Automate install with DeployStudio or Munki tools

I'm using CreateOSXinstallPkg for months to automate the upgrade to OS X 10.10.x with DeployStudio 1.6.16 and 10.10.5 NetBoot set.
Now with 10.11 netBoot set and DeployStudio 1.7.1, the packages created by CreateOSXinstallPkg hang when it start the postflight even with 10.10 or 10.11 packages.
This is the installer log below:

Jan 20 16:20:45 mac-w89520wu64b installer[440]: Product archive /var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg trustLevel=100
Jan 20 16:20:45 mac-w89520wu64b installer[440]: External component packages (1) trustLevel=100 (trust evaluation failed: Error Domain=PKInstallErrorDomain Code=106 "The package “%@” is missing or invalid." UserInfo={NSLocalizedDescription=The package “%@” is missing or invalid., identifier=com.googlecode.munki.installosx.pkg})
Jan 20 16:20:45 mac-w89520wu64b installer[440]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost
Jan 20 16:20:45 mac-w89520wu64b installer[440]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Set authorization level to root for session
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Administrator authorization granted.
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Will use PK session
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Using authorization level of root for IFPKInstallElement
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Starting installation:
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Configuring volume "Macintosh HD"
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Preparing disk for local booted install.
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Free space on "Macintosh HD": 282.56 GB (282557243392 bytes).
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Create temporary directory "/Volumes/Macintosh HD/Install.4407aznst"
Jan 20 16:20:46 mac-w89520wu64b installer[440]: IFPKInstallElement (1 packages)
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: Enqueuing install with framework-specified quality of service (utility)
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: ----- Begin install -----
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: request=PKInstallRequest <1 packages, destination=/Volumes/Macintosh HD>
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: packages=(
"PKJaguarPackage file://localhost/var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/"
)
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Will do receipt-based obsoleting for package identifier com.googlecode.munki.installosx.pkg (prefix path=tmp)
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Extracting file://localhost/var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/ (destination=/Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox/Root/tmp, uid=0)
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Using system content trashcan path /Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox/Trashes for sandbox /Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Shoving /Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox/Root (1 items) to /Volumes/Macintosh HD
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Executing script "./postflight" in /var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/Contents/Resources
Jan 20 16:24:28 mac-w89520wu64b installer[440]: Can not connect to /var/run/systemkeychaincheck.socket: No such file or directory

Has you can see, the script is blocked when it start the ./postflight.... and the last error appears 4 minutes after it hang.
No more log in install.log but the DS log continuously shows: "Installer:PHASE:Running packages scripts..." over and over... I've try to let it for hours but it never finish install....

I think this is a DeployStudio issue because the problem had appears in the last version (1.7.1), even with 10.10 package generated by CreateOSXinstallPkg, but have you an idea of what cause this behavior ?

Thanks for your help

Jerome

Error message on 10.12.4 bundle

When running

sudo ./createOSXinstallPkg --source /Applications/Install\ macOS\ Sierra.app/

an error pops up of

Can't find brtool at /Applications/Install macOS Sierra.app/Contents/SharedSupport/InstallESD.dmg

Could be something new in the way Apple is packaging up these upgrade bundles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.