Can a Mac run 10.9 or 10.8

Casper Extension Attributes (BASH Shell Scripts) to know if a Mac can be downgraded.

This is something that came up when we were forced to do downgrades to Macs coming in the Mavericks, since the 10.9 image wasn’t officially tested yet we could not release it to the wild. Some machines were okay, some were not. While the immediate need for this has passed, I did write this up so I could modify it for the next OS. These are not 100% accurate, as Apple changes the contents of a model and will not increment the model number (they did this with Mavericks and the MBP’s recently).

But this gives us a starting point.  Both for finding out what machines can run the OS, and for what machines can not.

To update the list (for 10.10 or X2 or 11.00) you will have to use MacTracker or something similar to find the minimal specs for the OS, then get the model number for each, replacing the minimum value in each.  I then took the a look through each model and found the model number that shipped with 10.9 and marked the one under that as the last version of the model that would run the older OS.

Extension Attribute to Check for Mavericks (10.9) Compatibility

#!/bin/bash

## Checks to see if Machine is compatible with Mac OS 10.9

hw_model=`sysctl hw.model | awk '{ print $2 }'`

mod_name=`echo $hw_model | tr -cd [[:alpha:]]`
mod_majver=`echo $hw_model | awk -F "," '{ print $1 }' | tr -cd [[:digit:]]`
mod_minver=`echo $hw_model | awk -F "," '{ print $2 }'`


## Find Machine And Report Back

case "$mod_name" in 
 iMac* )
 if [[ $mod_majver -ge 7 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacBookPro* )
 if [[ $mod_majver -ge 5 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 Xserve* )
 if [[ $mod_majver -ge 3 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacBookAir* )
 if [[ $mod_majver -ge 2 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 Macmini* )
 if [[ $mod_majver -ge 3 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacPro* )
 if [[ $mod_majver -ge 3 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacBook* )
 if [[ $mod_majver -ge 5 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 * )
 echo "<result>Error</result>"
 ;;
esac

exit 0

Extension Attribute for testing Mt. Lion (10.8) compatibility.

#!/bin/bash

## Checks to see if Machine is compatible with Mac OS 10.8
hw_model=`sysctl hw.model | awk '{ print $2 }'`

mod_name=`echo $hw_model | tr -cd [[:alpha:]]`
mod_majver=`echo $hw_model | awk -F "," '{ print $1 }' | tr -cd [[:digit:]]`
mod_minver=`echo $hw_model | awk -F "," '{ print $2 }'`

## Find Machine And Report Back
case "$mod_name" in 
 iMac* )
 echo "iMac"
 if [[ $mod_majver -ge 7 ]] && [[ $mod_majver -lt 15 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacBookPro* )
 echo "MBP"
 if [[ $mod_majver -ge 5 ]] && [[ $mod_majver -lt 11 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 Xserve* )
 echo "XS"
 if [[ $mod_majver -ge 3 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacBookAir* )
 echo "MBA"
 if [[ $mod_majver -ge 2 ]] && [[ $mod_majver -lt 7 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 Macmini* )
 echo "Mm"
 if [[ $mod_majver -ge 3 ]] && [[ $mod_majver -lt 7 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacPro* )
 echo "MP"
 if [[ $mod_majver -ge 3 ]] && [[ $mod_majver -lt 6 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi
 ;;
 MacBook* )
 echo "MB"
 if [[ $mod_majver -ge 5 ]]; then
 echo "<result>Compatible</result>"
 else
 echo "<result>Not Compatible</result>"
 fi

 ;;
 * )
 echo "<result>Error</result>"
 ;;
esac
exit 0

’till next time.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s