Posted on 01-04-2012 08:49 AM
So, there has been a lot of on and off discussion about InstaDMG over the years. I have heard the debate from all sides of InstaDMG. From the supporters and the naysayers. Overall, in my personal and professional opinion it is a very nice and powerful tool that can compliment the JAMF Software Suite. That being said I want to make clear you do not need to use InstaDMG, Casper can function with out it. So, here is an unsorted list on some of the benefits of using InstaDMG with Casper.
This demo will be for OS X 10.6.x because I don't have any Lion production machines yet so I do not fully support it. Though from what I read, Lion does in fact work.
Creates a never-been-booted pristine OS
Can be used to update your OS image file very easily
Can be used with Casper very easily
Can be ran and forgot about until it completes
So, now lets get started. First you will need to download InstaDMG from it's project page, found here:
http://code.google.com/p/instadmg/
So, I downloaded the zip file and extracted it to my home folder, and it is basically just a collection of Python scripts. Screen shot here:
So, now I insert my Snow Leopard disk. You just open up the terminal and navigate to the python script and execute it with your installer DVD in the optical drive, the rest is taken care for you. I do not think it works on restore DVDs, so you will need a retail OS Disk. It will complete and put the output files in the InstaDMG folder. Note I am running my terminal session as root, via sudo -s. I am comfortable enough with my skills in the command line to do this for brief projects like using InstaDMG. I strongly suggest you use sudo instead of a root session for best practices. I know, I know, lead by example, but I wanted to bust this out quickly.
Now, InstaDMG can also amalgamate OS X updates into your image file and output it to the output folder. This will create an up-to-date OS X OS image file, which is pristine and never been booted. Perfect for modular configurations. You can manually edit the catalog file to install specific updates you want. In my example, I had to add in the MacBook Air updates because we were deploying 6,000 of them and I wanted them in there. Here is my catalog file, these are provided with the InstaDMG package but I modified them to fit my organization's needs.
Catalog files are located in the InstaDMG folder, under /Addons/Instaup2Date/CatalogFiles
# Creates a 10.6 image with all the items that would appear in software update
# $Rev: 414 $ from $Date: 2011-01-30 20:36:01 -0500 (Sun, 30 Jan 2011) $
Installer Disc Builds: 10A432, 10B504, 10C540, 10D573, 10D575, 10F569
Output Volume Name: Macintosh HD
Output File Name: 10.6.8_base
OS Updates:
Mac OS X 10.6.8 Combo Update http://support.apple.com/downloads/DL1399/en_US/MacOSXUpdCombo10.6.8.dmg sha1:7e22a53b62bf16f44fbba4042606af91888335cf
iTunes 10.1.2 http://appldnld.apple.com/iTunes10/061-9991.20110127.ZxsE3/iTunes10.1.2.dmg sha1:75304d4f16f8a790f5a819b04a59b98b563a062f
Safari 5.0.3 http://appldnld.apple.com/Safari5/061-9477.20101118.Sfr34/Safari5.0.3SnowLeopard.dmg sha1:83e91419951bc0b58d09c82df94571b1cb03dda5
Java For MacOSX 10.6 Update 3 http://support.apple.com/downloads/DL1360/en_US/JavaForMacOSX10.6Update4.dmg sha1:513d5c5b62fb1257b8bf582c1c11e02e944fa808
AirPort Utility 5.5.2 http://support.apple.com/downloads/DL955/en_US/AirPortUtility552.dmg sha1:d687889612acbd01450dee1517de88ea963011a6
Remote Desktop Client 3.4 http://support.apple.com/downloads/DL1350/en_US/RemoteDesktopClient.dmg sha1:46df7a3b31cd2b51213e1a6fd193d5073c004771
**Macbook Air update http://support.apple.com/downloads/DL1370/en_US/MacOSXUpd10.6.7Supp.dmg sha1:69ee7eec2b608199ffc215cc56e1a999b958397f**
So, to add an update manually, you simply go to Apple's support download section, pick the update you want and click on the link to get the full description, for example purposes I will use this update:
http://support.apple.com/kb/DL1459
Now, you will want to right click on the download button on the web page and copy the link location, which results in this full URL:
http://support.apple.com/downloads/DL1459/en_US/MacOSXUpdCombo10.7.2.dmg
If you look further down the web page you will see the secure hash algorithm (SHA) listed as:
SHA1= accd06d610af57df24f62ce7af261395944620eb
To put it all together you need to add it to your catalog file in this format. THIS IS VERY IMPORTANT YOU DO THIS PROPERLY! This is due to Python's nature of how it treats spaces versus tabs. Python syntax is very dependent on this, so you must follow this format:
name the update (tab) full URL (tab) sha1:long_string_of_characters
Every time you see (tab) you need to hit tab instead of the space bar. This is how the instaUp2date.py script will parse the data. Now after you have added everything you need, you just run the up2date script.
Then look at your output files and you have your image, which you can then drop into Casper Admin and compile with all your packages. Create tons of different configurations and such to your liking.
I hope this was informative and helps some of you struggling to grasp InstaDMG. I personally love it for base image creation and that is all I use it for. I don't use it to add in packages or anything like that, I use Casper Admin for that.
-Tom
Posted on 03-22-2012 02:35 PM
Thanks so much Tom for posting that tutorial. I'm considering a deployment of Casper Suite right now, and was wondering how InstaDMG would fit into the workflow. From what you've shown here, are all other software packages and settings added on as a "Configuration" in Casper Admin?
Thanks,
Jason
Posted on 03-22-2012 02:59 PM
Hey Jason,
I hope everything is going well. I wrote this before I worked for JAMF, and at my old job I definitely used InstaDMG to create never-been-booted updated OS image files. It does work with Casper, and you can deploy it via Casper imaging. I used it for my whole enterprise.
While, Casper will integrate with some of the FOSS tools out there, it also has similar built in functionality. So, you can keep your preferred methods with those tools if you want to. The framework will also run bash/shell, ruby, python, perl, etc. So, if you have existing scripts you use for deployment of packages, images, etc, most of them should be able to be used in Casper. The Casper framework also has some extra functionality to easily create parameters and it has it's own command line binary that does some neat things as well.
What are your higher goal with InstaDMG? You can do a lot with configurations and it can be used. If you described in more detail the things you want to accomplish I would be more than happy to help.
Thanks,
Tom
Posted on 01-28-2014 03:04 PM
Great tutorial. Question:
If I understand correctly, I can add multiple build numbers for all of our various mac laptop models so the one master can be laid on any model? or do I still want to have a separate Master for each model? We ran into a strange issue, where an older Retina had the build number of the newest line, and its preventing the user from being able to update the OS, and I found it will have to be done from a combo update, if they release one for 9.2 or something i shouldn't be a huge problem, but if I can avoid it completely with this method that would be ideal! :)
Posted on 01-28-2014 09:02 PM
Hi @Orleck,
This highly depends on the OS build. If the OS build forks, ie Apple releases a special build for a hardware release, you will actually have to maintain a hardware specific build for that OS. That is, until Apple releases a unified update, that incorporates all the support for that forked build. In my example above, I added a specific Apple Software Update for the Macbook Airs to my OS image build, because at the time we had 6,000 Macbook Airs. However, it was just a software update, and we also had about 2,000 iMacs and another 6,000 older Macbooks. I simply put the model specific update into the OS, so it got applied to all Macs, and when you imaged a Macbook Air, you didn't have to run SWU right after imaging, or post image package deployment.
Apple actually maintains a list of builds to specific models so you can track when the OS forks and when it gets unified again. Here is the URL for that:
http://support.apple.com/kb/ht1159
This post was actually a bit older than the date it says it was posted I think. If I remember correctly I copied/pasted it from the old JAMF Software mailing list and added screen shots to it. So, InstaDMG may have changed a lot since then. Really, any asr scanned disk image can be used in Casper Imaging, so you have a lot of options. For me specifically this work flow was used because I wanted to use a compiled image as a parent configuration with smart configurations. I know that sounds like a mouth full, but I think I posted that to JAMF Nation too. Which I actually just found with the search function:
https://jamfnation.jamfsoftware.com/discussion.html?id=65
So there are many ways to create and deploy an OS image with Casper. This work flow just happened to work out for me since we would mass image thousands of Macs in a short period of time, and having the block copy option helped us do it quicker.
Hope that explains everything.
Thanks,
Tom
Posted on 01-28-2014 09:33 PM
More than helpful Tom!!! I've been using... DeployStudio... until my boss and I convinced them to move Casper on in, I'm so looking forward to all of this, I'm like the kid who bought all the furniture for the house he didn't move into yet :D That apple kb is excellent, I wish I'd known about that long ago! Thank you very much man, much appreciated!
-Orleck
Posted on 01-28-2014 09:43 PM
Glad I could help and welcome to Casper.
-Tom
Posted on 01-29-2014 12:54 AM
Thanks
ive always used this
http://coolestguidesontheplanet.com/create-clean-image-os-x-mountain-lion-10-8-instadmg/
but for 10.8+ we should really be using AutoDMG https://github.com/MagerValp/AutoDMG