Rosetta install Script for M1

TJimenez
New Contributor

Hello everyone, I'm new to this community so please bare with me if this has been asked before.  I'd like to deploy a script that can check what chip is installed on my Mac mini fleet and if needed, install it. Thanks in advance. 

3 REPLIES 3

karthikeyan_mac
Valued Contributor

@TJimenez 

1. If you are deploying via Jamf, you can create a smart group with Architecture Type criteria as arm64 and create a policy with File and Process payload to execute command "softwareupdate --install-rosetta --agree-to-license". 

Screenshot 2022-11-08 at 11.35.00 AM.png

 

2. You can replace the command inpolicy as below to check the processor arch and install rosetta only for apple silicon devices..

[ $( /usr/bin/arch ) = "arm64" ] && /usr/sbin/softwareupdate --install-rosetta --agree-to-license

Hope this helps.

Thanks.

 

TJimenez
New Contributor

@karthikeyan_mac  I'll give this a try.  I plan on setting up my lab today so I'll keep you posted.  Thank you.

@TJimenez Also here's the script, I place it in our App Store, but I like @karthikeyan_mac idea better. :-) 

 

#!/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