Closed Rorzzer closed 1 year ago
Previously it seemed to be stumbling on the old Big Sur installer that was in the applications folder but more recently it is finding the cached Ventura installer but failing to get the details from it then not obeying the --overwrite command and simply failing.
I've also confirmed that the Ventura installer is in the Applications folder but the script doesn't seem to be finding that.
This is the most recent error message from a device that has the installer in the Applications folder but seems to have a broken/invalid installer in a sparesimage? Is it just a matter of deleting the spareimage? Is it a bug that the script is not obeying the --overwrite option?
I have this issue too.
Most times that people have brought this up, it's because there is some security software which is preventing the disk image (sparseimage) from mounting. This prevents the downloaded installer from being checked.
You also have some mistakes in your commands, which are not the cause of your error, but should be addressed nonetheless, e.g.:
You should not use the --force-curl option when using the installer package, because package comes with the correct version of installinstallmacos.pay already.
You are separately caching the installer but then your second command has the --overwrite flag, which will overwrite any cached installer!
I was only testing with the --overwrite flag, usually we would use --update but I've found that regardless of the flag the same behaviour is observed. I also tried this on a device without any anti-virus or security software installed and found the same result.
We've moved away from caching installers until this is resolved. The behaviour when an installer is already present is unpredictable and fails entirely if multiple installers exist in the Applications folder. For now we are back to --update --move and if it fails we forcibly remove all installers with another policy then try again.
@Rorzzer,
I am seeing the same behavior on my Macs as well. I have also tried --update and also --overwrite to no avail.
In looking in the /Library/Management/erase-install/ folder I see a folder called "content" to which no one but system has access to. This folder doesn't exist on other successfully upgraded systems but does on all failed ones. I granted permissions and deleted the folder and it seems that the download process creates it immediately.
Once I deleted this folder on a system, the script seems to be running.
For reference, here is my script with flags /Library/Management/erase-install/erase-install.sh --reinstall --os=13 --current-user --min-drive-space=60 --check-power --depnotify --overwrite
Hope this helps.
The content
folder is where installinstallmacos.py
stores the downloaded content from Apple's software update servers.
We don't have a really good way to detect a corrupt downloaded installer, although 27.1 should be re-downloading if it doesn't get a version string from the installer. If that's not working for some reason (I will check this again when I'm on a network that's fast enough), there are various built-in ways to workaround all this:
--move
flag with your caching policy so that you end up with an installer in the Applications folder rather than the sparseimage (which is the default item created by installinstallmacos.py
).--cleanup-after-use
flag to delete the /Library/Contents/erase-install
folder and all its contents on the next reboot (this would not delete an installer that had been moved to the Applications folder).Alternatively, use the --pkg
option which creates a package instead of a sparseimage, for those of you who have computers that are struggling to read the contents of the sparseimage properly.
Or even use the --fetch-full-installer
which uses Apple's built-in system for obtaining the installed (has one advantage that it can get the installer from a caching server if you have one).
Thanks for response.
I tried the --cleanup-after-use to no avail, but it could be because I don't have the /Library/Content/ folder. My erase-install installed to /Library/Management/erase-install/ so maybe that's why the flag didn't work.
I will add the --move flag to see how that works.
Huh? I guess you misunderstood.
The normal path for erase-install.sh installation is /Library/Management/erase-install
. installinstallmacos.py
is also installed in that folder. Therefore, it stores its working files in /Library/Management/erase-install/content
.
It seems I did. The cleanup process doesn’t appear to remove the “content” folder. I’ll try it again.
Thanks,
Matt
- Use the
--cleanup-after-use
flag to delete the/Library/Contents/erase-install
folder and all its contents on the next reboot (this would not delete an installer that had been moved to the Applications folder).
This is what I was misunderstanding I thought you literally meant it was deleting the folder listed above, not the content folder under erase-install.
Am I still off target?
Huh, sorry, if I wrote that I must have been tired!
It should say: Use the --cleanup-after-use flag to delete the /Library/Management/erase-install folder and all its contents on the next reboot
Thanks for taking the time to follow up! I think I'm understanding now.
This issue was fixed in 27.2. The current version is 28.1.
Describe the bug
Firstly, caching macOS 13 via the script seems to grab an invalid build OR the script incorrectly identifies a cached build as invalid then fails. The error message says to use the --overwrite option even when using the --overwrite option
Our Caching command - that I believe is working but the installer is considered invalid later on?
/Library/Management/erase-install/erase-install.sh --os=13 --overwrite --move --force-curl
Our install command - that marks the cached installer as invalid and says to run with the --overwrite option
/Library/Management/erase-install/erase-install.sh --reinstall --os=13 --overwrite --depnotify --cleanup-after-use --check-power --force-curl --power-wait-limit 180
other commands I've tried that give the exact same error message,
/Library/Management/erase-install/erase-install.sh --reinstall --os=13 --replace_invalid --depnotify --cleanup-after-use --check-power --force-curl --power-wait-limit 180
/Library/Management/erase-install/erase-install.sh --reinstall --os=13 --update --depnotify --cleanup-after-use --check-power --force-curl --power-wait-limit 180
To Reproduce
Expected behavior A clear and concise description of what you expected to happen. First command should grab a valid installer and cache it. Second command should see the valid installer and install it without an error message.
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!).Caching Log
Install log
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context Add any other context about the problem here.