Setup NetBoot Service on Mac OS X 10.6.x Client - Testing

By: Richard Glaser - Revised: 2011-07-21 rcg


NetBoot a Client

Might be obvious, but a good first test is try NetBooting a client using the setup NetBoot Server running on a client.

Startup Manager
If your client is in the same subnet or you are passing broadcast information between subnets The you can press the "OPTION" key on startup to boot into Startup Manager and select the NetBoot volume.

Hold "N" Key on Startup
If you are doing firmware security, you can hold the "N" key during client startup to NetBoot using the default image.

Keyboard with "N" Key Pressed

Startup Disk
Using the "Startup Disk" System Preference pane, you can select your NetBoot volume.

Startup Disk

Apple Remote Desktop
Select "Set Startup Disk" from Manage menu and enter NetBoot volume name.

Apple Remote Desktop

Command Line
Or multiple options startup up from a default NetBoot image using CLI...

Default NetBoot Image
Below is the code to startup from default NetBoot Image using CLI...

sudo bless --netboot --server bsdp://[NetBoot Server IP]

Non-Default NetBoot Image
To startup from Non-Default NetBoot Image Syntax

sudo bless --netboot --server bsdp://[NetBoot Server IP]/[Image Name]

"--nextonly" option
The "--nextonly" option will change the boot device selection for the next boot. So, if you are trying to NetBoot client and there are issues, you just need to restart and it will boot from the previously set startup disk.

sudo bless --netboot --server bsdp://[NetBoot Server IP] --nextonly

Change NetBoot Server's Default NetBoot Image
See this script called "netbootch" from this website...

When run, it lists all available NetBoot images, the current default is marked with an asterisk, and prompts you to select a new default.

       [0]: 10.5.3_Auto_NetInstall.nbi
       [1]: NetInstall-Restore.nbi
     * [2]: Tiger to 10.5.4 Upgrade.nbi
       [3]: Tiger_to_10.5.3.nbi
       [4]: Visitors iMacs.nbi

       Select a new default image [0-4]:

Test TFTP from Client

Using tfpt command line tool, test transferring the booter file from the NetBoot server tftp [NetBoot Server IP]

% tftp
tftp> get NetBoot/NetBootSP0/CMS_Default_NetBoot.nbi/i386/booter
Received 334686 bytes in 0.2 seconds

Note: this test will fail if your Netboot set has spaces in its name. In general, however, its OK to have spaces in your Netboot set's name.

Test NFS

Use showmount command to show status info about a NFS on host
The "-e" option Shows the NetBoot Server hosts exports list.

For example...

%showmount -e
Exports list on
/Library/NetBoot/NetBootSP0 Everyone
/Library/NetBoot/NetBootClients0 Everyone

Use the mount_nfs command attempts to load the NFS Sharepoints

mkdir /tmp/mnt
mount_nfs <NetBoot Server IP>:/Library/NetBoot/NetBootSP0 /tmp/mnt

The sharepoint will show on the Desktop in Finder or access it via command line.

% ls -al /tmp/mnt/
total 2
drwxrwxr-x 3 root admin 102 Jun 9 15:28 .
drwxrwxrwt 13 root wheel 442 Jun 9 16:40 ..
drwxrwxr-x 5 root admin 170 Jun 6 13:56 CMS Default NetBoot.nbi


I didn't find a command line tool to test DHCP on Mac OS X, other than switching the client Network System Preference pane DHCP, in our environment are using manual static assignements. its a long story, so please don't email that I should using DHCP ;-)

But, there is a Mac OS X GUI application called IPNetMonitorX that tests DHCP.

The DHCP Test tool allows you to initiate DHCP transactions or exercise a DHCP Server

The "DHCP Type" popup menu at the upper left corner of the test parameters area allows you to select what DHCP transaction to generate.