Author Topic: Multiple PXE boot services howto  (Read 4576 times)

centaur5

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Multiple PXE boot services howto
« on: March 31, 2009, 05:54:27 am »
Ebox has built in support for adding network boot files into the DHCP server which is great and does work well.  However, I wanted to do 2 services via PXE boot one for new Ubuntu installs on workstations and the other for LTSP on a couple machines I have.  So I setup the PXE boot file for the global section in Ebox through the standard GUI interface as normal nothing special had to be done there to make the network installs work.  Of course I want the network installs to be global so every machine besides the ones I specify can do a new install if desired.  In order to make a certain machine have different boot options custom fields must be added to the the fixed IP section of that host.  Since I only have 2 machines that I want to LTSP boot I made the following change to /usr/share/ebox/stubs/dhcp/subnet.mas file on line 27:

*The following code was completely thanks to sixstone.  Thanks for your help with this!

%          foreach my $fixed (@{$fixedAddresses}) {
      host <% $fixed->{'name'} %> {
         hardware ethernet <% $fixed->{'mac'} %>;
         fixed-address <% $fixed->{'ip'} %>;
%          if ( ($fixed->{'name'} eq 'host1') or ($fixed->{'name'} eq 'host2') ) {
            filename "/ltsp/i386/pxelinux.0";
            option root-path "/opt/ltsp/i386";
%          }
      }
%             }

I added the entire foreach loop in case the line ever changes from being on line 27 so you know where it needs to go.  Of course you'll need to change host1 and host2 with the names that you provide under the static IP settings in the DHCP configuration of Ebox.  Hope this helps someone else that wants to accomplish the same task.