It is the end of school time here in Australia which means its time to recall around devcies and get them ready fot next year. You can find the binary inside the app at this path: Install macOS Mojave. Deploying the Installer is pretty easy, for the most part just treat it like any other package however it is probably best to deploy this via a dmg. Starting in the Optionally specify the name of the new volume with --newvolumename.
So if we distribute the latest version of Mojave when startosinstall is run the device will also upgrade at the same time. Talk about hitting two birds with one stone! Now that we have a method for erasing the data how can we leverage this in a way to make the process fast and reduce work required by IT?
You could write a more indepth script that looked for the installer and if it wasn't there, it could be installed via something like jamf policy -id Once each student runs this the device will reboot and begin the clean installation with all previous user data gone and next to no work from IT other than building another policy or two. Nothing ever works out perfect, whether it be that the macOS installer was corrupt or the student didn't have enough free storage on the device.
How can we get that device in the state we need without trying to fix it for another minutes? Begin to Twist Everything still needs to be simple and fast, rebooting onto the USB doesn't really fit into that equation.
However, now that the macOS installer is on the USB we made in step one we can use it for our eraseinstall. One of my favorite little Mac tricks is the. Finaly because this creates another partition on the internal drive this is all T2 compatible. Here is an example erase. Now you can plug in the USB then double-click the erase. With enough of these USB's on standby, you should have no problems.
Stay up to date! Many hands make light work. Backup Plan Nothing ever works out perfect, whether it be that the macOS installer was corrupt or the student didn't have enough free storage on the device.These devices, after receiving a notification for a pending macOS Mojave enforcement, begin the OS update process, but after multiple reboots, would end up on the same OS version they had started with.
It seemed strange to us that an OS update would abort mid-update, so we did some research as soon as we had heard about the problem. It's something we've encountered internally as well. We use Fleetsmith to manage our devices, after all.
Looking into the reported issues and also our own internally reported cases, we noticed that all the devices that had experienced an OS upgrade failure had a T2 chip. Because of this bad interaction between our enforcement feature and macOS upgrade failures, if the macOS upgrade fails and is enforced, Fleetsmith will repeatedly attempt to upgrade and fail. For that reason, we recommend going through System Preferences.
Some OS upgrade nuances for T2 chip devices:. For additional reading, check out this presentation.
Fleetsmith is Apple device management that just works. Stay up to date! We use Fleetsmith to manage our devices, after all Looking into the reported issues and also our own internally reported cases, we noticed that all the devices that had experienced an OS upgrade failure had a T2 chip.
Of that 32 bits, only 8 are reserved for the exit code of the process and those are interpreted as an unsigned value. I doubt it. If you really wanted something more powerful I'd suggest that you'd switch to an "exit string", instead of a numeric exit code with a wider range. The exit status of an executed command is the value returned by the waitpid system call or equivalent function.
Exit statuses fall between 0 andthough, as explained below, the shell may use values above specially. Exit statuses from shell builtins and compound commands are also limited to this range.
Under certain circumstances, the shell will use special values to indicate specific failure modes. Sign up to join this community.
The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Why do I get error when returning -1 Ask Question. Asked 7 years, 11 months ago.
Active 7 years, 11 months ago. Viewed 60k times. Gilles 'SO- stop being evil' k gold badges silver badges bronze badges.
Eugene S Eugene S 2, 7 7 gold badges 25 25 silver badges 34 34 bronze badges. Active Oldest Votes. MadScientist MadScientist 2, 1 1 gold badge 15 15 silver badges 16 16 bronze badges.
Nice edit.Apple introduced the ability to erase and cleanly install the Mac operating system in macOS High Sierra Two years later, they continue to improve on this valuable tool for Mac admins.
During our recent webinar Reinstall a Clean macOS with One ButtonI discussed these improvements and offered advice for constructing a workflow for Mac admins to use in their environments. This tool enabled Mac admins to script installing the Mac OS, allowing them to deploy upgrades to their fleets through management tools like Jamf Pro.
It was a gamechanger because they could now refresh Macs in the field without needing additional equipment like bootable thumb drives. All management settings, applications, user accounts and user data were erased. Now, Apple has expanded functionality in macOS Catalina Downloading a new OS installer is now handled by the same mechanism as getting Safari, security and other updates for the operating system.
The command line equivalent to Software Update is softwareupdate and it too supports downloading not only Catalina but also Mojave and High Sierra installers, which are no longer available in the App Store. This requires you be logged in with administrator privileges.
Any time you see this, you can omit the slash and write the entire command on one line. Terminal will show the progress as the app is downloading and installing. Downloading the installer app using Terminal takes about the same time as downloading it through Software Update.
To retrieve an earlier macOS version, add the --full-installer-version option followed by the macOS version number. This command gets the latest Mojave installer.
We need to use the model identifier of Macs to pinpoint the exact models Apple says are eligible for Catalina. Rather than bloat our Smart Computer Group with 60 more lines of criteria, we can use a regular expression or regex to do that. Regex lets us create a pattern that can match certain strings of characters such as model identifiers.
This one line of text will match all the eligible models including the new inch MacBook Pro released this month. Copy and paste it in the value field for the Model Identifier criterion in the above Smart Computer Group. This will help us identify Macs that have the Catalina installer app already downloaded to prevent Jamf Pro from downloading it again. If our target Macs are already running Catalina, the most efficient way to get the installer to them is to tell them to download it themselves.Using the macOS High Sierra OS installer's startosinstall tool to install additional packages
Click the first big Download button. Complete the following payloads and scope in the policy. To deploy the Catalina installer to a Mac running macOS Mojave or earlier, use Composer to create a package that places the installer app into the Applications folder and then build the package as a PKG.
Upload this to your Jamf Pro distribution point.
Subscribe to RSS
Use the same policy settings above but replace the Files and Processes payload with the Packages payload and add the Catalina package from Composer. When Macs next check in every 15 minutes by defaultthey will silently download and cache the installer without interrupting the end users. As I mentioned earlier, the -- eraseinstall option is part of the startosinstall command line tool found inside the Install macOS Catalina app bundle. Locate and drag the startosinstall file into a Terminal window and add -- usage to the end.
This lists several arguments each beginning with double-dashes and explains what each does. We want to use the following:. When we copy the installer app to our target Macs and run the startosinstall command with the above options, it quickly takes available free space on the Mac and carves out a temporary partition.This is not recommended and should only be applicable to advanced users who have specific reasons to not want to convert a Mac to APFS.
Quick and Dirty OS Installations with startosinstall
Mac users who ran the beta of macOS High Sierra may remember earlier versions of the beta builds had a toggle setting during installation to skip APFS conversion, but that option toggle is no longer available in the installer. Again, there is no benefit or particular reason for most users to skip APFS conversion. This is really only for advanced users who need to skip APFS for a specific reason, usually for networking or drive sharing compatibility purposes.
Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox!
Enter your email address below:. Does anybody knows if this tip applies to the Mojave installer? Although the minstallconfig. Your goal is to change the true to false!!!
Erase All Contents And Settings - erase and reinstall macOS in situ
Regards by Italy. For example, to edit the minstallconfig. This is the real answer for people booting from a USB installer. The only caveat is the parts of the command that have spaces.
Hope this helps anyone having problems. Can anyone tell me whether the Wait, wha?! Another thing I found out the hard way is that if you accidentally clear your partition table on APFS, there is virtually no way to recover it that I could find. Better have good backups. Did this while installing a linux os on external HD and mistakenly selected the wrong disk. The people answering those calls are not IT engineers, so you need to escalate this, or easier find the answers online.
Avoid Case-Sensitive formats if you can. See the person a couple spots above. Apple Extended Journaled please. The only way to un-APFS is to connect it to another machine and totally wipe it. It takes time, effort, and patience.
I have been looking for 3 days for the answer to the upgrade issues with HS. This is a great article and the solution works like a charm. Pitty, but —volume option is not available anymore thus I can not install on my 3rd party raid….
How do I go about doing this? Windows doesnt see the APFS disc. Shutdown and restart ALT is still working but is not ideal. But that system has been in place for years like The consulting team at Pro Warehouse has been working on an application. I mentioned this application in my talk at MacSysAdmin. The startosinstall --eraseinstall command with all its options is fairly accessible for an administrator. There have been some attempts to make the command more accessible to end users.
With Mojave, Apple is enforcing the requirement to have an active internet connection before you start the installation. We chose to build an application with an interface that runs the necessary checks and displays a summary, before the startosinstall --eraseinstall is launched.
This will provide end users, techs and admins easy access to a tool which wipes the system. EraseInstall will show three screens, the first will explain what the application does wipe everything! EraseInstall uses a spotlight query to locate available installer applications. It may take a few minutes after an installer app has been copied to a system for spotlight to pick it up. Please only run this on a test machine! You can download an installer and the source code for the EraseInstall application here.
Looks great but I am stuck on the screen after OS download, just before reboot and install…. We had a problem with the 1. We fixed it with the 1. Thanks for this and informative site really helpful. Will see how to integrate the app with Jamf pro.
A group of computers I had upgraded to mojave and used this methodology but for some reason it cannot find mojave installer even though the installer exists but seems to work on others… quite confusing. The current version uses spotlight to locate the installer, so when you launch the eraseinstall app right after installing the installer app, it might not find it yet. Your email address will not be published. Notify me of follow-up comments by email.
Notify me of new posts by email. This site uses Akismet to reduce spam. Learn how your comment data is processed. Skip to content. You can watch a video of the installation and workflow here: How to get it You can download an installer and the source code for the EraseInstall application here. The installer will put the EraseInstall. Leave a Reply Cancel reply Your email address will not be published.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Skip to content. Permalink Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up. Branch: master. Find file Copy path. Cannot retrieve contributors at this time.
Raw Blame History. Added an additional exit codes and modified script to take into account which startosinstall command to use as Apple has modified the options in Also added functions to reduce code re-use. Cleaned up additional code logic. Added FV2 authenticated restart. Added support for additional packages. Removed iCloud checking. Resolved CoreStorage conversion detection. Made it explicit what user account is being asked for FV authentication. Fixed an issue where variables were not being recalculated.
Compartmentalized script further into functions. Reduced duplicate code where possible. Enter the full path e. Type out the time in minutes. If you do not fill this in and the macOS installer app has not be installed on the computer, the script will exit and warn the user. You can opt to not use this parameter, but just make sure to deploy the macOS installer app through other means if that's the route you choose to take.
This is done through the "--installpackage" option which was introduced in the macOS High Sierra installer app. This comes in handy in situations where the computer might have the macOS Apple may have released a specific feature e.
Must be in form of Due to 1 bad path has been provided, 2 app is corrupt and missing two big components, or 3 app is not installed.