Skip to main content
Question

Ideas on "How to Upgrade Mavericks via Self Service"?

  • October 23, 2013
  • 87 replies
  • 304 views

Show first post

87 replies

Forum|alt.badge.img+33
  • Hall of Fame
  • October 23, 2013

My method needs updating, as it doesn't take care of all the iCloud screens anymore. Still looking at it, hopefully a solution presents itself.


Forum|alt.badge.img+11
  • Contributor
  • October 23, 2013

Did anyone sit in on the session John Miller and Nick Amundsen did on migration OS's in your sleep? Drop the downloaded installer app into casper admin, create a target smart group for those machines to upgrade, cache the policy and have a trigger policy to run the upgrade against those machines who have cached the installer app. This is a feature of 9.2 they mentioned and will work w/ 8.73 for 10.8 or 10.9 as well, just a few things are handled a bit differently.


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • October 23, 2013

@mahughe. I was in that.

I've been trying with 8.73 but whilst I can get the installer to launch it's acting oddly when launched via Casper.

I think tins as it's launching as root as works otherwise.

Will be investigating later & will report back.


Forum|alt.badge.img+7
  • Contributor
  • October 23, 2013

@mahughe

No I was not in the session, so I don't have the benefit of that learning.
The sessions are also not online that I can find (yet or otherwise), so perhaps you'd be so kind to provide detailed instructions for the folks that did not attend.

That said, I was able to do it via Self Service as I've documented earlier, I would like to do it unattended as you seem to imply it can be done.


Forum|alt.badge.img+10
  • Contributor
  • October 23, 2013

Using the same method as pickerin

I've just upgraded to 9.2.

I just dropped the "Install OS X Mavericks" package (which was actually named "Install OS X Mavericks.InstallESD.dmg" within Casper Admin and uploaded it.

I then created a simple Self-Service policy to distribute it. We're actively testing it now and I'll report back with success or failures.

This of course is just for an upgrade, not for imaging an existing system, or enrolling them.

Worked perfectly. Great feature on 9.2

We do not use sub 500 accounts so that is not a concern here.


Forum|alt.badge.img+10
  • Valued Contributor
  • October 24, 2013

I've been running the self service for about 20 minutes so far and i'm not getting much feedback from the install. It just says Running Policy "Upgrade OS X to Mavericks" in the progress area with the "barber pole" style progress bar. I'm still able to use the Mac. Would have thought it would have logged out. I'll give it some more time and see what happens.

Edit: I walked away for a bit and when i came back it had restarted and began running the actual install. Took about 40 minutes from there. When it finished, i logged in with my standard user and it did prompt me with the iCloud screen. After skipping that, it completed the setup automatically and logged in. Very cool! I would have liked to have seen what it did before it restarted the first time. I have it set to restart immediately, so i'm guessing there was no warning. So, i'll probably play around with the notifications and warn people be ready for restart.

Edit 2: I checked the log and saw that it had downloaded the the installer package instead of installing from cache. Checked the policy and sure enough, it was set to "Install" instead of "Install from Cache". Oops.


Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • October 24, 2013

I have tried to use https://jamfnation.jamfsoftware.com/article.html?id=173 as a guideline as we are still not on 9.2 or 8.73.

The Mavericks Installer popped up and sadly it asked for the admin password to run. Even if run from Self Service as a Command (and not as suggested as a Script).

Anything that I can change to make the progress better?


Forum|alt.badge.img+11
  • Valued Contributor
  • October 24, 2013

Using the same method of pickerin

Running Casper 9.2, Self Service is 9.2

"I just dropped the "Install OS X Mavericks" package (which was actually named "Install OS X Mavericks.InstallESD.dmg" within Casper Admin and uploaded it."

Ditto

I then created a simple Self-Service policy to distribute it. "Ditto"

Errors:

[STEP 1 of 2]
Mounting rodgort to /Volumes/CasperShare...
[STEP 2 of 2]
Installing Install OS X Mavericks.InstallESD.dmg...
Error: The package "Install OS X Mavericks.InstallESD.dmg" could not be mounted (no mountable file systems).
"i saw the Casper Folder mount on Desktop of test Mac.
Retrying using distribution point VLAN 75 Netboot...
Mounting VLAN 75 Netboot to /Volumes/CasperShare 1...
Installing Install OS X Mavericks.InstallESD.dmg...
Error: The package "Install OS X Mavericks.InstallESD.dmg" could not be mounted (no mountable file systems).


Forum|alt.badge.img+7
  • Contributor
  • October 24, 2013

@corbin3ci

I do distribute via HTTP/S, not AFP. Not sure that makes a difference. Did you try caching the installer instead of running it directly over AFP? I'm not sure you can mount the installer from the distribution point and have it be successful.

Also, you can try mounting your distribution point directly, then copy the installer down, and see if you can run it correctly. Perhaps it got corrupted?


Forum|alt.badge.img+9
  • Contributor
  • October 24, 2013

We cache the package via AFP and only when connected to ethernet.


Forum|alt.badge.img+11
  • Valued Contributor
  • October 24, 2013

The last attempt, I cached the Mavericks installer manually to the test Mac via Remote. The log shows it was successful -

Sending Wake On LAN command...
Opening SSH Connection to 10.14.70.171...
Authenticating...
Successfully authenticated.
Verifying Computer's Identity...
The MAC Address has been verified.
Checking Operating System Version...
Running Mac OS X 10.8.4 (12E55)
Verifying /usr/sbin/jamf...
/usr/sbin/jamf is current (9.2)
Verifying /Library/Preferences/com.jamfsoftware.jamf.plist...
Preparing Policy...
Executing Policy 2013-10-24 at 1:31 PM | charris | 2 Computers...
Mounting rodgort to /Volumes/CasperShare...
Caching package...
Submitting log to https://rodgort.bct.3cinteractive.com:8443/
Finished.

I then created a new policy for Self Service with the installer package set to "install cached".

This is the resulting error -
Executing Policy OS X 10.9 "Mavericks" Self Service...
[STEP 1 of 1]
Error: The package (Install OS X Mavericks.InstallESD.dmg) could not be found.
Blessing in-place OS upgrade directory...
Creating Reboot Script…

So, after the installer caches, and the Self Service policy should start the Mavericks install from the cached installer or am I missing something?

Thanks! Corbin


Forum|alt.badge.img+7
  • Contributor
  • October 24, 2013

Re: iCloud prompt. I still don't know the exact location/key to disable this so on the reference machine I installed 10.9 on I logged in as a standard user and when prompted for iCloud account I selected to skip. Once logged in I restarted, logged in as Root and grabbed the Preferences directory for the user I had skipped iCloud for and used replaced the Preferences that were currently in my User Template. Now when I image another machine using that build no user gets the prompt.


Forum|alt.badge.img+11
  • Contributor
  • October 24, 2013

just saw this come across twitter from Jamf

http://www.jamfsoftware.com/sites/default/files/Deploying-OS-X-v10.7-or-Later-with-the-Casper-Suite.pdf


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • October 24, 2013

So I've been playing with the Setup Assistant settings, and I think I have the right defaults settings now to have it not show the iCloud Setup screen at login after the upgrade. In testing, these 4 items written to the com.apple.SetupAssistant.plist file in the User Template's Preferences folder seems to do the trick

defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.SetupAssistant.plist DidSeeCloudSetup -bool true
defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.SetupAssistant.plist LastSeenCloudProductVersion 10.9
defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.SetupAssistant.plist LastPreLoginTasksPerformedVersion 10.9
defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.SetupAssistant.plist LastPreLoginTasksPerformedBuild 13A603

Its possible the last 2 aren't really necessary. I might need to do some more testing to see. But I do know that writing those 4 items in to the plist turns off the iCloud Setup screen upon logging in to a new or existing account.

Note of course I'm only doing this to English.lproj. I suppose you could script looping through all localization directories and writing the settings into each one if that matters to you.

It would be great to get some additional verification if someone else wants to try these out.


ImAMacGuy
Forum|alt.badge.img+23
  • Esteemed Contributor
  • October 25, 2013

@mm2270: I'm interested, but how did you do the script at the SS installer?


Forum|alt.badge.img+7
  • Contributor
  • October 25, 2013

I used the Create OS X Installer to make a deployable PKG that included a first boot script, as well as Java 2013-005. I just put this in Self Service, and allowed a few of my test users to install it. The only thing I modified in the policy was a "shutdown -r now" at the end. I am considering adding in a fdesetup authrestart, but not sure if it would work, or if it really is necessary, since the end user is in front of their computer at self service, but could have other uses.

My disable iCloud is from @rtrouton, and the only thing I modified was where it says "10.8", changed to "10.9", but I know that he is working on an update for 10.9, which will be more definitive than my hack :)


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • October 25, 2013

@jwojda

I haven't done a full Self Service style upgrade yet. This was just done by installing it manually on top of a managed test box, and ssh'ing into the Mac afterwards and running the above commands. I then did not get the iCloud setup screen.

As for rolling it into the Self Service upgrade, I haven't given it much thought, but maybe something like a one time LaunchDaemon that runs a script which you can deploy along with the Self Service upgrade? Not sure, but I'll play around with it.

For now, if you'd like a script that will write the above settings in to all of the localization folders, I tested this and seems to work. I would only try this on a test machine of course (also needs to run as root obviously)

#!/bin/bash

OSvers=$( sw_vers -productVersion )
OSbuild=$( sw_vers -buildVersion )

Plist="Library/Preferences/com.apple.SetupAssistant.plist"

for DIR in $( ls "/System/Library/User Template/" | grep "lproj" ); do
    /usr/bin/defaults write "/System/Library/User Template/$DIR/$Plist" DidSeeCloudSetup -bool true
    /usr/bin/defaults write "/System/Library/User Template/$DIR/$Plist" LastSeenCloudProductVersion $OSvers
    /usr/bin/defaults write "/System/Library/User Template/$DIR/$Plist" LastPreLoginTasksPerformedVersion $OSvers
    /usr/bin/defaults write "/System/Library/User Template/$DIR/$Plist" LastPreLoginTasksPerformedBuild $OSbuild
done

I suppose the old FUT method might also work, but again, haven't really tested anything further than the above.


Forum|alt.badge.img+33
  • Hall of Fame
  • October 25, 2013

I've updated my iCloud pop-up disabling script so that it should now be able to handle 10.7.x - 10.9.x. Feedback welcomed:

https://github.com/rtrouton/rtrouton_scripts/blob/master/rtrouton_scripts/disable_icloud_pop_up/disable_icloud_pop_up.sh

Update 10-30-2013 - I noticed I was setting a couple of values that didn't need to be set. It looks like setting the following values are not needed to block the iCloud pop-up:

LastPreLoginTasksPerformedVersion
LastPreLoginTasksPerformedBuild

I’ve updated the script to remove the parts that referenced setting those values.

#!/bin/sh

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
sw_vers=$(sw_vers -productVersion)

# Checks first to see if the Mac is running 10.7.0 or higher. 
# If so, the script checks the system default user template
# for the presence of the Library/Preferences directory.
#
# If the directory is not found, it is created and then the
# iCloud pop-up settings are set to be disabled.

if [[ ${osvers} -ge 7 ]]; then

 for USER_TEMPLATE in "/System/Library/User Template"/*
  do
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
  done

 # Checks first to see if the Mac is running 10.7.0 or higher.
 # If so, the script checks the existing user folders in /Users
 # for the presence of the Library/Preferences directory.
 #
 # If the directory is not found, it is created and then the
 # iCloud pop-up settings are set to be disabled.

 for USER_HOME in /Users/*
  do
    USER_UID=`basename "${USER_HOME}"`
    if [ ! "${USER_UID}" = "Shared" ] 
    then 
      if [ ! -d "${USER_HOME}"/Library/Preferences ]
      then
        mkdir -p "${USER_HOME}"/Library/Preferences
        chown "${USER_UID}" "${USER_HOME}"/Library
        chown "${USER_UID}" "${USER_HOME}"/Library/Preferences
      fi
      if [ -d "${USER_HOME}"/Library/Preferences ]
      then
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
        chown "${USER_UID}" "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant.plist
      fi
    fi
  done
fi

ImAMacGuy
Forum|alt.badge.img+23
  • Esteemed Contributor
  • October 28, 2013

Thank you Rich!

Any recommendations on how to incorporate this into the Self Service upgrade path?


Forum|alt.badge.img+33
  • Hall of Fame
  • October 28, 2013

If you're using a first boot script, you could incorporate it into that. I recently added a 10.9 first boot script to my GitHub repo and included this functionality:

https://github.com/rtrouton/rtrouton_scripts/blob/master/rtrouton_scripts/first_boot/10.9/initialsetup.sh


Forum|alt.badge.img+4
  • Contributor
  • October 28, 2013

Is a "First Boot" script the same thing as having a policy that runs a script with the Trigger set to Startup?

by the way, thanks for sharing the scripts :)


ImAMacGuy
Forum|alt.badge.img+23
  • Esteemed Contributor
  • October 30, 2013

@rtrouton - kind of an OT question, but I tweaked your script to incl 2 time servers, but only 1 seems to get applied. have you noticed that? It seemed to work fine in your 10.8 script (thank you for that one too by the way).

#Primary Time server for Company Macs

TimeServer1=<corporate time server>

#Secondary Time server for Company Macs

TimeServer2=time.apple.com

# Set the primary network server with systemsetup -setnetworktimeserver
# Using this command will clear /etc/ntp.conf of existing entries and
# add the primary time server as the first line.

/usr/sbin/systemsetup -setnetworktimeserver $TimeServer1

# Add the secondary time server as the second line in /etc/ntp.conf

echo "server $TimeServer2" >> /etc/ntp.conf 

# Add the tertiary time server as the third line in /etc/ntp.conf

# echo "server $TimeServer3" >> /etc/ntp.conf

# Enables the Mac to set its clock using the network time server(s) 

/usr/sbin/systemsetup -setusingnetworktime on

ImAMacGuy
Forum|alt.badge.img+23
  • Esteemed Contributor
  • October 30, 2013

@gajones saw nobody responded - figured I would. A firstboot script is a script that runs after you image a machine, but before the user logs in. It's typically done to set system settings.


Forum|alt.badge.img+7
  • Contributor
  • October 30, 2013

@jwojda][/url

Over here: https://jamfnation.jamfsoftware.com/discussion.html?id=6857

It appears the ntp.conf file is now in /private/etc/ntp.conf

Try changing that path and try again. I'm guessing the /etc/ntp.conf file is just being ignored.

[-- edit --] I'm wrong, they have scripts for both over there, they also suggested a comma-separated list. I'd try opening up that topic again.


Forum|alt.badge.img+33
  • Hall of Fame
  • October 30, 2013

@jwojda][/url,

Not sure, the script works fine as is for me. When you edited the script, did you use TextEdit? I've noticed that can introduce issues for scripts by changing line endings and munging other bits.