Building a NetBoot utility disk
As part of providing support for the Macs in my shop, I build and use utility disks which contain useful utilities like DiskWarrior and Carbon Copy Cloner. My shop’s network supports NetBoot across subnets, so I also build NetBoot sets from the utility disks. The reasons I do this are the following:
- Having a utility disk available via NetBoot means I always have access to a utility disk when needed.
- The other members of my team also have access to the same utility disk when they need it.
- Nobody needs to carry around external drives with the utility software.
- Updates to the utility disk can be made in a centralized fashion.
For details on how I’m building NetBoot sets from utility disks, please see below the jump.
- System Image Utility
- An already-built utility drive available on a hard drive with at least 30 GBs of free space.
- A separate boot volume which is running the same OS version as the utility drive
- Available local disk space to store the new NetBoot utility drive on during the creation process
Adding extra drive space for the NetBoot set:
To help make sure that there is available space on the NetBoot disk for copying files and for OS X’s memory swap, I prefer to add a large empty disk image to the utility drive which is acting as the template. This large empty disk image is included in the NetBoot disk as part of the creation process, then removed later and deleted.
The reason to do this is that otherwise the NetBoot disk will be created with only one or two gigabytes of available free space. Please see below for the procedure I’m using:
1. Open Disk Utility
2. Select the option to create a new blank disk image
3. Set the size as desired (I normally set it to 30 GBs.)
4. Save to a convenient location on the utility drive
Creating the NetBoot set:
1. On the boot volume, launch System Image Utility
2. Select the utility drive and click the Next button.
3. Set the network disk image type as NetBoot Image then click the Next button.
4. Click the Agree button in the Software License Agreement window.
5. In the Add Configuration Profiles, Packages and Post-Install Scripts window, make no changes and click the Next button.
6. In the System Configuration window, make no changes then click the Next button.
7. In the Directory Servers window, make no changes and click the Next button.
8. In the Image Settings window, enter the Network Disk: and Description: settings as desired and also enable the following settings:
Select how you want to assign an image number. You can assign a random number, which generates a value from 1 – 4096 or you can manually assign a number. If you choose to have the image served from multiple NetInstall servers, the number generated will be from 4097 – 65535.
I use the following settings when creating NetBoot utility disks:
- Assign a random image index
- Image will be served from multiple servers
Once all settings have been set, click the Next button.
9. In the Supported Computer Models window, make no changes and click the Next button.
10. In the Filter Clients by MAC address window, make no changes and click the Next button.
11. When prompted, enter a desired name for the NetBoot set and save where convenient.
12. When prompted, authorize creation of the NetBoot set by entering an administrator’s username and password.
13. The NetBoot set will be created and saved.
14. When the process has completed, click the Done button.
Removing blank disk image from the NetBoot set:
To make sure the NetBoot set has sufficient free space, the blank disk image now needs to be removed. Please see below for the procedure I’m using:
1. Disconnect the utility drive.
Note: The reason for this step is that the NetBoot drive will have the same drive name and disconnecting the utility drive will help avoid confusion.
2. Double-click on the NetBoot set’s NetBoot.dmg file to mount the disk image.
3. Once mounted, navigate to where the blank disk image is stored and delete the disk image.
4. Unmount the disk image.
Compressing the NetBoot set:
To save space on the NetBoot server, my next step is to take the NetBoot set’s NetBoot.dmg file and convert it from a read/write disk image to a read-only compressed disk image. This conversion will shrink the size of the NetBoot.dmg file, but will not reduce the available free space of the NetBoot disk when it’s being used to boot over the network.
1. Move the NetBoot set’s NetBoot.dmg file outside of the NetBoot set folder.
2. Convert the disk image to Compressed format and save the compressed image into the NetBoot set folder.
Once the NetBoot set’s NetBoot.dmg file has been converted to a read-only compressed disk image, it is ready to be posted to the NetBoot server.
Enabling the NetBoot set for use:
1. Copy the NetBoot set to your NetBoot server
2. Add it to where you host NetBoot sets (this will likely be /Library/NetBoot/NetBootSP0, but you may have NetBoot sets stored on an alternate drive.)
3. Open Server.app and select NetInstall
4. Select the NetBoot set, then click the gear icon.
5. In the gear icon’s menu, select Edit Image Settings…
6. In the settings window, select the following:
- Make available over NFS
- Make this image available for diskless booting
When the settings have been set, click the OK button.
Testing the NetBoot set:
Boot a couple of Macs from the new NetBoot set to verify that it is working properly.