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
834 stars 131 forks source link

not able to mount DMG to check installer version #482

Closed mltsalg closed 6 months ago

mltsalg commented 7 months ago

Downloaded a clean Sonoma Installer pkg = PASSED Deployed as cached install via Jamf policy = PASSED Install the cached package via Jamf Policy = PASSED Nudge triggers self service for install = PASSED Erase-install Mounting of dmg = FAILED

For further testing, I am able to mount the dmg via terminal or browsing to folder /Applications/Install\ macOS\ Sonoma.app/Contents/SharedSupport and mounting the SharedSupport.dmg file after double clicking. I also have no issues mounting any other DMG files

Any input on how to resolve this would be greatly appreciated.

` 2024-02-03 12:23:49 | v32.0 | [log_rotate] Finished rotating logs in /Library/Management/erase-install/log

2024-02-03 12:23:49 | v32.0 | [erase-install] v32.0 script execution started: Sat Feb 3 12:23:49 CST 2024

2024-02-03 12:23:49 | v32.0 | [erase-install] Arguments provided: --cleanup-after-use --reinstall --check-power --os 14 --no-timeout --postinstall-command "sudo jamf policy -event enable-jamfconnectlogin" 2024-02-03 12:23:49 | v32.0 | [erase-install] System version: 13.6.4 (Build: 22G513) 2024-02-03 12:23:50 | v32.0 | [check_for_swiftdialog_app] swiftDialog v2.3.3.4734 is installed (/Library/Application Support/Dialog/Dialog.app) 2024-02-03 12:23:50 | v32.0 | [check_for_swiftdialog_app] Creating dialog log (/var/tmp/dialog.Wkx)... 2024-02-03 12:23:50 | v32.0 | [erase-install] Caffeinating this script (pid=26058) 2024-02-03 12:23:50 | v32.0 | [check_free_space] OK - 181 GB free/purgeable disk space detected 2024-02-03 12:23:50 | v32.0 | [erase-install] Looking for existing installer app or pkg 2024-02-03 12:23:50 | v32.0 | [find_existing_installer] Installer found at /Applications/Install macOS Sonoma.app. 2024-02-03 12:23:50 | v32.0 | [check_installer_is_valid] Checking validity of /Applications/Install macOS Sonoma.app. 2024-02-03 12:23:50 | v32.0 | [check_installer_is_valid] Mounting SharedSupport.dmg failed 2024-02-03 12:23:50 | v32.0 | [check_installer_is_valid] Build of existing installer could not be found, so it is assumed to be invalid. 2024-02-03 12:23:50 | v32.0 | [erase-install] Existing installer OS version does not match requested OS (14). 2024-02-03 12:23:50 | v32.0 | [erase-install] ERROR: Invalid installer is present. Run with --overwrite, --update or --replace-invalid option to ensure that a valid installer is obtained.

2024-02-03 12:23:51 | v32.0 | [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success

2024-02-03 12:23:51 | v32.0 | [finish] sending quit message to dialog (/var/tmp/dialog.Wkx) 2024-02-03 12:23:51 | v32.0 | [finish] Script exit code: 1 `

Screenshot 2024-02-03 at 12 28 23 PM Screenshot 2024-02-03 at 12 31 03 PM
grahampugh commented 7 months ago

That is not a bug, it means something is preventing the DMG from mounting. It may not be relevant that you can mount the DMG as a user. You'll need to check your security software to see if disk mounting is being blocked in any context.

mltsalg commented 7 months ago

I grabbed the v33 Pre-release script and without any changes on my end have had several successful upgrades so far. Thank you for the modifications.