If this has already been posted or asked I apologize. I looked here and googled this and got no clear answer on it.
Is it possible to use the EraseInstall and InstallPackage flags with a MacOS Install?
I've found various scripts with packages being called up with the InstallPackage flag and the paths to those packages are in /Users/Shared.
My confusion is that if I'm doing an EraseInstall. Their wouldn't be any packages in the Shared folder. Do I need to put the additional packages in the install media and call that up in the InstallPackages flag?
@ShaunRMiller83 You would pre-stage the additional pkgs you want installed, so many people choose the /Users/Shared folder for that purpose (but it can be somewhere else).
When you run
startosinstall --installpackage /path/to/pkg --eraseinstall the operating system does some magic to copy your pkgs to a hidden APFS container so it's "saved" for later. Then after the drive is wiped it can pull those installers for you.