enabling a netboot server on a 10.5 client

All copies of OS X Server include the ability to netboot client computers. This allows for diskless booting of public kiosks, quick and easy reimaging, diagnostics that require the main drive to be the non-boot drive (e.g.: Disk Utility’s Repair Disk function), the list goes on. However, every OS X client also has this functionality built right into it, you just have to do some digging and brave the command line – there are no friendly GUIs here. After all, not everyone can afford OS X server or has a need for a full-time server.

I found two great articles that really helped me along with configuring a client to netboot other clients, but neither article was 100% complete for my needs. The first site I used is http://coeexchange.com/?p=1521. This article contains a great script for use with 10.5 and one for use with 10.4. The second article I used is http://www.macgeekery.com/hacks/hardware/make_any_mac_a_netboot_server.

I will be writing this article to set up a 10.5 NetBoot server. 10.4 uses a different process, so please be sure to research the differences. Make sure you configure the computer as the root user or this will not work.

On a fully patched 10.5.8 client machine, open the terminal application (Applications > Utilities > Terminal). Create the needed directories and sim links:

mkdir -p /Library/NetBoot/NetBootSP0
mkdir /Library/NetBoot/NetBootClients
chown root:admin /Library/NetBoot/NetBootSP*
chmod 775 /Library/NetBoot/NetBoot*
cd /Library/NetBoot
ln -s NetBootSP0 /Library/NetBoot/.sharepoint
ln -s NetBootClients0 /Library/NetBoot/.clients

Next, make sure the folders used to Netboot are exported via the /etc/exports directory

echo "/Library/NetBoot/NetBootSP0 -ro" >> /etc/exports

Next, we need to link the NetBoot directory to the tftp directory and start tftp

ln -s /Library/NetBoot /private/tftpboot/NetBoot
service tftp start

Netboot relies on a bootpd.plist file located in /etc. Copy/paste the text between the pre tags into a text editor, and save it as bootpd.plist in the /etc directory.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
<dict>
        <key>bootp_enabled</key>
        <string>en0</string>
        <key>netboot_enabled</key>
        <string>en0</string>
        <key>old_netboot_enabled</key>
        <string>en0</string>
</dict>
</plist>

Make sure to start bootps

service bootps start

Next, place your .nbi file into the /Library/NetBoot/NetBootSP0 directory, and share it

Use SIU to create a .nbi image

Use the Sharing preference pane to share both /Library/NetBoot/NetBootSP0 and /Library/NetBoot/NetBootClients0

We now need to enable the .nbi file for NetBooting. This is accomplished easily via the Server Admin GUI in OS X Server, but we need to do this via the command line on client. Make sure you change directories to be inside the .nbi file.

defaults write $PWD/NBImageInfo -IsEnabled -bool true
defaults delete $PWD/NBImageInfo EnabledSystemIdentifiers
defaults delete $PWD/NBImageInfo DisabledSystemIdentifiers
plutil -convert xml1 NBImageInfo.plist
Finally restart bootpd, nfsd, and tftpdkillall -HUP bootpd
killall -HUP nfsd
service tftp stop
service tftp start

Once the computer restarts, hook another client machine up to the network on the same subnet as your “server” and open the Startup Disk preference pane. You should see your .nbi image as a valid boot disk.

Select the netboot disk and restart the computer.
If everything is configured properly, the other client should netboot right to your shared disk image.

To enable diskless booting, edit the NBImageInfo.plist file.

cd /Library/Netboot/NetBootSP0/<your_disk_image>.nbi
sudo pico NBImageInfo.plist
Edit the SupportDiskless option to true

About this entry