Open kyleericson opened 6 years ago
The script was unable to download the macOS installer because no policy with the trigger download-sierra-install
could be found scoped to your target Mac. It appears the script does not take this error into account so after the policy trigger failed, the script forged ahead until you see the error about startosinstall
not being found.
Is your target machine scoped to the download policy correctly?
This is what I have
Do you have the macOSInstall
script and the Install macOS Sierra.app
download in the same policy? They should be in separate policies. For example, I have a policy that is scoped to All Computers with a frequency set to Ongoing that you can only get to by calling the install_macos_10.13
trigger.
Finally, I have a policy in Self Service which is scoped to All Managed Clients not on 10.13 that runs the macOSInstall
script which will call the download policy if needed.
I had one policy with the pkg set to cache and the script to run.
You can still have a policy to cache the pkg but you would need a separate policy to install the package before running the script. For us, caching the pkg beforehand is not necessary.
Did you build a .pkg or .dmg for the install macOS .app
I built a .pkg using Packages that places the installer app in the Applications folder.
I get the .app to download and the script runs but doesn't do anything here is my log.
Feb 23 13:12:06 jamf-test-01 softwareupdate_notify_agent[3671]: appstoreupdateagent notified
Feb 23 13:12:06 jamf-test-01 softwareupdated[258]: Removing client SUUpdateServiceClient pid=3671, uid=501, installAuth=NO rights=(), transactions=0 (/System/Library/CoreServices/Software Update.app/Contents/Resources/softwareupdate_notify_agent)
Feb 23 13:12:22 jamf-test-01 softwareupdated[258]: Adding client SUUpdateServiceClient pid=3763, uid=501, installAuth=NO rights=(), transactions=0 (/System/Library/Frameworks/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc/Contents/MacOS/com.apple.WebKit.WebContent)
Feb 23 13:12:31 --- last message repeated 1 time ---
Feb 23 13:12:31 jamf-test-01 softwareupdated[258]: Removing client SUUpdateServiceClient pid=3763, uid=501, installAuth=NO rights=(), transactions=0 (/System/Library/Frameworks/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc/Contents/MacOS/com.apple.WebKit.WebContent)
Feb 23 13:12:54 localhost cleanup_installer[54]: Failed to remove bless info. Errno: 2
Feb 23 13:13:05 jamf-test-01 softwareupdate_firstrun_tasks[93]: Host swscan.apple.com isReachable = YES
Feb 23 13:13:38 jamf-test-01 softwareupdate_firstrun_tasks[93]: BuildTagCache: Building tag cache if necessary using catalog host swscan.apple.com
Feb 23 13:13:38 jamf-test-01 softwareupdated[270]: softwareupdated: Starting with build 10.11.6 (15G31)
Feb 23 13:13:39 jamf-test-01 softwareupdated[270]: /Library/Bundles does not exist - watching for directory creation
Feb 23 13:13:39 jamf-test-01 softwareupdated[270]: Adding client SUUpdateServiceClient pid=93, uid=200, installAuth=NO rights=(), transactions=0 (/System/Library/CoreServices/Software Update.app/Contents/Resources/softwareupdate_firstrun_tasks)
Feb 23 13:13:39 jamf-test-01 softwareupdated[270]: BuildTagCache: Cache is current
Feb 23 13:13:39 jamf-test-01 softwareupdate_firstrun_tasks[93]: BuildTagCache: Finished
Feb 23 13:13:39 jamf-test-01 softwareupdated[270]: Removing client SUUpdateServiceClient pid=93, uid=200, installAuth=NO rights=(), transactions=0 (/System/Library/CoreServices/Software Update.app/Contents/Resources/softwareupdate_firstrun_tasks)
Feb 23 13:13:39 jamf-test-01 softwareupdated[270]: BackgroundActivity: Activity check-in with Interval 21600
Feb 23 13:13:56 jamf-test-01 softwareupdated[270]: Adding client SUUpdateServiceClient pid=325, uid=0, installAuth=NO rights=(), transactions=0 (/usr/sbin/softwareupdate)
Feb 23 13:13:56 jamf-test-01 softwareupdated[270]: SUScan: Scan for client pid 270 (/System/Library/CoreServices/Software Update.app/Contents/Resources/softwareupdated)
Feb 23 13:13:59 jamf-test-01 softwareupdated[270]: SUScan: Using catalog https://swscan.apple.com/content/catalogs/others/index-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
Feb 23 13:14:00 jamf-test-01 loginwindow[97]: IASGetCurrentInstallPhaseList: no install phase array set
Feb 23 13:14:00 jamf-test-01 loginwindow[97]: IASGetCurrentInstallPhase: no install phase set
Feb 23 13:14:17 jamf-test-01 softwareupdated[270]: JS: No bundle at/Applications/SafeView.app
Feb 23 13:14:18 jamf-test-01 softwareupdated[270]: Package Authoring: error running installation-check script: TypeError: null is not an object (evaluating 'system.ioregistry.fromPath('IODeviceTree:/rom\@0').version') at x-distribution:///installer-gui-script%5B1%5D/installation-check%5B1%5D/@script
Feb 23 13:14:23 jamf-test-01 softwareupdated[270]: JS: No bundle at/Applications/SafeView.app
Feb 23 13:14:24 jamf-test-01 softwareupdated[270]: JS: 10.11.6
Feb 23 13:14:31 jamf-test-01 softwareupdated[270]: SUScan: Elapsed scan time = 34.9
Feb 23 13:14:31 jamf-test-01 softwareupdated[270]: Scan (f=1, d=0) completed
Feb 23 13:14:31 jamf-test-01 softwareupdated[270]: 6 updates found:
031-70458 | Digital Camera RAW Compatibility Update 6.21
091-10728 | Mac App Store Update for OS X El Capitan
091-14720 | Remote Desktop Client Update 3.9.3
091-51890 | Security Update 2018-001 10.11.6
091-71311 | Gatekeeper Configuration Data 137
zzzz091-44973 | iTunes 12.7.3
Feb 23 13:14:31 jamf-test-01 softwareupdated[270]: Ramped updates marked
Feb 23 13:14:33 jamf-test-01 softwareupdated[270]: Removing client SUUpdateServiceClient pid=325, uid=0, installAuth=NO rights=(), transactions=0 (/usr/sbin/softwareupdate)
Feb 23 13:14:42 jamf-test-01 installd[836]: installd: Starting
Feb 23 13:14:42 jamf-test-01 installd[836]: installd: uid=0, euid=0
Feb 23 13:15:10 jamf-test-01 InstallAssistant_springboard[893]: Springboarding to: /Applications/Install macOS Sierra.app/Contents/MacOS/InstallAssistant
Feb 23 13:15:10 jamf-test-01 InstallAssistant_springboard[893]: argv[0]: InstallAssistant
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Hardware: Parallels13,1 @ 2.90 GHz (x 2), 2048 MB RAM
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Running OS Build: Mac OS X 10.11.6 (15G31)
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: TMPDIR=/var/folders/g4/y49fytb123j2ywfhvpjhymw40000gn/T/
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: SHELL=/bin/bash
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: HOME=/Users/Administrator
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.BSlV1alesR/Render
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.kYU0j7e6Vo/Listeners
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: LOGNAME=Administrator
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: XPC_SERVICE_NAME=com.apple.InstallAssistant.Sierra.58592
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: USER=Administrator
Feb 23 13:15:10 jamf-test-01 InstallAssistant[893]: Env: XPC_FLAGS=0x0
Feb 23 13:15:11 jamf-test-01 osinstallersetupd[895]: OSISChunkedDownload loaded...
Feb 23 13:15:11 jamf-test-01 osinstallersetupd[895]: OSISAppStoreDownload loaded...
Feb 23 13:15:11 jamf-test-01 osinstallersetupd[895]: mountDiskImageWithPath: /Applications/Install macOS Sierra.app/Contents/SharedSupport/InstallESD.dmg
Feb 23 13:15:11 jamf-test-01 osinstallersetupd[895]: Checking Software Update catalog URL https://swscan.apple.com/content/catalogs/others/index-10.12customerseed-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
Feb 23 13:15:14 jamf-test-01 osinstallersetupd[895]: Mounting disk image complete, results dict = {
"system-entities" = (
{
"content-hint" = "GUID_partition_scheme";
"dev-entry" = "/dev/disk2";
"potentially-mountable" = 0;
"unmapped-content-hint" = "GUID_partition_scheme";
},
{
"content-hint" = EFI;
"dev-entry" = "/dev/disk2s1";
"potentially-mountable" = 1;
"unmapped-content-hint" = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B";
"volume-kind" = msdos;
},
{
"content-hint" = "Apple_HFS";
"dev-entry" = "/dev/disk2s2";
"mount-point" = "/Volumes/OS X Install ESD";
"potentially-mountable" = 1;
"unmapped-content-hint" = "48465300-0000-11AA-AA11-00306543ECAC";
"volume-kind" = hfs;
}
);
}
Feb 23 13:15:14 jamf-test-01 osinstallersetupd[895]: Mount point /Volumes/OS X Install ESD
Feb 23 13:15:14 jamf-test-01 osinstallersetupd[895]: osinstallersetupd registered client
Feb 23 13:15:14 jamf-test-01 osinstallersetupd[895]: Specifier (
I haven't tested the script in a Parallels VM before though it should work fine. Try running the startosinstall
command from the Terminal within the VM and see if you get the same results. That would at least help you determine if there is a problem with the macOSInstall
script or the VM environment. Maybe try testing the Jamf policies on a real Mac, too.
I ran this on the VM in terminal and it worked fine sudo "/Applications/Install macOS Sierra.app/Contents/Resources/startosinstall" --applicationpath "/Applications/Install macOS Sierra.app" --nointeraction
Spoke too soon errors with this: Preparing 81.687493... Preparing 82.512337... Preparing 83.337180... Preparing 84.162024... Error: system reboot failed...
I got this to work on a 10.11.6 machine to 10.12.6. I then modified it for 10.13.3 via JAMF and it never kicks off. I run the sh manually and it reboots and installs the OS in about 60secs.
What is the Jamf policy log on the 10.13.3 machine?
Script result: Power Check: OK - AC Power Detected
Disk Check: OK - 230057398272 Bytes Free Space Detected
/Applications/Install macOS High Sierra.app found, checking version.
OSVersion is 10.13.3
macOS High Sierra installer with 10.13.3 was already present, continuing...
Launching jamfHelper as Utility Window...
Launching startosinstall...
Well, that all looks fine. Does the install log offer any helpful detail?
Let me check after this other update goes through.
I am seeing something similar..going from 10.12.6 to 10.13.3...In my logs it looks like the AssetCacheLocatorService is trying to do something, fails, then that causes osinstallersetupd to send a kill signal and stop the upgrade. If you run the same policy a second time, after the first time has failed, does it work? That is what I am seeing...if I run the same policy a second time after the first one has failed, it just works.
Yes I get the same result it fails the first time and 2nd time works fine.
Slightly different here. I’ve modified this script and used it as a post install script in a single pkg.
However pkg locally from cli or gui and it works. Run it via a Casper policy and it fails first time, works second.
Sounds like the jamf binary or framework maybe causing the problem.
Has any one tried killing AssetCacheLocatorService before starting the upgrade? Or maybe a loop around startosinstall ?
I don't know if it's JAMF or Apple at this point. Just to see the difference, I packaged up 10.13.2 full installer and was able to run the script with no issues from a policy. It's worked 2 times in a row on one of my test VMs, going to try on a physical machine now and see if that works. Not seeing the AssetCacheLocator error anywhere in the install.log
OK found my problem, I was testing on a Mac that had not finished Filevaulting, so was getting an error from startosinstall of Target not found. Once FV had finished all was good. I have had constant success now on 3 Macs and 4 VM's using the script as a post install item in a PKG
I tried it on a Mac Mini with FV disabled and it still fails the first time, always will go the second time.
FYI, I have now tried this as a post install script in a PKG and its working fine on over 20 Macs. iMacs, Macbook's either FileVaulted or not running 10.10 to 10.12.6
Upgrade to 10.12.6 works every time. Upgrade to 10.13.3 fails 1st time works the 2nd time.
Has anyone tried with 10.13.4 yet?
I've been using the workflow with 10.13.4 and it's worked reasonably well.
Does anyone know why this policy always fails the first time via JAMF and goes through the second time right away?
@kyleericson This is what @Palgus had found:
I am seeing something similar..going from 10.12.6 to 10.13.3...In my logs it looks like the AssetCacheLocatorService is trying to do something, fails, then that causes osinstallersetupd to send a kill signal and stop the upgrade. If you run the same policy a second time, after the first time has failed, does it work? That is what I am seeing...if I run the same policy a second time after the first one has failed, it just works.
@Hacksore Yes that's what I see could we add into the script to kill the AssetCacheLocatorService or to just run the upgrade script again.
@kyleericson If I recall correctly the script exits fine, right? So I'm guessing running it twice could work but super it's hacky. As for killing AssetCacheLocatorService, when would you do that?
From what I've seen as of High Sierra this is no longer an issue and looks to be limited to the 10.12.x. branch (Someone feel free to correct me if I'm wrong).
I had tested on 10.11.6 and had the same issues
@kyleericson So maybe anything less than 10.13?
I'm working on a updated version of this script today (as long as my queue doesn't blow up), but I have been unable to duplicate the issue of having to all the script twice to kick off the upgrade. So if someone can confirm killing the AssetCacheLocatorService
before starting the startosinstall
binary fixes the issue, I can add that in.
@kc9wwh So, I have not been able to test this out..killing AssetCacheLocatorService
...but, all of a sudden, about 3 weeks ago, we stopped seeing the issue. I know we had changes made to our firewall, but I've not been able to track them back to this specific issue. At this time, we are not seeing the "have to click a second" time anymore. If others want to check firewall settings, maybe something happening there?
So I'm a noob and completely stuck, keep getting Launching startosinstall... /Library/Application Support/JAMF/tmp/macOSupgradeFV2.sh: line 255: /Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall: No such file or directory
Not sure what I am doing wrong and this doesn't make much sense to me at all:
#This should match a custom trigger for a policy that contains an installer What does this mean?
totally not getting the custom trigger portion if that is my issue. Which policy needs to be triggered by the other and how? What tells the computer or jamf to look for the custom trigger?
@swilliams83 The custom trigger is the name you named your custom trigger for the download. For instance mine was called deploy-High-Sierra and that appears on the policy under General -> Trigger -> select Custom and type name deploy-High-Sierra.
The error your getting is complaining that the installer in not being found in the Applications folder. That may be because you're not getting the installer installed on the computer because of your custom trigger not being correct.
If this doesn't help resolve your issue let me know I'd be happy to go in more detail to assist you.
@mpermann thanks for replying. So just making sure I understand. For the policy that deploys the package that places the .app in /Applications I add a custom trigger and name it? Then in the policy for the script, I add that custom trigger name to parameter at $6 ??
I feel like I did that and it still didn't work. I'll double-check my policies if this is correct?
Here is what the policy that installs the installer into the Applications folder looks like.
The policy that contains the script looks like the following:
Does this help clarify? If not let me know.
@mpermann thanks so much man, that did the trick but now getting an error "Helper tool crashed" so troubleshooting that.
I get this error via JAMF self service install.
For the Variable via JAMF I set this. OSINSTALLER /Applications/Install macOS Sierra.app VERSION 10.12.6 DOWNLOAD_TRIGGER download-sierra-install
Script result: Power Check: OK - AC Power Detected
Disk Check: OK - 51571163136 Bytes Free Space Detected
0Checking for policies triggered by "download-sierra-install" for user "Administrator"...
No policies were found for the "download-sierra-install" trigger.
mkdir: /usr/local/jamfps: File exists
Launching jamfHelper as FullScreen...
Launching startosinstall...
/Library/Application Support/JAMF/tmp/Mac OS 10.12.6 Upgrade: line 281: /Applications/Install macOS Sierra.app/Contents/Resources/startosinstall: No such file or directory