0
Back to News

Posted 10.12.19

Imaging is dead

Imaging is dead! It’s something that we’ve been hearing in the Apple community for some time now and to start with, it wasn’t really. A re-deployment of an in place upgrade was painful but once we were there imaging was back on the table.

Despite Apple declaring that system imaging was not supported we still relayed on good old master images and Deploy Studio…..then APFS came along.

Imaging is dead. Really.

With a quick search you’ll find many articles, blogs and forums about how and why APFS killed imaging. The purpose of this blog is not to go into that detail but instead talk about jumping feet first into a world of deploying Mac without imaging and more specifically how to simply get a fresh macOS onto your device ready for DEP to work its magic.

Imaging a Mac was a quick and easy way of deploying a suite of Mac. Just because imaging has gone away doesn’t mean our suites of Mac have. As part of my job role I go around the country helping Mac Admins in Education deploy and manage their suites of Mac and their biggest worry is about getting the latest macOS into their devices at re-deployment.

Often the thought process is that you will manually need to get in front of every device and download the latest version from the Mac App Store or create a handful of USB sticks with the install media on them. The good news is there is a much easier way with a command line tool provided by Apple and built right into the macOS installer app

The command line tool has been around for a little while now but it feels like its one of Apples best kept secrets when it comes to deployments. The tool I’m talking about is startosinstall

Startosinstall enables you to start the installation of the OS from the command line. It has a number of options that enable you to script the fresh installation of your entire Mac suite from the comfort of your office desk.

The key option that you will need is –eraseinstall this will move all of the components macOS needs to install a fresh OS to a RAM disk and then erases the volume, thus giving a completely fresh macOS on completion.

A few other useful options are

–agreetolicense – this agrees to the license agreement

–nointeraction – This option removes the need to agree to a few other options (like are you sure you want to erase your hard drive) but there is no undo and the abort time is very short! So make sure you’re happy to erase all of your data before hand.

There are also a number of other options that you might find useful for your specific deployments and with a quick Google you can find these

In order to create a workflow you will first need devices that are on macOS High Sierra with an SSD (I.e. already formatted as APFS) or devices that are already on macOS Mojave or macOS Catalina (I understand that there may be some headaches to get your devices to Mojave in the first place but its worth the effort!)

You then need the latest copy of the OS that you wish to fresh install or upgrade to, downloaded from the Mac App Store (but just the one copy).

Next you will then need to deliver this app to your devices. There are multiple ways to do this such as Apple Remote Desktop or an enterprise management solution such as Jamf. macOS Catalina also provided another way but we’ll circle back around to this.

Once you the installer app is on all of the devices you can then just send a remote terminal command (through Apple Remote Desktop) or in a script (through the likes of Jamf) An example of the command you will need to run, and assuming the installer app is Catalina and in the Applications folder, is

Sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/startosinstall –eraseinstall –agreetolicense –nointeraction

Your devices will restart and and begin installing a fresh macOS. Combine this with Apple Device Enrollment in Apple School Manager (formally DEP) and upon the restart your devices will enrol into your MDM in a few clicks too.

One More Thing…

Before Im done there is that other way to deliver the macOS app if your devices are already on macOS Catalina. The softwareupdate command line tool enables you to ‘fetch the full installer’ which is delivered directly to your /Applications folder (just where you need it for the startosinstall command).

Remotely run the following command a few days before you want to wipe your devices to get the latest macOS installer in place ready for the big day

softwareupdate –fetch-full-installer

It takes a little while to download the installer since macOS Catalina currently weighs in at around 9GB.

In Summary

The take away from this is that imaging really is dead, this time for real. You might have to drag your colleagues into a different way of thinking, kicking and screaming but once you’ve made the jump, its in many ways easier than creating that monolithic image which goes out of date as soon as you’ve created it.

The startosinstall tool is something that as a Mac Admin I find invaluable and I feel needs its 5 minutes in the spotlight. There is something very satisfying about watching your suite of Macs just restart and turn back on with the welcome screen.

Want to stay in Sync?

Sign up for all the latest news, events and updates from Sync.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.