We almost always use DeployStudio. Sometimes it's handy to use Carbon Copy Cloner to backup to an external drive before installing a new OS.
There are two ways to install an image via Deploy Studio. It can be initiated from the client (that will access a remote Deploy Studio server), or from a Deploy Studio server that has appropriate permissions. Common to both approaches, is images on a Deploy Studio server.
The NetBoot server (which we usually run on the same machine as Deploy Studio) should be turned on and the preferred NetBoot image set (see below) selected as "Default" in NetBoot service -- Server Admin → NetBoot → Images.
/DS/Masters/HFS/Creator_PartitionName_CreateTime.i386.{hfs,recovery}.dmg
For example, as of 2014-05-12 the two needed images for an installation are named
imac000_MacintoshHD1_14.05.12_14.13.i386.hfs.dmg
imac000_MacintoshHD1_14.05.12_14.13.i386.recovery.dmg
See below for knowing which image to pick for a specific OS version. We have been assuming that the same image will work on both an iMac and a Mac Mini.
The first step of imaging is to contact a Netboot Server, from which a boot program (NBI — Net Boot Image) will be downloaded. If the Netboot Server is not on the same subnet as the machine being imaged, it's necessary to configure the machine to know the network address of the server. That is done with the `bless` command, e.g. In general this short version:
sudo bless --netboot --server bsdp://ip.address.here --nextonly
should tell your Mac to boot from the default NetBoot set available from the NetBoot server.
The long version is (should all be one line):
sudo bless --netboot \
--booter tftp://ip.address.here/NetBoot/NetBootSP0/NetBoot-Set-Name-Here.nbi/i386/booter \
--kernel tftp://ip.address.here/NetBoot/NetBootSP0/NetBoot-Set-Name-Here.nbi/i386/mach.macosx \
--kernelcache tftp://ip.address.here/NetBoot/NetBootSP0/NetBoot-Set-Name-Here.nbi/i386/x86_64/kernelcache \
--options "rp=nfs:ip.address.here:/private/tftpboot/NetBoot/NetBootSP0:NetBoot-Set-Name-Here.nbi/NetInstall.sparseimage" \
--nextonly
In our case we can use:
ip.address.here |
129.97.51.14 | the IP address of the NetBoot server (mutsu.student.cs in this example) |
NetBoot-Set-Name-Here |
DSR-1092 | the "1092" refers to Mac OS X 10.9.2 |
The NBI's are built (by Deploy Studio) on the architecture that we intend to deploy to. The --nextonly switch does the bless only for the next boot. That avoids the problem of rebooting over and over if the arguments to the `bless` command are wrong.
Also note that you can use HTTP hosted images with the extended syntax as well (rp=http://...). The nice thing about that is that the kernel/cache and booter can live on whatever server is running tftp, while the images can sit on another server running http. This allows for easy load balancing. First on the server end, you need to change the Netboot service protocol from NFS to HTTP. Also NetBoot support is available for OS X VMs in VMWare Fusion's Technology Preview which means we can NetBoot virtual machine images.
If your machine is on the same network as the NetBoot server, the machine can then be netbooted by selecting the appropriate NBI by holding OPTION (a.k.a. ALT) to access the boot menu on startup (if a firmware password exists, it will have to be entered). On Macs with older firmware, the NBIs may not appear under this menu. In this case, the machine would have to be booted into a copy of OS X (either an already installed volume, recovery partition or installer DVD/USB) and the Startup Disk would have to be changed to the appropiate NBI.
The boot servers usually aren't configured to allow a remote image install. To change this, login to the server (via a regular Apple login), start "Server Preferences" (in /Applications if not in the Dock), and select/start NetBoot.
If there is no firmware password, holding down the "N" key while rebooting will cause it to NetBoot. That will result in an answer from the first available server. Our servers are all configured to use DeployStudio.
If there is a firmware password, use the Option key instead of "N", which will allow entry of the password, and selection from the possible boot sources. A boot source can be either from a local device, or a remote server (which we configure to answer via DeployStudio).
The firmware password is recorded in the usual place. Note: When attempting to deploy multiple systems simultaneously, a bolt heavy enough to hold down the "N" key might be used. Select a boot source, and it will download the NBI which will then download the partition images that were configured in the NBI (typically by Deploy Studio).
When a choice of NetBoot servers is offered, the names are not the names of the machines offering the service (see Netboot Servers), rather they are configurable names, typically of the form
DSR-<version>E.g. "DSR-1092", for a 10.9.2 version of the OS. We sometimes have do names that include the servers, of the form:
DSR-<version>-<server>E.g. "DSR-1085-EmpireMutsu".
An NBI built by Deploy Studio can present "workflows", which are separately present on the server. They are specified before the disk is rewritten. Typical choices are:
Once the appropriate workflow has been selected, hit the "Run" button (top left corner). Multiple workflows can be run. Deploy Studio also has pre-flight and post-flight (i.e. before and after image installation) activities, that are configured separately from workflows (which can invoke specific pre and post actions).
Our preferred/default workflow will erase the first available disk. This is a problem with: 1.) fusion drives since it erases the SSD portion of the combined drive and tries to install on the first available drive - namely the SSD drive, and 2.) MacMultiBoot which uses different partitions.
In ARD, select the "All Computers" list, click "File", "Export List". This will create a saved .plist which can be saved and imported to the DS repository (/DS/Databases/ByHost) Open DS Admin and click "Computers" in left pane, then click "Server" on top and "Import", choose the .plist export from ARD This will populate the Computers table with all computer names from ARD. Now a post-restoration task can be added to the workflow to change the computer name with the information from the database.
We can optionally cause (security) updates to happen, to handle updates that occurred between the time the image was created and when it was installed.
We build our images to have at least one administrative account. For historical reasons we're using "cscfadm", instead of "cscf-adm" and "cscf-op". "cscfadm" can become administrator.
A Mac can optionally provide accounts via Active Directory. We do this for the teaching, and some ISG and/or administrative Macs. TBD: describe how to know For some non-teaching Macs, we provide local accounts.
This is done via ARD to run a script that is stored on empire.student.cs in
/USERS/cscf-adm/Documentation/scripts/imacscript
to either unbind or bind a machine to the AD.
This is usually done remotely, by ARD running on a nearby laptop,
with the binding script configured as an ARD "task".
Some AD binding context can be found here: http://my.safaribooksonline.com/book/operating-systems-and-server-administration/mac-os-x/9780321591067/configuring-mac-os-x-to-log-in-using-active-directory/ch04lev2sec9
We currently use a modification of this DS bind script (modified from original by Bombich) http://deploystudio.wikispaces.com/ad-bind-login.sh
AD binding is now part of the workflow for DeployStudio. Procedures and information can be found here: http://www.deploystudio.com/Downloads/Extras/DeployStudio_Guide_2.0.pdf
ARD can do this for multiple machines simultaneously, so in a lab setup, it's most efficient to do this step after imaging the entire lab. ARD can search a subnet for machines, which avoids the need to name each machine in a lab.
Only an administrative account is installed on the lab client image. This allows admins to login and modify settings on the client.