Easy way to enable PXE on your local network

Discussion in 'Tutorials and Guides' started by wlanboy, Apr 10, 2016.

  1. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    I am using a user friendly router at home. Great for guest wlan and even separated lans, but it is not able to add boot information on the DHCP service.
    But - thanks to dnsmasq - you are able to add this information without modifying your router. It is able to enrich the DHCP response.


    Installation is simple:


    apt-get install dnsmasq


    Afterwards move the original configuration:


    mv /etc/dnsmasq.conf /etc/dnsmasq-bak.conf


    And create a new one:


    nano /etc/dnsmasq.conf


    With following content:


    port=0
    dhcp-range=192.168.178.0,proxy
    dhcp-boot=pxelinux.,192.168.178.30,192.168.178.0
    pxe-service=x86PC,"Automatic Network boot",pxelinux
    enable-tftp
    tftp-root=/usr/tftproot
    pxe-prompt="Press F8 for selection",5
    pxe-service=X86PC,"Boot from harddrive",


    DNS is disabled by the "port=0" command. DHCP range is given by your router.
    "192.168.178.30" is the ip of the linux server running the dnsmasq instance. 


    You do not have to install a ftp server, tftp is part of the dnsmasq service. Just add the information where the boot files are stored.


    After that you have to define what pxe-services or boot images you are providing. Due to the additional config files and default settings this will be part of my next tutorial.
     
    Last edited by a moderator: Apr 10, 2016
    drmike likes this.
  2. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    Awesome man!  I love dnsmasq - central to my ad blocking and DNS based cleanup of LANs.


    PXE server is fine to serve up ISOs right?  Looking forward to the next installment so I can start using this too.
     
  3. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    The content of the ISOs. You are able to serve as much boot images as you like.
    You can even create a semi-nice looking cmenu for each image.
     
    drmike likes this.