Troubleshooting - munki/createOSXinstallPkg GitHub Wiki

Sierra-specific

There is an ongoing problem with the Sierra installer, if used during the same uptime session as tools like AutoDMG, the normal cleanup routines cannot 'cleanly' unmount InstallESD.dmg post-execution. The symptom manifests itself with the following output:

Examining and verifying source...
Error: "hdiutil: attach failed - Resource busy
" while mounting InstallESD.dmg.

You can help by duping this bug, but in the meantime a quick way to 'heal thyself' is:

First, find that Install ESD mount on your system with diskutil list After finding the one that looks like this...

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +5.8 GB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS OS X Install ESD        5.4 GB     disk2s2

...remove it by running the following command (customize this to match what you see, there may be things you definitely DON'T want to unmount!) - hdiutil detach /dev/disk2