grahampugh / erase-install

A script that automates downloading macOS installers, and optionally erasing or upgrading macOS in a single process. Watch the video!
https://grahamrpugh.com/2023/05/14/macaduk-presentation-eraseinstall.html
Apache License 2.0
845 stars 132 forks source link

fail at preparing #380

Closed sbrother59 closed 1 year ago

sbrother59 commented 1 year ago

Describe the bug On lot of Mac in Quebec (I don't know why in Quebec), I've a fail when laptop prepare the installer. usually between 40-55%. error in French: Impossible de vérifier macOS. (unable to verify macOS).

Preparing: 55.2%            Impossible de vérifier macOS.
   [erase-install] Timeout reached for PID 9174!
/Library/Management/erase-install/erase-install.sh: line 2669:  9174 Terminated: 15          /bin/cat 0<&4
   [erase-install] Reached end of script. Exit with error 42.

To Reproduce I run the erase install with JAMF by a script after installing the package,

Script result:

[erase-install-launcher] Starting script "/Library/Management/erase-install/erase-install.sh" --os 13 --update --reinstall --confirm --no-fs --min-drive-space 37 --cleanup-after-use --postinstall-command "jamf recon"

Expected behavior

I just want to upgrade as other country where I manage macOS.

Code/log output

Script result: [erase-install-launcher] Starting script "/Library/Management/erase-install/erase-install.sh" --os 13 --update --reinstall --confirm --no-fs --min-drive-space 37 --cleanup-after-use --postinstall-command "jamf recon"    [erase-install] v27.3 script execution started: Mon Mar 13 13:36:35 EDT 2023    [erase-install] Caffeinating this script (pid=9034)    [check_free_space] OK - 60 GB free/purgeable disk space detected    [erase-install] Looking for existing installer app or pkg    [find_existing_installer] Installer sparse image found at /Library/Management/erase-install/Install_macOS_13.2.1-22D68.sparseimage.    [check_installer_is_valid] Checking validity of /Volumes/Install_macOS_13.2.1-22D68/Applications/Install macOS Ventura.app. Volume Shared Support on disk4s2 force-unmounted    [check_installer_is_valid] Mounting /Volumes/Install_macOS_13.2.1-22D68/Applications/Install macOS Ventura.app/Contents/SharedSupport/SharedSupport.dmg    [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml Volume Shared Support on disk4s2 force-unmounted    [compare_build_versions] Comparing (1) 19G2021 with (2) 22D68    [check_installer_is_valid] Installer: 22D68 >= System: 19G2021 : valid build.    [erase-install] Running on architecture i386    [erase-install] Installer is at: /Volumes/Install_macOS_13.2.1-22D68/Applications/Install macOS Ventura.app    [erase-install] Closing jamfHelper download message (language=fr)     [check_free_space] OK - 60 GB free/purgeable disk space detected     [erase-install] WARNING! Running /Volumes/Install_macOS_13.2.1-22D68/Applications/Install macOS Ventura.app with reinstall option     [erase-install] Opening jamfHelper confirmation message (language=fr) 0   [erase-install] User CONFIRMED erase-install or reinstall    [erase-install] Opening jamfHelper message (language=fr)    [erase-install] Writing LaunchDaemon which will remove /Library/Management/erase-install at next boot    [launch_startosinstall] Launching startosinstall By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms. If you do not agree, press CTRL-C and cancel this process immediately. Preparing to run macOS Installer...  Preparing: 0.0%             Preparing: 0.1%             Preparing: 0.3%             Preparing: 0.4%             Preparing: 0.6%             Preparing: 0.7%             Preparing: 0.8%             Preparing: 1.0%             Preparing: 1.1%             Preparing: 1.3%             Preparing: 1.4%             Preparing: 1.5%             Preparing: 1.7%             Preparing: 1.8%             Preparing: 2.0%             Preparing: 2.1%             Preparing: 2.2%             Preparing: 2.4%             Preparing: 2.5%             Preparing: 2.6%             Preparing: 2.8%             Preparing: 2.9%             Preparing: 3.1%             Preparing: 3.2%             Preparing: 3.3%             Preparing: 3.5%             Preparing: 3.6%             Preparing: 3.8%             Preparing: 3.9%             Preparing: 4.0%             Preparing: 4.2%             Preparing: 4.3%             Preparing: 4.5%             Preparing: 4.6%             Preparing: 4.7%             Preparing: 4.9%             Preparing: 5.0%             Preparing: 5.2%             Preparing: 5.3%             Preparing: 5.4%             Preparing: 5.6%             Preparing: 5.7%             Preparing: 5.9%             Preparing: 6.0%             Preparing: 6.1%             Preparing: 6.3%             Preparing: 6.4%             Preparing: 6.6%             Preparing: 6.7%             Preparing: 6.8%             Preparing: 7.0%             Preparing: 7.1%             Preparing: 7.2%             Preparing: 7.4%             Preparing: 7.5%             Preparing: 7.7%             Preparing: 7.8%             Preparing: 7.9%             Preparing: 8.1%             Preparing: 8.2%             Preparing: 8.4%             Preparing: 8.5%             Preparing: 8.6%             Preparing: 8.8%             Preparing: 8.9%             Preparing: 9.1%             Preparing: 9.2%             Preparing: 9.3%             Preparing: 9.5%             Preparing: 9.6%             Preparing: 9.8%             Preparing: 9.9%             Preparing: 10.0%             Preparing: 10.2%             Preparing: 10.3%             Preparing: 10.5%             Preparing: 10.6%             Preparing: 10.7%             Preparing: 10.9%             Preparing: 11.0%             Preparing: 11.2%             Preparing: 11.3%             Preparing: 11.4%             Preparing: 11.6%             Preparing: 11.7%             Preparing: 11.8%             Preparing: 12.0%             Preparing: 12.1%             Preparing: 12.3%             Preparing: 12.4%             Preparing: 12.5%             Preparing: 12.7%             Preparing: 12.8%             Preparing: 13.0%             Preparing: 13.1%             Preparing: 13.2%             Preparing: 13.4%             Preparing: 13.5%             Preparing: 13.7%             Preparing: 13.8%             Preparing: 13.9%             Preparing: 14.2%             Preparing: 14.5%             Preparing: 14.7%             Preparing: 15.0%             Preparing: 15.3%             Preparing: 15.6%             Preparing: 15.9%             Preparing: 16.1%             Preparing: 16.4%             Preparing: 16.7%             Preparing: 17.0%             Preparing: 17.3%             Preparing: 17.5%             Preparing: 17.8%             Preparing: 18.1%             Preparing: 18.4%             Preparing: 18.7%             Preparing: 18.9%             Preparing: 19.2%             Preparing: 19.5%             Preparing: 19.8%             Preparing: 20.1%             Preparing: 20.3%             Preparing: 20.6%             Preparing: 20.9%             Preparing: 21.2%             Preparing: 21.5%             Preparing: 21.7%             Preparing: 22.0%             Preparing: 22.3%             Preparing: 22.6%             Preparing: 22.9%             Preparing: 23.1%             Preparing: 23.4%             Preparing: 23.7%             Preparing: 24.0%             Preparing: 24.3%             Preparing: 24.5%             Preparing: 24.8%             Preparing: 25.1%             Preparing: 25.4%             Preparing: 25.7%             Preparing: 25.9%             Preparing: 26.2%             Preparing: 26.5%             Preparing: 26.8%             Preparing: 27.1%             Preparing: 27.3%             Preparing: 27.6%             Preparing: 27.9%             Preparing: 28.2%             Preparing: 28.5%             Preparing: 28.7%             Preparing: 29.0%             Preparing: 29.3%             Preparing: 29.6%             Preparing: 29.9%             Preparing: 30.1%             Preparing: 30.4%             Preparing: 30.7%             Preparing: 31.0%             Preparing: 31.3%             Preparing: 31.5%             Preparing: 31.8%             Preparing: 32.1%             Preparing: 32.4%             Preparing: 32.7%             Preparing: 32.9%             Preparing: 33.2%             Preparing: 33.5%             Preparing: 33.8%             Preparing: 34.0%             Preparing: 34.3%             Preparing: 34.6%             Preparing: 34.9%             Preparing: 35.2%             Preparing: 35.4%             Preparing: 35.7%             Preparing: 36.0%             Preparing: 36.3%             Preparing: 36.6%             Preparing: 36.8%             Preparing: 37.1%             Preparing: 37.4%             Preparing: 37.7%             Preparing: 38.0%             Preparing: 38.2%             Preparing: 38.5%             Preparing: 38.8%             Preparing: 39.1%             Preparing: 39.4%             Preparing: 39.6%             Preparing: 39.9%             Preparing: 40.2%             Preparing: 40.5%             Preparing: 40.8%             Preparing: 41.0%             Preparing: 41.3%             Preparing: 41.6%             Preparing: 42.6%             Preparing: 42.7%             Preparing: 42.8%             Preparing: 42.9%             Preparing: 43.0%             Preparing: 43.1%             Preparing: 43.2%             Preparing: 43.3%             Preparing: 43.4%             Preparing: 43.5%             Preparing: 43.6%             Preparing: 43.7%             Preparing: 43.8%             Preparing: 43.9%             Preparing: 44.0%             Preparing: 44.1%             Preparing: 44.2%             Preparing: 44.3%             Preparing: 44.4%             Preparing: 44.5%             Preparing: 44.6%             Preparing: 44.7%             Preparing: 44.8%             Preparing: 44.9%             Preparing: 45.0%             Preparing: 45.1%             Preparing: 45.2%             Preparing: 45.3%             Preparing: 45.4%             Preparing: 45.5%             Preparing: 45.6%             Preparing: 45.7%             Preparing: 45.8%             Preparing: 45.9%             Preparing: 46.0%             Preparing: 46.1%             Preparing: 46.2%             Preparing: 46.3%             Preparing: 46.4%             Preparing: 46.5%             Preparing: 46.6%             Preparing: 46.7%             Preparing: 46.8%             Preparing: 46.9%             Preparing: 47.0%             Preparing: 47.1%             Preparing: 47.2%             Preparing: 47.3%             Preparing: 47.4%             Preparing: 47.5%             Preparing: 47.6%             Preparing: 47.7%             Preparing: 47.8%             Preparing: 47.9%             Preparing: 48.0%             Preparing: 48.1%             Preparing: 48.2%             Preparing: 48.3%             Preparing: 48.4%             Preparing: 48.5%             Preparing: 48.6%             Preparing: 48.7%             Preparing: 48.8%             Preparing: 48.9%             Preparing: 49.0%             Preparing: 49.1%             Preparing: 49.2%             Preparing: 49.3%             Preparing: 49.4%             Preparing: 49.5%             Preparing: 49.6%             Preparing: 49.7%             Preparing: 49.8%             Preparing: 49.9%             Preparing: 50.0%             Preparing: 50.1%             Preparing: 50.2%             Preparing: 50.3%             Preparing: 50.4%             Preparing: 50.5%             Preparing: 50.6%             Preparing: 50.7%             Preparing: 50.8%             Preparing: 50.9%             Preparing: 51.0%             Preparing: 51.1%             Preparing: 51.2%             Preparing: 51.3%             Preparing: 51.4%             Preparing: 51.5%             Preparing: 51.6%             Preparing: 51.7%             Preparing: 51.8%             Preparing: 51.9%             Preparing: 52.0%             Preparing: 52.1%             Preparing: 52.2%             Preparing: 52.3%             Preparing: 52.4%             Preparing: 52.5%             Preparing: 52.6%             Preparing: 52.7%             Preparing: 52.8%             Preparing: 52.9%             Preparing: 53.0%             Preparing: 53.1%             Preparing: 53.2%             Preparing: 53.3%             Preparing: 53.4%             Preparing: 53.5%             Preparing: 53.6%             Preparing: 53.7%             Preparing: 53.8%             Preparing: 53.9%             Preparing: 54.0%             Preparing: 54.1%             Preparing: 54.2%             Preparing: 54.3%             Preparing: 54.4%             Preparing: 54.5%             Preparing: 54.6%             Preparing: 54.7%             Preparing: 54.8%             Preparing: 54.9%             Preparing: 55.0%             Preparing: 55.1%             Preparing: 55.2%            Impossible de vérifier macOS.    [erase-install] Timeout reached for PID 9174! /Library/Management/erase-install/erase-install.sh: line 2669:  9174 Terminated: 15          /bin/cat 0<&4    [erase-install] Reached end of script. Exit with error 42.     [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success /Library/Management/erase-install/erase-install.sh: line 1047:  9046 Terminated: 15          /usr/bin/caffeinate -dimsu -w $     [erase-install] attempting to terminate the 'jamfHelper' process - Termination message indicates success /Library/Management/erase-install/erase-install.sh: line 1047:  9159 Terminated: 15          "$jamfHelper" -windowType $window_type -title "${!dialog_reinstall_title}" -heading "${!dialog_reinstall_heading}" -description "${!dialog_reinstall_desc}" -icon "$dialog_reinstall_icon"     [finish] Script exit code: 42 [erase-install-launcher] Exit (42)
--
Error running script: return code was 42.
[STEP 4 of 5]
[STEP 5 of 5]

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

grahampugh commented 1 year ago

Hi. Your clients are not accepting the installer that you downloaded. All I can suggest is that you try the download again. You can also ensure that you don't have any security software on these computers that could prevent the installer from running properly.

sbrother59 commented 1 year ago

thx for the fastest answer I will check with the user this afternoon ;)

sbrother59 commented 1 year ago

I test to install macOs ventura manually, and I've same issu during the preparing intaller

2023-03-15 11:17:43-04 C02DV6JHML7L osinstallersetupd[984]: bridgeOS update prepare failed: Error Domain=BOSErrorDomain Code=204 "An error occurred during preflight." UserInfo={NSLocalizedDescription=An error occurred during preflight., UpdateBundleIdentifier=com.apple.bridgeOSCustomer, NSUnderlyingError=0x600002190810 {Error Domain=BridgeOSSoftwareUpdateError Code=19 "MSU - 2 (Failed to personalize with options.);MSU - 2 (Could not personalize boot/firmware bundle.);AMAI - 3501 (AMAuthInstallBundlePersonalize() failed: You must authorize with the signing server before making this request);" UserInfo={SystemPartitionSize=1973374976, MSUErrorCode=2, AMAuthInstallErrorCode=3501, MSUErrorDescription=Failed to personalize with options., NSLocalizedDescription=MSU - 2 (Failed to personalize with options.);MSU - 2 (Could not personalize boot/firmware bundle.);AMAI - 3501 (AMAuthInstallBundlePersonalize() failed: You must authorize with the signing server before making this request);}}}

So I think the issu is not from user and not from erase install, maybe bridgeOS version ?

https://mrmacintosh.com/how-to-restore-bridgeos-on-a-t2-mac-how-to-put-a-mac-into-dfu-mode/