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

Added reboot delay of 5 minutes but it doesnt show up. #352

Closed mrmte closed 1 year ago

mrmte commented 1 year ago

Describe the bug with version 28.1 the reboot delay doesnt even show up. Previous release it worked but showed a full screen

To Reproduce

running via a launch daemon and a local script

Expected behavior expected to see a reboot delay

Code/log output Please supply the full command used, and if applicable, add full output from Terminal or from /var/log/erase-install.log. Either upload the log, or paste the output in a code block (triple backticks at the start and end of the code block please!).

2023-02-10 10:49:45 [erase-install] Caffeinating this script (pid=8267) 2023-02-10 10:49:45 [check_free_space] OK - 453 GB free/purgeable disk space detected 2023-02-10 10:49:45 [erase-install] Looking for existing installer app or pkg 2023-02-10 10:49:45 [find_existing_installer] Installer found at /Applications/Install macOS Ventura.app. 2023-02-10 10:49:45 [check_installer_is_valid] Checking validity of /Applications/Install macOS Ventura.app. Volume Shared Support on disk2s2 force-unmounted 2023-02-10 10:49:57 [check_installer_is_valid] Mounting /Applications/Install macOS Ventura.app/Contents/SharedSupport/SharedSupport.dmg 2023-02-10 10:49:58 [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml Volume Shared Support on disk2s2 force-unmounted 2023-02-10 10:50:00 [compare_build_versions] Comparing (1) 21G419 with (2) 22D49 2023-02-10 10:50:00 [check_installer_is_valid] Installer: 22D49 >= System: 21G419 : valid build. 2023-02-10 10:50:00 [erase-install] Running on architecture i386 2023-02-10 10:50:00 [check_power_status] OK - AC power detected 2023-02-10 10:50:00 [erase-install] Installer is at: /Applications/Install macOS Ventura.app 2023-02-10 10:50:00 [check_free_space] OK - 453 GB free/purgeable disk space detected

2023-02-10 10:50:00 [erase-install] WARNING! Running /Applications/Install macOS Ventura.app with reinstall option

2023-02-10 10:50:00 [erase-install] Sending to dialog: quit: 2023-02-10 10:50:00 [get_default_dialog_args] Invoking utility dialog 2023-02-10 10:50:00 [launch_startosinstall] Launching startosinstall 2023-02-10 10:50:01.788 Dialog[8353:43481] XType: com.apple.fonts is not accessible. 2023-02-10 10:50:01.788 Dialog[8353:43481] XType: XTFontStaticRegistry is enabled. 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.2%
Preparing: 0.3% 2023-02-10 10:50:13.076 Dialog[8353:43700] Spell server connection invalidated

Preparing: 0.4%
Preparing: 0.5%
Preparing: 0.6%
Preparing: 0.7%
Preparing: 0.8%
Preparing: 0.9%
Preparing: 1.0%
Preparing: 1.1%
Preparing: 1.2%
Preparing: 1.3%
Preparing: 1.4%
Preparing: 1.5%
Preparing: 1.6%
Preparing: 1.7%
Preparing: 1.8%
Preparing: 1.9%
Preparing: 4.1%
Preparing: 4.2%
Preparing: 4.3%
Preparing: 4.4%
Preparing: 4.5%
Preparing: 4.6%
Preparing: 4.7%
Preparing: 4.8%
Preparing: 4.9%
Preparing: 5.0%
Preparing: 5.1%
Preparing: 5.2%
Preparing: 5.3%
Preparing: 5.4%
Preparing: 5.5%
Preparing: 5.6%
Preparing: 5.7%
Preparing: 5.8%
Preparing: 5.9%
Preparing: 6.0%
Preparing: 6.1%
Preparing: 6.2%
Preparing: 6.3%
Preparing: 6.4%
Preparing: 6.5%
Preparing: 6.6%
Preparing: 6.7%
Preparing: 6.8%
Preparing: 6.9%
Preparing: 7.0%
Preparing: 7.1%
Preparing: 7.2%
Preparing: 7.3%
Preparing: 7.4%
Preparing: 7.5%
Preparing: 7.6%
Preparing: 7.7%
Preparing: 7.8%
Preparing: 7.9%
Preparing: 8.0%
Preparing: 8.1%
Preparing: 8.2%
Preparing: 8.3%
Preparing: 8.4%
Preparing: 8.5%
Preparing: 8.6%
Preparing: 8.7%
Preparing: 8.8%
Preparing: 8.9%
Preparing: 9.0%
Preparing: 9.1%
Preparing: 9.2%
Preparing: 9.3%
Preparing: 9.4%
Preparing: 9.5%
Preparing: 9.6%
Preparing: 9.7%
Preparing: 9.8%
Preparing: 9.9%
Preparing: 10.0%
Preparing: 10.1%
Preparing: 10.2%
Preparing: 10.3%
Preparing: 10.4%
Preparing: 10.5%
Preparing: 10.6%
Preparing: 10.7%
Preparing: 35.9%
Preparing: 36.5%
Preparing: 41.1%
Preparing: 45.7%
Preparing: 45.8%
Preparing: 50.4%
Preparing: 55.1%
Preparing: 55.5%
Preparing: 85.9%
Preparing: 87.1%
Preparing: 88.0%
Preparing: 89.2%
Preparing: 90.5%
Preparing: 92.5%
Preparing: 93.2%
Preparing: 93.8%
Preparing: 94.8%
Preparing: 95.5%
Preparing: 96.2%
Preparing: 96.7%
Preparing: 97.7%
Preparing: 98.2%
Preparing: 98.8%
Preparing: 99.3%
Preparing: 100.0%
Preparing: 100.7%
Preparing: 100.9%
Preparing: 102.1% 2023-02-10 11:02:19 [post_prep_work] Sending to dialog: quit: 2023-02-10 11:02:19 [post_prep_work] Opening full screen dialog (language=en) 2023-02-10 11:02:19 [get_default_dialog_args] Invoking fullscreen dialog 2023-02-10 11:02:20 [post_prep_work] Skipping rebootdelay of 300s

2023-02-10 11:02:20 [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success 2023-02-10 11:02:20 [erase-install] ERROR: 'caffeinate' could not be killed

2023-02-10 11:02:20 [finish] Script exit code: 0

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

Environment (please complete the following information):

grahampugh commented 1 year ago

I cannot reproduce this. I don't know if it could be some effect of you running from a launch daemon. The rebootdelay dialog is itself run from a launch daemon that is created by the erase-install script.

mrmte commented 1 year ago

For some strange reason it’s skipping it for n this version. Running the test however shows up as expected.

mrmte commented 1 year ago

Hi please can you tell me where in the script the launch daemon is created for the reboot delay? Im having difficulty locating it. Thanks

mrmte commented 1 year ago

for troubleshooting I installed swiftdialog 2.1 latest version and manually created /Library/Management/Scripts/erase-install/ and put the latest erase-install 28.1 in there and put the ventura app 13.2.1 in /Applications. I then ran the script locally. From what i am seeing i see zero dialogs now with 2.1

mrmte commented 1 year ago

i am trying a jamf policy with the launcher instead of a local script and launchdaemon. machine was on 12.6.3 prior and running version 29.0. I did get the downloading box but i didnt get preparing or the reboot delay.

erase-install 3.log

Screenshot 2023-02-22 at 16 34 03
mrmte commented 1 year ago

note i am experiencing everything as expect on Apple Silicon. When i am trying on touch bar intel macs this is where the problem occurs. Just tried a different machine intel 13" running OS 12.3 and zero dialogs showing up

mrmte commented 1 year ago

after i upgraded the machine to 12.6.3 i am seeing the dialogs. So this seems like this is the new minimum requirement and not just 12.x

mrmte commented 1 year ago

after the download there is now zero preparing or wait dialogs

mrmte commented 1 year ago

erase-install 4.txt here is another intel machine running 12.6.3. zero dialogs.

grahampugh commented 1 year ago

Please test https://github.com/grahampugh/erase-install/releases/tag/v29.1 which should fix this.

mrmte commented 1 year ago

works with v29.1 now