Difference between revisions of "DNSMASQ - PXE BOOT No DCHP"

From HyperSecurity Wiki
Jump to: navigation, search
(No difference)

Revision as of 19:56, 28 October 2014

#!/bin/bash
IPADDR=`/bin/hostname -I | cut -d' ' -f1`
PXECONF=/etc/dnsmasq.d/pxe.conf
#Remove old pxe.conf
rm -rf $PXECONF
#Create PXE file
echo tftp-root=/tftpboot >> $PXECONF
echo enable-tftp >> $PXECONF
echo dhcp-boot=pxelinux.0 >> $PXECONF
echo dhcp-option=vendor:PXEClient,6,2b >> $PXECONF
echo dhcp-no-override >> $PXECONF
echo pxe-prompt="Press F8 for boot menu", 3 >> $PXECONF
echo pxe-service=X86PC, "Boot from network", pxelinux >> $PXECONF
echo pxe-service=X86PC, "Boot from local hard disk", 0 >> $PXECONF
echo dhcp-range=$IPADDR,proxy >> $PXECONF