Posted on 01-05-2021 08:49 AM
In PreStage Enrollments, I configured an enrollment package to install Rosetta with the script someone shared on this forum. The script is packaged with Composer:
#!/bin/bash arch=$(/usr/bin/arch) if [ "$arch" == "arm64" ]; then echo "Apple Silicon - Installing Rosetta" /usr/sbin/softwareupdate --install-rosetta --agree-to-license elif [ "$arch" == "i386" ]; then echo "Intel - Skipping Rosetta" else echo "Unknown Architecture" fi
Yet when I set up an M1 computer, many configurations are not getting installed and the logs show:
Installation failed. The installer reported: installer: This package requires Rosetta 2 to be installed.
Please install Rosetta 2 and then try again.
sudo softwareupdate --install-rosetta
installer: Error - Microsoft Teams can’t be installed on this computer.
Installation failed. The installer reported: installer: This package requires Rosetta 2 to be installed.
Please install Rosetta 2 and then try again.
sudo softwareupdate --install-rosetta
installer: Error - Pulse Secure can’t be installed on this computer.
Installation failed. The installer reported: installer: This package requires Rosetta 2 to be installed.
Please install Rosetta 2 and then try again.
sudo softwareupdate --install-rosetta
installer: Error - Code42 can’t be installed on this computer.
I don't understand what I need to do to get this work. I have a nice provisioning system before that works quite well on Intel.
Solved! Go to Solution.
Posted on 01-06-2021 08:01 AM
@timlarsen @sdagley @pchimombe Thanks for your responses and the information you provided. I spent a couple of hours re-reading forum posts before I saw your replies and ended up removing my prestage enrollment package and creating a first priority policy with script as per https://www.jamf.com/jamf-nation/discussions/37357/deploy-rosetta-on-m1-machines-before-everything-else#responseChild210791. After stumbling with bad interpreter errors because I'm still learning how to create scripts, I was able to successfully enroll my M1 MacBook Air with all my configurations and policies.
Posted on 01-05-2021 10:55 AM
Hi @bootrec based on your post, I think the problem is that all packages created with Composer (as of this writing and based on my experience - I'm not speaking for Jamf or quoting any official documentation) do not natively support ARM architecture without first having installed Rosetta, so it's a bit of a "catch 22". What I ended up doing was taking my pre-stage package (which includes the open source DEPNotify application as well as a script) and going through the following steps:
pkgutil --expand pkg-path dir-path
hostArchitectures="x86_64,arm64"
pkgutil --flatten dir-path pkg-path
Your first run package should now run on both Intel and M1 Macs. Again, this worked for me, but others may experience difference results, or maybe I'm over complicating the whole thing so would love to hear better solutions if they exist!
For your reference:
pkgutil man page
helpful thread I came across in my research
Posted on 01-05-2021 01:29 PM
Maybe change the distribution point to Cloud?
Posted on 01-05-2021 01:45 PM
@bootrec Another option that eliminates the need to create an enrollment package is to create a Script under Settings->Computer Management-Scripts with Priority:Before (in the Options tab) and the following Script Contents:
#!/bin/sh
[ $( /usr/bin/arch ) = "arm64" ] && /usr/sbin/softwareupdate --install-rosetta --agree-to-license
exit 0
Add this to a Policy that runs on Enrollment
Posted on 01-06-2021 08:01 AM
@timlarsen @sdagley @pchimombe Thanks for your responses and the information you provided. I spent a couple of hours re-reading forum posts before I saw your replies and ended up removing my prestage enrollment package and creating a first priority policy with script as per https://www.jamf.com/jamf-nation/discussions/37357/deploy-rosetta-on-m1-machines-before-everything-else#responseChild210791. After stumbling with bad interpreter errors because I'm still learning how to create scripts, I was able to successfully enroll my M1 MacBook Air with all my configurations and policies.
Posted on 03-15-2021 07:38 AM
in Composer 10.27.0, it appears @timlarsen 's trick is built in:
I unflatened the package and found the hostArchitectures setting change was already made. I'm about to test and I'll report back.
I have to say Jamf really missed the "Zero Day Readiness" for Apple Silicon. And Blame goes to Apple as well. I just got my first M1 and its a disaster.
I miss Steve more and more every day :(
Posted on 04-28-2021 07:57 AM
How does that "Distribution Point: None" work? I'm serious, what is that option even there for? I have a well-formed payload-free package with the script as post-install, on my AWS DP, and it won't run. Will it run if I put it on None?
Posted on 05-11-2021 06:18 AM
hello, any news on something capable of running during pre-stage enrolment ? (Other than an enrollment complete script)
I want to install apps during pre-stage, and need rosetta to be installed first so that all is working BEFORE the user accesses its desktop on first step
Posted on 05-11-2021 06:23 AM
@jpoirson The marked answer on this page works just name the policy something like *_00-Enable Rosetta so its the first to apply and have the trigger as "enrollment complete"
Posted on 05-11-2021 11:32 PM
hi @SCCM yes I already did this but my requirement is to have an Antivirus running as soon as the user lands on the desktop on enrolment so I install an antivirus during prestage enrolment, but using the policy as you mentionned installs Rosetta indeed on enrolment complete.
BUT the antivirus is not launched because it needed rosetta BEFORE installing, so the mac needs to be restarted once AV + Rosetta is isntalled to ensure all is running, and its not yet elegant
I tried creating an empty package with composer that runs isntall as pre-install script and put it in prestage enrolment , but didnt seem to work
its a bit egg/chicken issue here
Posted on 11-23-2021 10:22 PM
I would suggest putting the rosetta in the prestage and then the first package that you put can be Antivirus. This way we don't have any issues with the enrollment of our applications.
We do Splashbuddy based enrollment so that makes sure that all the packages are installed on the mac before the user has any access to the device.
Posted on 05-12-2021 06:38 AM
@jpoirson i had a similar requirement, i just changed the flow. Rather than selecting the Enrollement package (AV) to install in the prestage, i created a policy to install the AV on enrolment complete (which still runs before anyone longs in but after the rossetta one due to the name). Not sure if that would work in your environment.
Posted on 05-08-2022 09:38 AM
see my post