InstallInstallMacOS | or what I had to do to keep OpenCore going *

Issue with OpenCore Patcher –

Latest macOS update – 14.2.1 – if I downloaded it using opencore I got a file that was only approx 3GB. So not a complete installer but a patch from 14.2 to 14.2.1. Opencore could not create a bootable usb with that build.

I tried doing this on the 2012 mac – but it could not see past catalina. So I went to the M2 Mini – and ran these commands to get the installer. Then I will copy it over to the mac mini 2012., and see if opencore can use it to create the bootable usb.

Not sure what I would have done if did not have a modern mac.

 

softwareupdate --list-full-installers

Finding available software Software Update found the following full installers:

  • Title: macOS Sonoma, Version: 14.2.1, Size: 13066225KiB, Build: 23C71, Deferred: NO

  • Title: macOS Sonoma, Version: 14.2, Size: 13066238KiB, Build: 23C64, Deferred: NO

  • Title: macOS Sonoma, Version: 14.1.2, Size: 12604083KiB, Build: 23B92, Deferred: NO

  • Title: macOS Sonoma, Version: 14.1.1, Size: 12604952KiB, Build: 23B81, Deferred: NO

  • Title: macOS Sonoma, Version: 14.1, Size: 12603757KiB, Build: 23B74, Deferred: NO

  • Title: macOS Sonoma, Version: 14.0, Size: 12555162KiB, Build: 23A344, Deferred: NO

  • Title: macOS Ventura, Version: 13.6.3, Size: 11915962KiB, Build: 22G436, Deferred: NO

  • Title: macOS Ventura, Version: 13.6.1, Size: 11662168KiB, Build: 22G313, Deferred: NO

  • Title: macOS Ventura, Version: 13.6, Size: 11657005KiB, Build: 22G120, Deferred: NO

     

     softwareupdate --fetch-full-installer --full-installer-version 14.2.1
    

     

    Scanning for 14.2.1 installer Installing: 6.0%

    It is "installing" it into the /Application directory. Does not run app.

 

 


When attempting this on the macmini 2012 –

 

spiffy@mini-tv ~ % softwareupdate --fetch-full-installer --full-installer-version 14.2.1
Scanning for 14.2.1 installer
Install failed with error: Update not found
spiffy@mini-tv ~ %

 

it cannot be found –

 

 


installinstallmacos.py

 

Starting with macOS Sierra, Apple moved the macOS Installer applications from being exclusively an App Store download to now being included in the regular Software Update catalogs. This means that it’s possible to download macOS installers, including those for macOS betas or hardware-specific macOS builds, using the command-line softwareupdate tool.

To assist with this task, Greg Neagle has written a Python script named installinstallmacos.py. installinstallmacos.py is designed to do the following:

  1. Parse a specified Software Update feed.
  2. Identify the listed products which appear to be macOS installers.
  3. Display a menu of the available choices.

Once you’ve selected from the available options, the script does the following:

  1. Creates a disk image and names it with the appropriate information for the specified macOS installer.
  2. Mounts the disk image.
  3. Downloads all the relevant packages from the Software Update feed for the specified macOS installer.
  4. Installs the packages onto the disk image.
  5. Unmounts the disk image.
  6. Stores the disk image in the current working directory (this is likely going to be the logged-in user’s home folder.)

For more details, please see below the jump.

The script is available from the following location:

https://github.com/munki/macadmin-scripts/blob/main/installinstallmacos.py

Once you have it downloaded, please run the following command with root privileges to display the available options:

/path/to/installinstallmacos.py -h

Screen Shot 2018 02 27 at 4 01 14 PM

You have the ability to use no options, one option, or combine multiple options when running the script. To run the script without any options selected, please run the command shown below with root privileges:

/path/to/installinstallmacos.py

By default, this will use the Software Update catalog specified in the script. As of February 27, 2018, the following macOS installer choices are displayed:

Screen Shot 2018 02 27 at 4 08 26 PM

In this example, I’m selecting option 1 to download the standard macOS Installer application for macOS 10.13.3. Once an option has been selected, the script then runs through the rest of the actions described above and creates a disk image with the macOS Installer application stored in the Applications directory of the disk image.

Screen Shot 2018 02 27 at 4 14 04 PM

Screen Shot 2018 02 27 at 4 14 38 PM

Screen Shot 2018 02 27 at 4 15 13 PM

Note: A content folder owned by root is also created, which was used by the script to store the various downloaded components. If desired, this folder may be discarded once the disk image has been created.

Screen Shot 2018 02 27 at 4 17 53 PM

Screen Shot 2018 02 27 at 4 18 12 PM

Using compression

If it’s desirable to save space, the script includes a –compress option. This option will create a compressed read-only disk image, with only the macOS Installer application stored on the disk image.


Update – 2-27-2018: Greg reached out to let me know that the –compress option’s primary function is to produce a disk image which is compatible with Munki and Imagr.

Both tools expect to find the macOS Installer application at the root level of a read-only disk image. Using the –compress option will allow installinstallmacos.py to generate a compatible disk image.


To use this option, please run the command shown below with root privileges:

/path/to/installinstallmacos.py --compress

In this example, I’m also selecting option 1 to download the standard macOS Installer application for macOS 10.13.3. The script then runs through its actions and creates a compressed disk image with only the macOS Installer application stored inside.

Screen Shot 2018 02 27 at 4 38 59 PM

Screen Shot 2018 02 27 at 4 39 29 PM

Screen Shot 2018 02 27 at 4 40 07 PM

Using a different Software Update catalog

If it’s desirable to use a different Software Update catalog than the one specified in the script, the script includes a –catalogurl option. For example, you can specify the standard software catalog for macOS High Sierra using the URL shown below:

https://swscan.apple.com/content/catalogs/others/index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

To specify that you wanted to use the Software Update catalog above in place of the one specified in the script, you would run the command shown below with root privileges:

/path/to/installinstallmacos.py --catalogurl https://swscan.apple.com/content/catalogs/others/index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

Screen Shot 2018 02 27 at 4 43 55 PM

Using a different working directory

If it’s desirable to store the disk image in a specific directory, the script includes a –workdir option. To run the script with a directory specified, please run the command shown below with root privileges:

/path/to/installinstallmacos.py --workdir /path/to/directory_name_goes_here

That will store both the disk image and the content directory in the directory specified in the command.

Screen Shot 2018 02 27 at 4 54 13 PM

Screen Shot 2018 02 27 at 4 55 18 PM

 

Scroll to Top