IOS – Why do macOS/iOS upgrades take so long

iosmacossoftware-updateupgrade

Even on an iMac Pro, it still takes some time (maybe 15 minutes) to upgrade the OS (after everything is downloaded). During this time, I can't use the computer.

Why is that? What is it actually doing? Why is this process not a simple reboot?

Please note I'm not asking why a reboot is required. As a software developer, I'm fully aware of why a reboot is required.

Also note A clear reason why an upgrade could take a while is a filesystem migration (such as the HFS+ → APFS migration). Apple did some test migrations, even, before rolling out the final thing. However, most OS upgrades don't involve changes to the filesystem AFAIK.

This is a question is similar to Why does the OS X Software Update check take so long? about another upgrade process taking a while. There are specifics of macOS and iOS that are worth considering in answering this question. For example: both ship with drivers necessary for all supported systems.

Best Answer

Why is this process not a simple reboot?

The overall answer here is it depends. It depends greatly on what needs to be done. An update that you do to your system may be vastly different than I do on mine. The update in question may only need a service restarted or it may need updates to the actual kernel.

Why is that [I can't use the computer]?

Generally, for the same reason you can't use an app (Word, Excel, Numbers, iTerm, Adobe Photoshop, etc.) that is in the process of being upgraded. The files must be closed, read, analyzed, the appropriate patches/updates copied over and the app restarted.

When an OS is upgraded, the same thing must happen and this is typically done (when it comes to kernel level upgrades especially) in single user mode.

Typically, you'll see updates downloaded, the system will begin a shutdown, updates applied, a reboot, and a "finalization" of the updates followed by a normal boot. You can't use the computer during any of this.

What is it actually doing?

It depends. It could be anything from patching a config file to flashing firmware of some type.

If the system is in /System, why isn't an OS upgrade simply creating a /NewSystem

First off, /System is protected by SIP so to disable it, you actually need to boot from a different mount point.* Secondly, the way you're looking at this is analogous to doing a home renovation by dumping a new house next to the old one and telling the people to just move in. It's not the way it works.

Many things have to happen, least of which is restore points created (in case the backup fails). So this means a copy of the working system is created, the update applied, the update checked, and (if all good) the restore point deleted.

In the case of firmware updates, images have to be verified (i.e. you don't want a Mac mini firmware on your Mac Pro), checksums validated, images backed up, applied, verified, old ones removed and the system reinitialized. Again, none can be done with you logged in and none of it done by simply "dumping" files in a directory.

An upgrade is a process and all of this takes time.


* SIP is designed to protect the system by preventing changes to the OS. Allowing the OS to change the system "on-the-fly" would negate the security it's trying to achieve.