Hello all,
I am currently working on a script, mildem I load the installer via "softwareupdate --fetch-full-installer" and then install via "startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense --nointeraction".
Unfortunately, I currently observe the following error and only on the M1 MacBooks:
Has anyone observed the error. I must also say that all users are standard users without admin rights.
A check if the user has a SecureToken takes place in the script above and only if the user has a SecureToken, only if the has a token, the installer will be loaded and installed.
if [ "$HELPER" == "0" ]
then
processor=$(/usr/sbin/sysctl -n machdep.cpu.brand_string)
if [ "$processor" == "Apple M1" ]
then
if [ -d "$install_macos_app" ]
then
free_space_check
get_user_details
rm -rf "$install_macos_app"
softwareupdate --fetch-full-installer
install_macos_app=$(find /Applications -type d -name 'Install macOS*')
"$install_macos_app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense --nointeraction --stdinpass --user "$account_name" <<< $account_password
else
free_space_check
get_user_details
softwareupdate --fetch-full-installer
install_macos_app=$(find /Applications -type d -name 'Install macOS*')
"$install_macos_app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense --nointeraction --stdinpass --user "$account_name" <<< $account_password
fi
else
if [ -d "$install_macos_app" ]
then
free_space_check
rm -rf "$install_macos_app"
softwareupdate --fetch-full-installer
install_macos_app=$(find /Applications -type d -name 'Install macOS*')
"$install_macos_app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense --nointeraction
else
free_space_check
softwareupdate --fetch-full-installer
install_macos_app=$(find /Applications -type d -name 'Install macOS*')
"$install_macos_app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense --nointeraction
fi
fi
else
exit 0
fi