How to erase and re-install OSX 10.13 on Older iMACs with OSX 10.11- and HDD (hence NOT APFS)?

ryankim
New Contributor II

Hi,

We have a few 2011 iMACs with OSX10.11 that needs to be wiped then updated to OSX10.13.

I have used "/Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall" ‑‑applicationpath "/Applications/Install macOS High Sierra.app" ‑‑agreetolicense &

from https://www.jamf.com/jamf-nation/discussions/28421/re-reinstall-a-clean-macos-with-one-button

to just upgrade to OSX 10.13 and that worked properly. BUT I can't use "--eraseinstall" to wipe since these iMACs are NOT APFS.

Any suggestions as how I can accomplish this with as little manual intervention as possible?

Thank you.

5 REPLIES 5

jcarr
Release Candidate Programs Tester

Since these are not APFS volumes currently, you'll need external media, but you should be able to script everything you need to do.

You'd need a bootable system with a copy of the macOS High Sierra 10.13.6 installer and a launchd that runs a script. The script would use diskutil to erase the internal storage (if these are all the same hardware, that should be easy to script), and then call the startosinstall command in the installer. You could even pre-load a bunch of packages using the --installpackage option.

You then simply connect the external volume and option-boot to it. When done, the device should be back at setup assistant ready to go.

Nix4Life
Valued Contributor

Are they due to be replaced anytime soon? if so It may not be worth the time as they are 2011 machines, just do an OS upgrade. The new hardware will already come with APFS

marklamont
Contributor III

@ryankim I have built a boot disk script that detects if the hardware is capable of APFS (SSD) or not (HDD), if it's not then an HFS 10.13.6 .OS autodmg image is put down. If it can be APFS then that OS image, including firmware update if required, is used. It does a few other things which most people may not need so I can't post it all but I can put a few relevant bits here if you want?

ryankim
New Contributor II

@marklamont: I would love to have a look at that script you are referring to.

marklamont
Contributor III

@ryankim here is an article about it