[lug] pxe boot and routing

Michael J. Hammel mjhammel at graphics-muse.org
Wed Jan 13 09:57:26 MST 2016


I had to set up a PXE boot process for automated installs at work.  I
know about Cobbler, et al but this was something much simpler.  They
just wanted an easy way to bring up a Linux box for Windows people. And
I'm doing this without getting corp IT involved, so I'm hiding it on a
private network just for our development group. 

Anyway, I have a system setup up with DHCP and a TFTP server.  The host
system PXE boots a minimal rootfs built with Buildroot and runs an init
script (S99platform) that downloads a task-specific script based on the
PXE configuration for that host.  The task-specific script (in this
case) partitions the disk on the host, downloads a bootfs and rootfs
and unpacks them on the appropriate partitions.  

The last step is to install legacy grub on the MBR.  I do this by
chrooting into the rootfs I just installed and running grub-install.
During testing I discovered that the rootfs.tar.gz I created didn't
have the legacy grub to do this, so I added an apt-get install to get
it from within the chroot.

Problem is that the PXE boot is on a private network, not the corp
network.  The host can see the TFTP server, no problem.  It can ping
corp addresses.  It can't use DNS.  Without that, apt-get doesn't work.

The TFTP server has the private network set as an IP address manually
added to an existing interfaces, as in:

   ifconfig eth0:1 <ip address> ...

The TFTP server is also the DNS server.  So while I can ping from the
host to the TFTP server (both eth0 and eth0:1) I can't get the DNS
server to respond to requests to the host on the private network.  

The DNS config looks correct ("any" instead of specific IPs/networks in
all the right places).  Any thoughts on what I can do to get DNS
working in this scenario?  I have a work around for this particularly
problem (put the needed tools in the source rootfs.tar.gz so I can
avoid having to do it during install) but I'd like to know how to fix
the routing/DNS problem.  
-- 
Michael J. Hammel <mjhammel at graphics-muse.org>



More information about the LUG mailing list