Skip to content

Bootstrapping With Munki

Greg Neagle edited this page Sep 20, 2025 · 20 revisions

Introduction

"Bootstrapping" mode is intended for initial deployment scenarios. When Munki is set to "bootstrap", when the Mac is at the loginwindow, Munki will check for and install updates. If a reboot is required after installing updates, after the reboot, Munki will check and install again, continuing until there are no updates to be installed. This allows you to bootstrap the configuration of a machine, installing all managed software, with no user intervention. (Before the introduction of Apple silicon Macs, this also included the installation of any and all available Apple software updates.)

Bootstrapping was originally designed and intended for a time when a common way to deploy a new Mac was to "image" it -- that is, to wipe the internal disk and restore a pre-configured disk image, which might contain, among other things, the Munki tools set to bootstrapping mode. On first boot after "imaging", the Mac would then contact the Munki server, check for updates, and install anything and everything defined in its manifests.

With "modern" deployment methods like Apple's Device Enrollment Protocol (DEP) or Automated Device Enrollment (ADE), where a Mac enrolls in your organization's MDM at first boot, Munki and bootstrapping mode can still be useful in the scenario where initial user creation during the Setup Assistant is suppressed (because the initial user is created via AD/LDAP/Cloud IdP login). In this scenario, after the Setup Assistant exits, the machine is then at the login window. If MDM has installed the Munki tools and set bootstrap mode, Munki can then take over and install additional software.

If the user sets up their own user account in the Setup Assistant, when the Setup Assistant exits, the Mac directly logs into that newly created user account, skipping the loginwindow, and Munki's bootstrapping mode is less useful, because the bootstrapping runs happen only at the loginwindow.

To take advantage of bootstrapping mode during DEP/ADE, you'll need to have your MDM install the Munki configuration, the Munki tools package, configure bootstrapping mode, and suppress creation of the initial user. (Often this requires creating a local admin user).

If instead, the initial user account is created in the Setup Assistant, you might want to look into triggering a managedsoftwareupdate --auto run after Munki is installed, as that will happen in the background even with a logged-in user.

Enabling bootstrapping mode

Bootstrapping mode is enabled when the file /Users/Shared/.com.googlecode.munki.checkandinstallatstartup exists. You can create a package that installs that file, or you can have a script touch that file.

A package that installs the required file is available here: https://github.com/munki/contrib/blob/master/munki_kickstart.pkg?raw=true

Disabling bootstrapping mode

Bootstrapping mode will disable itself once there are no additional changes to be made (installs or removals). You may also direcrtly disable bootstrap mode by removing /Users/Shared/.com.googlecode.munki.checkandinstallatstartup.

Bootstrapping and FileVault

Since bootstrapping is intended for an initial deployment scenario, where the initial user has not yet logged in (and perhaps that account has not yet even been created), FileVault is generally not active in this state. But there are scenarios in which bootstrapping mode might be used when FileVault is active.

Munki has options to improve the bootstrapping experience on machines encrypted with FileVault: --set-bootstrap-mode and --clear-bootstrap-mode.

managedsoftwareupdate --set-bootstrap-mode creates the needed /Users/Shared/.com.googlecode.munki.checkandinstallatstartup file, and also turns off FileVault auto login (this is the automatic login to the account of the user who unlocks the FV2-encrpyted disk at boot), by setting the com.apple.loginwindow DisableFDEAutoLogin preference to True. (See deprecated Apple support article HT202842.)

managedsoftwareupdate --clear-bootstrap-mode removes the /Users/Shared/.com.googlecode.munki.checkandinstallatstartup file and resets the com.apple.loginwindow DisableFDEAutoLogin preference to its previous value.

When performing a macOS upgrade (using an Install macOS.app/startosinstall), Munki uses these new mechanisms in order to effectively re-bootstrap after an OS upgrade.

You probably won't need to use/care about these options when bootstrapping a brand-new machine, since it most likely will not have FileVault turned on, but if for some reason you do, you can use managedsoftwareupdate --set-bootstrap-mode to set up bootstrapping mode.

Introduction

Munki 7.4

Munki 7.2

Munki 7.1

Munki 7

Munki 6

Managed Software Center

Command-line Tools

Munki configuration

Manifests

Catalogs

Pkginfo

Common Munki operations

More Munki Features

Advanced Munki

Related tasks

More

Product-specific notes

Legacy Documentation

Clone this wiki locally