MacOS Ventura Upgrade Issue

mtucker_
New Contributor III

I am working on an Update Script to get our fleet of Macs (M1/M2/Intel) upgraded to Ventura. I am using swiftdialog to notify the users that they may need to input their password and erase-install to actually run the process. I have tested it on 3 or 4 Macs (Apple silicon) and the process worked without a hitch. However, on my last two test machines (we have a variety of hardware configurations) the process fails.

I added the --overwrite and --cleanup-after-use flags but they do not seem to help.

 

Any idea what I am missing

 

Here is the script command I am using..

/Library/Management/erase-install/erase-install.sh --reinstall --os=13 --update --overwrite --current-user --min-drive-space=60 --check-power --depnotify --cleanup-after-use 

 

and here is the error in the log...

Result of command:
[erase-install] v27.1 script execution started: Mon Dec 12 08:16:10 CST 2022
[erase-install] Caffeinating this script (pid=1207)
[check_free_space] OK - 447 GB free/purgeable disk space detected
[check_power_status] OK - AC power 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.0.1-22A400.sparseimage.
[check_installer_is_valid] Checking validity of .
[check_installer_is_valid] Using DTSDKBuild value from Info.plist
[check_installer_is_valid] Installer Info.plist could not be found!
[check_installer_is_valid] Build of existing installer could not be found, so it is assumed to be invalid.
[erase-install] ERROR: Invalid installer is present. Run with --overwrite option to ensure that a valid installer is obtained.

[erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success
/Library/Management/erase-install/erase-install.sh: line 1046: 1226 Terminated: 15 /usr/bin/caffeinate -dimsu -w $$

[finish] Script exit code: 1

 

Thanks,

Matt

1 ACCEPTED SOLUTION

mtucker_
New Contributor III

In doing more research I found this link https://github.com/grahampugh/erase-install/issues/316 that others are having this issue as well.

I went back to a successfully upgraded Mac and noticed that there was a "content" folder in the erase-install folder that no one had access to. I gave myself permissions and deleted it and it seems to be upgrading as expected now. Fingers crossed....

View solution in original post

7 REPLIES 7

mtucker_
New Contributor III

Also, I have tried deleting the file in question "Install_macOS_13.0.1-22A400.sparseimage" and then re-running the script but it fails with the same error.

I think it has to do with the Info.plist file being referenced, but I'm not sure where that file comes from.

mtucker_
New Contributor III

So I re-read the documentation on erase-install and i thought maybe the --update flag was interferring so I changed the command line to this

Running command /Library/Management/erase-install/erase-install.sh --reinstall --os=13 --overwrite --current-user --min-drive-space=60 --check-power --depnotify

 

However, I still see the same error in the log

 

Result of command:
[erase-install] v27.1 script execution started: Mon Dec 12 09:06:32 CST 2022
[erase-install] Caffeinating this script (pid=1294)
[check_free_space] OK - 447 GB free/purgeable disk space detected
[check_power_status] OK - AC power 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.0.1-22A400.sparseimage.
[check_installer_is_valid] Checking validity of .
[check_installer_is_valid] Using DTSDKBuild value from Info.plist
[check_installer_is_valid] Installer Info.plist could not be found!
[check_installer_is_valid] Build of existing installer could not be found, so it is assumed to be invalid.
[erase-install] ERROR: Invalid installer is present. Run with --overwrite option to ensure that a valid installer is obtained.

[erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success
/Library/Management/erase-install/erase-install.sh: line 1046: 1313 Terminated: 15 /usr/bin/caffeinate -dimsu -w $$

[finish] Script exit code: 1

mtucker_
New Contributor III

In doing more research I found this link https://github.com/grahampugh/erase-install/issues/316 that others are having this issue as well.

I went back to a successfully upgraded Mac and noticed that there was a "content" folder in the erase-install folder that no one had access to. I gave myself permissions and deleted it and it seems to be upgrading as expected now. Fingers crossed....

mtucker_
New Contributor III

So this is the issue, it turns out. I deleted the "content" folder and it works as expected. Not sure what is causing this but I will be adding a line to remove that folder.

Are you able to share the new script you used that ended up working out?

mtucker_
New Contributor III

@AbeTechster, here is the script we use. This calls the SwiftDialog script and seems to work for us. It is the standard one most have found on GitHub with the two statements for deleting the damaged download and other previous installers. We have not received any additional failures related to the script. 

Hope this helps...

 

#!/bin/bash

:<<DOC

This script was created on 12/12/22 to
address an issue with the upgrade download
process in erase-install where is creates
this folder. Then it starts the swiftDialog
process. 

DOC

#Deletes Content folder
sudo rm -Rf /Library/Management/erase-install/content

#Deletes any previous installers
sudo rm -f /Library/Management/erase-install/Install_macOS*


dialog="/usr/local/bin/dialog"

if [[ -n ${4} ]]; then titleoption="--title"; title="${4}"; fi
if [[ -n ${5} ]]; then messageoption="--message"; message="${5}"; fi
if [[ -n ${6} ]]; then iconoption="--icon"; icon="${6}"; fi
if [[ -n ${7} ]]; then overlayoption="--overlayicon"; overlayicon="${7}"; fi
if [[ -n ${8} ]]; then button1option="--button1text"; button1text="${8}"; fi
if [[ -n ${9} ]]; then button2option="--button2text"; button2text="${9}"; fi
extraflags=${10}
action=${11}

${dialog} \
${titleoption} "${title}" \
${messageoption} "${message}" \
${iconoption} "${icon}" \
${overlayoption} "${overlayicon}" \
${button1option} "${button1text}" \
${button2option} "${button2text}" \
${10}

returncode=$?

case ${returncode} in
0) echo "Pressed Button 1"
## Process exit code 0 scenario here
;;

2) echo "Pressed Button 2"
## Process exit code 2 scenario here
;;

3) echo "Pressed Button 3"
## Process exit code 3 scenario here
;;

*) echo "Something else happened. exit code ${returncode}"
## Catch all processing
;;
esac

# make sure script exits cleanly otherwise Self Service will complain if it's anything other than 0
exit 0

 

Policy - F.P.pngPolicy - Script.png

Jason33
Contributor III

Great find!  This just started popping up for some of my users as well.  Some upgrades are working without issue, but some result in the error of the installer being invalid.  I'll try your method and see if that works.