Introducing Imagr

The prolific Graham Gilbert is working on a new tool:

Imagr is an application designed to be run from a NetInstall environment. It is able to restore a disk image and install packages on a target volume.

Though Graham claims it is not intended to be a replacement for DeployStudio, I think in time it could very well be exactly that, at least for many people/organizations.

Some exciting things about Imagr:

  • It is open source! DeployStudio is free, but the source is closed. Open source means you can look at the code and see what it is doing. You can fix bugs and perhaps even help add features to the product.
  • It’s written in Cocoa-Python, with much of the “interesting” tasks in Python — a language many OS X admins are familiar with.
  • And most importantly: it does not require a specialized server: it can work with any plain-old web server. This means that you (potentially) can eliminate the last OS X device in your server room/data center. Almost every service of interest to OS X admins can be run on platforms other than OS X with the huge exception of a DeployStudio server. If Imagr can meet your imaging/machine build needs, you can finally get rid of that poor Mac mini sitting on a shelf in the server room.

Graham has posted detailed instructions on how to build a NetBoot image that contains Imagr. But if you just want to take a look and play with the tool, and you have an existing DeployStudio NBI with Python support included, you can play with Imagr without needing to build a new NBI. More importantly, you can test new versions (or work on the code yourself and test new versions you build) without having to build a new NBI each time.

Continue reading “Introducing Imagr”

Introducing Imagr

“Building” 2015 Macs

We’ve recently gotten a few of the new 2015 Macs, specifically the new MacBook Airs and 13″ MacBook Pros. These models have new builds of 10.10.2, and won’t boot from our current NetBoot/DeployStudio Server.

While there are ways of capturing the hardware-specific OS so you can use it with AutoDMG and to create NetBoot sets, usually what we do with new hardware like this is employ a “no-imaging” process: we boot the new machine in Target Disk Mode, attach it to another Mac, and install some “bootstrapping” packages on the new Mac. For us, that’s four packages:

  • A package to create a local admin account
  • A package to disable the Setup Assistant
  • The Munki tools package
  • A package to put Munki in “bootstrap mode” on first boot.

Once these packages are installed on the new machine, we shut it down, connect it to the network, and start it up. Munki takes over and installs everything else we need.

This approach has worked well for us in the past with new hardware, and allowed us to deploy new hardware to users much faster than if we had to build hardware-specific NetBoot and AutoDMG images.

But these new 2015 Macs were throwing us a curve ball. After using Target Disk Mode to install the packages, upon reboot the Macs were refusing to boot, or booting very slowly. A check with Disk Utility claimed the startup volume had unrepairable filesystem corruption, and advised us to back up any user data, format, and re-install.

We saw this behavior on multiple new 2015 machines. Two things that stood out to me:

  • The new machines all ship with an unencrypted CoreStorage volume as their main system volume, and
  • We were connecting these machines (in Target Disk Mode) to a Mac running Mavericks (10.9.5).

My theory was that there is a bug causing the Installer on Mavericks to do something “wrong” when installing to a Yosemite CoreStorage volume that led to file system corruption.

I did not have the time (or desire) to get to the bottom of this issue; I needed to find a successful procedure for getting these new 2015 Macs to build. I found two.

First one: after starting the new Mac in Target Disk Mode, connect to another Mac running OS X Yosemite 10.10.2, and install the bootstrapping packages.

Second one: Boot the new Mac into the Recovery partition. Connect a USB drive (a flash stick will do) containing the bootstrapping packages. Open the Terminal from the Utilities menu and use the command-line installer to install the bootstrapping packages onto the main partition.

With either method, things proceeded normally and there was no filesystem corruption.

UPDATE: after seeing some reactions to this post on Twitter, until we understand more about this issue, I’d recommend using the second approach (via Recovery partition) — it’s possible this is more about Thunderbolt/Target Disk Mode than it is about 10.9 vs 10.10.

I hope this saves others some time and headaches.

“Building” 2015 Macs