There is a proper way a network should be configured in order to allow your machines to netboot from a server located on a different subnet. Instructions for doing so can be found on AFP548.com. If however, you are not able to make the needed changes to your network hardware, you will need to set the startup disk to boot from a netboot image. This post will explain some different ways to do this. You can also use these methods if your server IS on the same subnet.
Mike Bombich used to make a product called “NetBoot Across Subnets” but he stopped developing it long ago (Mac OS X 10.4 era). The product still works somewhat, but PPC booting broke when Leopard came out. I posted a fix a couple years ago. These instructions can be used for imaging via Deploy Studio, NetInstall/NetRestore and likely some other methods.
There are three different ways I use to configure a machine to netboot:
- Push NBAS.pkg
- Run shell script
- Applescript
Push a Package
The first method is by pushing the package that Bombich’s “NetBoot Across Subnets” outputs. I’m not sure where you can download the software from anymore and I don’t think I should distribute it. However, I don’t actually use the app anymore. I just modify the postflight file in my NBAS.pkg whenever I generate a new netboot image.
You can download a NBAS.pkg here.
Right click the package and select “Show Package Contents”.
Navigate to Contents/Resources/ and open the postflight file in a text editor such as TextEdit or TextWrangler (do not open in Word!).
Change the variables at the top of the script and save the file.
You can then deploy via Apple Remote Desktop (ARD) or add it to your systems management tool such as Absolute Manage or Casper.
So when ever you create a new netboot set, simply modify that postflight file. This can also be installed locally. If needed, boot from an external HDD if you need to image a machine that doesn’t have a bootable system. Keep in mind, it does not matter which drive you “install onto” as this is a payload free package and nothing actually gets installed.
Shell Script
The second method is to simply push a script to your machine(s) to set the startup disk. The easiest way to do this is to take the postflight script from NBAS.pkg. I would just add a “reboot” command to the end of the script or use another method to reboot.
If you use Absolute Manage, you can save this as an Execute Script template and add it to your favorites. This way you any script errors that may result in the command result window. I’m sure you can do the same in other systems.
Applescript
You can also make an applescript available to your team to run locally on a machine to netboot it. This might be a bit easier for junior desktop support techs as they won’t get confused about which drive to “install onto”.
You can download the script from here. Or copy & paste from the script below:
(* Set NetBoot Across Subnets.scpt © 2011 Patrick Gallagher http://blog.macadmincorner.com This script may be freely modified. Use at your own risk, no warranty. Based on NBAS from Mike Bombich *) -- Set the following options set server to "server.school.edu" --Enter IP or FQDN of netboot server set sharepoint to "NetBootSP0" --In most cases this will not need to change set setName to "DeployStudioRuntime-Intel.nbi" --Enter your Intel compatible netboot set name set ppcSetName to "DeployStudioRuntime-PPC.nbi" --Enter your PPC netboot set name, if you have one set imageName to "DeployStudioRuntime.sparseimage" --Enter image name, if using DeployStudio, no need to change set protocol to "nfs" --Enter nfs or http set nextboot to "--nextonly" set arch to do shell script "arch" --No modification should be needed below if arch is equal to "i386" then do shell script "usr/sbin/bless --netboot --booter tftp://" & server & "/NetBoot/" & sharepoint & "/" & setName & "/i386/booter --kernel tftp://" & server & "/NetBoot/" & sharepoint & "/" & setName & "/i386/mach.macosx --options rp=nfs:" & server & ":/private/tftpboot/NetBoot/" & sharepoint & ":" & setName & "/" & imageName & space & "--nextonly" with administrator privileges else do shell script "/usr/sbin/nvram boot-args=rp=" & protocol & ":" & server & ":/private/tftpboot/NetBoot/" & sharepoint & ":" & ppcSetName & "/" & imageName & space & "boot-file=enet:" & server & ",NetBoot\\\\" & sharepoint & "\\\\" & ppcSetName & "\\\\ppc\\\\mach.macosx\" boot-device=enet:" & server & ",NetBoot\\\\" & sharepoint & "\\\\" & ppcSetName & "\\\\ppc\\\\booter\"" with administrator privileges end if tell application "loginwindow" «event aevtrrst» end tell
Summary
Do what you can to convince your network group to modify your network so you can netboot across subnets the way it it’s supposed to work. If not, I hope these methods above ease the pain. These are three ways to do the same thing!
No related posts.
Find more like this: Absolute Manage, Imaging, Scripting , Absolute Manage, Applescript, Desktop Management, Imaging, Mac, NetBoot, NetBoot Across Subnets, NetRestore, Packaging, Scripting





What we do is in our HP Procure at the core of our network I use the IP helper command to point to my netboot server and now netboot and deploystudio is available on all of our vlans or subnets.