Skip to main content

Hello,



I downloaded and got the Big Sur installer which is 12.21 GB.
When I try to package it with Composer, the pkg is only 15.6MB and damaged.



I tried with Composer versions 10.25.1 and 10.26 beta.



Do you have the same problem ?



Thank you for your help

@Cayde-6 i was bale to get it to work after some assistance on the Git Hub page. Below is what did it for me



Not sure this is the issue but you have to follow the first comment from dev-yeet.

Let’s assume your script file is in ~/Desktop/MegaPKGr.zsh and your pkg is /Applications/Install macOS Big Sur.pkg

DO:
1) Open Terminal
2) Execute ’sudo /Desktop/MegaPKGr.zsh /Application/Install macOS Big Sur.pkg'

DONT:
1) Open Terminal
2) cd Desktop (or cd into some folder counting the zsh file)
2) Execute ’sudo MegaPKGr.zsh /Application/Install macOS Big Sur.pkg'

Great Script! This is much more straight forward than using Composer for large packages. I'll be using this as a way to cleanly package Catalina and later Big Sur for deployment to our end users. We still have a few who are still on Mojave and need to be updated.


I have everything working with a .dmg and the cache option. My issue is that my self service policy will initiate the upgrade from the cache and will provide a start notification and then restart and upgrade after 5 minutes. It will not show the complete notification, and it also completely ignores my maintenance and restart payload, and the jamf.log never shows the self service policy as being run.



Anybody have a solution for this method?


@nsbickhart maybe it would be good, to create two jobs. One for deploying the dmg to the client and one for running the installer. I did not test this way, because I use the "pkg-method" . The job is not for updating the client, but for reset. Because of this, I delete the whole partition and install Big Sur "from scratch".


@fernando.gonzalez What command string from files and processes did you use to automatically run the DMG after it drops it in the designated folder?



I can deploy the policy and the installer file will drop in the Applications folder and I have it run this script '/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense' but it will not run. I tried to launch the install file manually and it will not run because it says that Apple can't identify the developer.


@emadams Oh, I would definitely make sure that when trying to run the Big Sur installer manually that you don't get a "can't identify the developer" message. It shouldn't do that. You may want to re-download your installer.



Out of curiosity do you have a Configuration Profile for Security & Privacy scoped and if so is Gatekeeper set to "Anywhere"?


@fernando.gonzalez



I will take a look.


@fernando.gonzalez



That change worked perfectly! Thank you for the profile idea.


@emadams



That change worked perfectly! Thank you for the profile idea.


I would not recommend reducing your security posture in this way as it allows the use of any application increasing the likelihood of malware and virus’s proliferating across your estate.


@NOVELLUS I ended up packaging as a .dmg and using a policy to cache and then a policy to install. With the help of smart groups, when the installer is in the applications directory, the install will show up in self service for the user to initiate at their leisure.



The package is 12GB. I'm wondering how that will go if mass deployed. We have users on and off network (mainly off) due to the pandemic. Wondering if they'll have any issues if their on a mi-fi or DSL other than taking forever to cache or failing.


Hi @nsbickhart , the PKG-File won't be smaller than a dmg-file, but it is easier to deploy it. That's my opinion. We deploy Big Sur (and other versions of MacOS) only inside our network enviroment, so there is no need to deploy it via DSL. Exept that, deploy by DSL would be no problem, because, our employees do have most a line from 50 MBit up to 100 MBit and more. Deploying at WAN won't be a problem anyway, too. We only have 60 clients to run and most of them are running on Big Sur, so the amount of clients to be updated to Big Sur is small.


Seems obvious now that I am typing it but the MegaPKGr.zsh of Big Sur did not work on my Catalina machine and did when ran on the Big Sur machine.


@MLBZ521
I made a DMG with the Big Sur installer. As you said; normally it should just drop the contents into the folder directory matching what you configure in Composer.
It does drop the file in Applications but it's only 'zero bytes'. Unless the DMG is around 12,3GB.


What if we use the full installer from Apple, which gives you a .pkg file?



Mr Macintosh has full database of all macOS Big Sur Beta and Final installers here > https://mrmacintosh.com/macos-big-sur-full-installer-database-download-directly-from-apple/


What @arnoldtaw said. Don't re-build a .pkg to deploy Install macOS Big Sur.app that Apple is already creating for you. Just find the appropriate version of InstallAssistant.pkg on https://mrmacintosh.com/macos-big-sur-full-installer-database-download-directly-from-apple/.


This script pulls it down directly and you can choose the version. then just upload to jamf and use as you want.


Thanks for this post. Composer package .pkg file was failing with stated error message. Simply altered to create as a .dmg file and it worked fine. This was for a SecureTest testing software that is "universal".


@Cayde-6 i was bale to get it to work after some assistance on the Git Hub page. Below is what did it for me



Not sure this is the issue but you have to follow the first comment from dev-yeet.

Let’s assume your script file is in ~/Desktop/MegaPKGr.zsh and your pkg is /Applications/Install macOS Big Sur.pkg

DO:
1) Open Terminal
2) Execute ’sudo /Desktop/MegaPKGr.zsh /Application/Install macOS Big Sur.pkg'

DONT:
1) Open Terminal
2) cd Desktop (or cd into some folder counting the zsh file)
2) Execute ’sudo MegaPKGr.zsh /Application/Install macOS Big Sur.pkg'


im getting this error any idea?

2021-11-20 00:23:31 Chosen folder is writable
2021-11-20 00:23:35 Disk has enough free space to build "macos.app.pkg"
2021-11-20 00:23:37 Succeeded creating temporary working directory
2021-11-20 00:23:41 Failed creating DMG archive of macos.app
2021-11-20 00:23:41 Aborting script
2021-11-20 00:23:42 Succeeded removing temporary items
2021-11-20 00:31:02 Chosen folder is writable
2021-11-20 00:31:06 Disk has enough free space to build "Install.pkg"
2021-11-20 00:31:08 Succeeded creating temporary working directory
2021-11-20 00:31:12 Failed creating DMG archive of Install
2021-11-20 00:31:12 Aborting script
2021-11-20 00:31:13 Succeeded removing temporary items


Talkingmoose's MegaPKGr script will sort this out and keep it as a familiar .pkg format



https://gist.github.com/e9ed319226c6da30dd633725e48a97b0



I've been using the MegaPKGr script for a few years now with much success. Today trying to create a PKG for Ventura 13.6.1, the script is failing at this point.

*********

Succeeded creating temporary working directory

Failed creating DMG archive of Install macOS Ventura.appura.app"...

Aborting script

*******

I have tried on two systems running Sonoma and Ventura with the same results. Has anyone seen this, and hopefully, have a resolution?

 


I've been using the MegaPKGr script for a few years now with much success. Today trying to create a PKG for Ventura 13.6.1, the script is failing at this point.

*********

Succeeded creating temporary working directory

Failed creating DMG archive of Install macOS Ventura.appura.app"...

Aborting script

*******

I have tried on two systems running Sonoma and Ventura with the same results. Has anyone seen this, and hopefully, have a resolution?

 


To be more specifric, this is the command in the script where it is failing:


# create dmg from the app to create a single file


 


logmessage "Creating disk image (DMG) archive of \\"$app\\"..."


/usr/bin/hdiutil create -quiet "$tempDirectory/$app.dmg" -ov -volname MegaPKGr -fs APFS -srcfolder "$appPath"


logresult "Succeeded creating DMG archive of $app" "Failed creating DMG archive of $app"


I've been using the MegaPKGr script for a few years now with much success. Today trying to create a PKG for Ventura 13.6.1, the script is failing at this point.

*********

Succeeded creating temporary working directory

Failed creating DMG archive of Install macOS Ventura.appura.app"...

Aborting script

*******

I have tried on two systems running Sonoma and Ventura with the same results. Has anyone seen this, and hopefully, have a resolution?

 


I found my resolution, which was to run this script on Big Sur with HFS+


I found my resolution, which was to run this script on Big Sur with HFS+


Please please please don't create your own packages for macOS installers when Apple already provides them for you...


macOS Sonoma installer links: https://mrmacintosh.com/macos-sonoma-full-installer-database-download-directly-from-apple/


macOS Ventura installer links: https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/


macOS Monterey installer links: https://mrmacintosh.com/macos-12-monterey-full-installer-database-download-directly-from-apple/


And thanks to Mr. Macintosh for curating those links!


Reply