Hands on With Apple's NetBoot, Part 2: Creating and working with images

In Part 1 of this series, we looked at how Mac OS X Server's NetBoot process allows Macintosh machines to boot by using a server-based disk image instead of booting via a local disk. Part 1 also covered the basic steps to configure and enable NetBoot.

In this installment, we'll look at the process of actually creating NetBoot and NetInstall images using System Image Utility. If you need details beyond what is included in this series, consult Apple Inc.'s System Imaging and Software Update Administration documentation (download PDF).

You can create a NetBoot image directly from a Mac OS X Install CD/DVD, although this creates a generic Mac OS X installation without additional software or configuration files. The image can be changed a bit by using postinstall scripts and application packages. But most administrators opt to create an image from a Mac that has all the needed applications installed and all settings and preferences configured.

Thus, the first step in creating a NetBoot image is to configure a source computer.

Setting up this source computer includes installing and configuring Mac OS X, installing and configuring applications, applying software updates to Mac OS X and installed applications, setting file permissions for local items, and placing any files on the source computer that you want to make available to users of the NetBoot client.

You will want to set up this computer so it looks and functions as you want all your NetBoot clients to look and function. Any computers booted from the NetBoot image will be clones of the source computer.

NetInstall images can also be based on preconfigured Macs or on a Mac OS X installer CD/DVD. When based on a preconfigured Mac, NetInstall will clone the source computer's hard drive onto the NetInstall client's hard drive, from which the computer will then boot.

When based on an install disk, NetInstall will perform a more traditional Mac OS X installation over the network. You will go through the traditional install and setup tasks as if you were installing from a Mac OS X disk. The install process can be somewhat automated, however, and you will not need a copy of the disk for each machine, so you can install to many machines at once.

Once you have your source machine configured as you want or you have your Mac OS X CD/DVD handy, you will then use System Image Utility to create the NetBoot or NetInstall image and related files. As discussed in Part 1, System Image Utility is included with Mac OS X Server and offers the option of directly saving images to the configured NetBoot share points.

Creating a NetBoot image

To create a new NetBoot or NetInstall image, launch System Image Utility. The System Image Utility window includes a straightforward toolbar that includes buttons labeled "Images," "New NetInstall" and "New NetBoot." The "Images" button displays a list of images that currently exist on the server. The "New Install" and "New NetBoot" images buttons are used for creating new images.

Figure 1
Figure 1 -- Creating a new NetBoot image with System Image Utility

As you can see in Figure 1, when creating or modifying a NetBoot image, there are five tabs: General, Contents, Model Filter, Sharing Preferences and Directory Services. The General tab allows you to define information about the image that is used by the NetBoot service and that provides reference information about the image. If you create an image directly from the Mac OS X install media, you will also see a "default user" tab, which is used to configure the primary local user account for the image.

In the "image name" field, you will enter a name for the image. This name is displayed in the images list in System Image Utility, in the NetBoot service pane of Server Admin and in the Startup Disk System Preferences pane of NetBoot clients.

The "image index" field is where you enter an index number for the image. As described in Part 1 of this article, you can enter a number from 1 to 4095 if the image will be hosted on a single NetBoot server or from 4096 to 65535 to load-balance the image across multiple servers. Also as described in Part 1, if images with the same number are placed on multiple NetBoot share points on a single server, the server will distribute the load across those share points and the volumes that they are located on. At the same time, the server will display only a single image to clients.

The "image description" field is optional and allows you to enter a description of the image.

Below these three fields are options to define how the image will be shared and whether the actual image is local to the server or hosted on a remote Network File System (NFS) or HTTP server. The first set of radio buttons ("Available via") allows you to choose whether the image will be served to clients using NFS or HTTP. As mentioned in Part 1, NFS is generally the preferred protocol.

The second set of radio buttons ("Path to image") allows you to choose to specify where the image is hosted -- by the local server or by a remote server. Hosting images on remote NFS servers allows you to distribute the image load among many servers while one or more servers provides the actual NetBoot services.

If you choose to use a remote server, select the appropriate radio button and enter the location of the server and the path to the image. Then select either the NFS Export (for NFS) or HTTP port, and then the username/password (for HTTP). Although the image itself will be hosted on the remote server, the .nbi file -- which traditionally contains both the image and its support files -- will still be hosted on the NetBoot server in the appropriate share points. The image will actually be created on the local server and will then need to be copied to the remote location.

The "Contents" tab is where you identify the source of your image, the language translation (English, French, etc.) that will be used by the client (known as the default language) and any additional package files or scripts that you want applied to the image. You can create a NetBoot image from any mounted hard drive, from an install CD/DVD or from a pre-existing disk image.

Available start-up drives are listed in the "Image Source" pop-up menu, and an option there allows you to specify an existing disk image file as part of your NetBoot image. The "Default Language" pop-up is used to select from available language translations, and a list box enables to you add or remove packages or scripts.

Usually, the simplest and most effective way to create an image from a source computer is to start that computer in Target Disk Mode, either by selecting Target Disk Mode in the Startup Disk pane in System Preferences and restarting, or by holding the "T" key down at start-up. Then connect the source computer to the server running System Image Utility via a FireWire cable. This will mount the computer as an external FireWire drive, and its hard drive(s) will be available in the Image Source menu.

The "Model Filter" tab allows you to restrict only certain Mac models from booting from the image. Although Mac OS X is generally a very portable operating system -- with the exception of the division between Power PC and Intel architectures -- there may be situations when you create images that are intended only for specific models. For example, if you have a lab of eMacs that are the only computers that you want to boot from this image, you could set the image to only allow those eMac models to boot from it.

This might be done for security reasons, to avoid user confusion or because the image is configured only for those machines. A list of Mac models allows you to select certain models for which this image will be allowed. The exact models available to select may vary, depending on the version of Mac OS X Server that is installed.

Note: Generally speaking, Mac OS X installations are not hardware-specific. However, some Macs may not be able to boot from images that were created with Mac OS X versions released before their introduction or may experience problems when booting from an image not intended for their hardware. As such, you should test images that are not machine-specific before using them in a production environment.

The "Sharing Prefs" tab offers you an opportunity to define the host name and file sharing names used by NetBoot clients. You can enter names along with the media access control (MAC) address of the client Ethernet cards by hand, import them from a file, or leave this information blank. If left blank, clients will have their hostnames set to -AUTOMATIC- and will dynamically acquire this information.

The "Directory Service" tab offers the option of applying the NetBoot server's directory service bindings to NetBoot clients that boot using this image. If you are dynamically providing directory services information using Dynamic Host Configuration Protocol or if you have manually bound your source computer to a directory domain, you can ignore this tab.

If you choose to have the NetBoot server provide a directory services configuration, ensure that it is bound to the appropriate directory domain. You can also specify custom Lightweight Directory Access Protocol mapping attributes for clients using this tab. For more information on Open Directory and directory services under Mac OS X, see my earlier article.

Once you have entered the configuration information, click the "Create" button. You will be asked where to store the image. If you are creating the image on a NetBoot server and the NetBoot service is configured, you will have the option of selecting the available NetBoot share point(s). You will also be able to save the image elsewhere for later copying to the share points(s).

Creating a NetInstall Image

The process of creating a NetInstall image from a preconfigured source computer is essentially the same as creating a NetBoot image. The difference is you will click the "New NetInstall" button instead of the "New NetBoot" button. The five tabs available when creating or modifying a NetBoot image are all available with NetInstall images, and behave in the same manner.

There is, however, an additional "Installation Options" tab.

Note: Choosing a default language for a NetInstall image determines the language of the Installer; the language of the operating system is defined by either the source computer or via installation options.

The "Installation Options" tab (see Figure 2) determines how automated the installation process will be, whether the client's hard drive will be verified against the image after installation, and whether or not to assign ByHost preferences on the client after installation. ByHost preferences are preferences or configuration files for either Mac OS X components or applications that are tied to the MAC address of a computer's network card. One common example of a ByHost preference is the iTunes Store authorization that allows a computer to play music purchased from the iTunes store with a specific user account. ByHost preferences are stored in the /Library/Preferences/ByHost directory (for systemwide preferences) or in ~/Library/Preferences/ByHost directory (where "~" indicates the location of a user's home directory).

Figure 2
Figure 2 -- Installation options for NetInstall images

If you select the "Enable Automated Installation" check box, you can then set the following auto-install options by clicking the Options button:

  • Target Volume -- User Selects (a user will need to be present to choose between hard drives available on the client) or Install on Volume, which will automatically install on a volume whose name you specify.
  • Erase Target Volume -- This will erase all existing data before attempting to install from the image (related to this is the option to prompt for user confirmation before erasing).
  • Restart the Client Computer After Installing -- This can be useful to make clients available as soon as the install is completed, without requiring a user to acknowledge the install and restart manually.

When combined, these options can enable administrators to roll out new or updated systems with virtually no interaction required. In fact, if Apple Remote Desktop is available, administrators can select large numbers of clients, set them for Network boot from a NetInstall image, issue a restart command and simply wait for the process to complete with no other interaction.

Creating OS install images from install media

If you want to create a NetInstall image from a Mac OS X install DVD (sometimes referred to as an operating system install image), insert the DVD into the drive of the server or computer running System Image Utility. You will be able to select the DVD as your image source in the "Contents" tab. System Image Utility will recognize the disk and will offer a "Customize" button next to the "Image Source" pop-up menu.

Clicking this button allows you to preset some of the customization options that are available during a traditional Mac OS X installation. You can choose whether to install install printer drivers, additional fonts, language translations, the X11 environment and Apple's Xcode developer tools.

1 2 Page 1
Page 1 of 2
7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon