-
Notifications
You must be signed in to change notification settings - Fork 339
Creating Disk Images
At times, an install requires several source items to be wrapped in a single container for proper installation. In addition, if an installer is old enough to be a bundle-style package, munki requires it to be encapsulated in a disk image. This has the effect of converting a bundle-style package, which is actually a special type of folder containing additional folders and files, into a single compressed file. This makes uploading and downloading such a package from a web server much more convenient and compatible with a wider range of web servers. This document explains how to create a disk image in a way that works more optimally with munki.
munkiimport
will wrap bundle-style packages, metapackages and drag-drop applications in disk images for you. You generally need not do anything other than:
munkiimport /path/to/the/item
If you need to create a disk image because scripts in installers expect source files to be found at relative paths, see the 'Manually creating a disk image' section below.
Since the release of Mac OS X 10.5 (Leopard), there have been two major formats for Apple Installer packages. Leopard introduced a new "flat" style of package, where the package is a single file. But prior to Leopard, all packages were "bundle-style" packages, consisting of a directory of files and folders. This style of package still works in Leopard and Snow Leopard, and is required for use with Tiger and earlier OSes, so it is still the most common style of package to be found.
How can you tell if a given package is a "bundle-style" package?
-
From the Finder, control-click on the package to get a contextual menu. If "Show Package Contents" appears in the menu, the package is a bundle-style package. Otherwise, the package is a "flat" package.
-
From the command-line, either attempt to
cd
into the package, or perform anls -al
on the directory containing the package. If you cancd
into the package or it displays as a directory in an extended listing, it is a bundle-style package
I still can't tell for some reason...
- Then wrap it in a disk image anyway. Bundle-style packages must be wrapped in a disk image file. Flat packages are not required to be encapsulated in a disk image, but will work fine if they are in a disk image.
-
From the Finder: drag the package onto the Disk Utility application located in /Applications/Utilities. Disk Utility will launch and prompt you for a location and name to save the disk image. Be certain to create a read-only disk image, or you will get checksum hash errors when Munki tries to download your disk image.
-
From the command-line:
sudo hdiutil create -fs HFS+ -srcfolder /path/to/some_folder_of_stuff /path/to/some.dmg
-- this ensures that it creates an image readable on older macOS versions and will unmount cleanly.
- Getting Started
- Overview
- Discussion Group
- Demonstration Setup
- Glossary
- Frequently Asked Questions
- Contributing to Munki
- Release Notes
- Introduction
- Managed Software Center in Munki 5.2
- Manual Apple Updates
- force_install_after_date for Apple Updates
- Additional update encouragement
- Aggressive update notifications
- AggressiveUpdateNotificationDays preference
- Additional Munki 5 changes
- Configuration profile notes
- Major macOS upgrade notes
- Upgrading to Munki 5
- Introduction
- Munki Links
- Product Icons
- Screenshots In Product Descriptions
- Client Customization
- Custom Help Content
- Featured Items
- Update Notifications:
- Introduction
- iconimporter
- makepkginfo
- munkiimport
- managedsoftwareupdate
- makecatalogs
- manifestutil
- repoclean
- Preferences
- Default Repo Detection
- Default Manifest Resolution
- Managed Preferences Support In Munki
- Apple Software Updates With Munki
- Pkginfo Files
- Supported Pkginfo Keys
- Pre And Postinstall Scripts
- Munki And AutoRemove
- Blocking Applications
- ChoiceChangesXML
- CopyFromDMG
- nopkg items
- How Munki Decides What Needs To Be Installed
- Default Installs
- Removal of Unused Software
- Upgrading macOS:
- Apple Updates:
- Securing the Munki repo
- Preflight And Postflight Scripts
- Report Broken Client
- MSC Logging
- Munki With Git
- Bootstrapping With Munki
- License Seat Tracking
- LaunchD Jobs and Changing When Munki Runs
- Web Request Middleware
- Repo Plugins
- Downgrading Software
- Downgrading Munki tools
- Authorized Restarts
- Allowing Untrusted Packages
- About Munki's Embedded Python
- Customizing Python for Munki
- Configuration Profile Emulation
- PPPC Privacy permissions
- AutoPkg
- Repackaging
- Creating Disk Images
- Stupid Munki Tricks
- Troubleshooting
- Professional Support
- Known Issues and Workarounds
- Building Munki packages
- Munki packages and restarts
- Signing Munki
- Removing Munki
- More Links And Tools
- Munki Configuration Script
- Who's Using Munki
- Munki 3 Information
- Munki 4 Information
- macOS Monterey Info
- Pkginfo For Apple Software Updates
- Managing Configuration Profiles
- Microsoft Office
- Adobe Products
- Upgrading macOS: