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

    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:

    pxe-service=x86PC,"Automatic Network boot",pxelinux
    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.
    "" 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

    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

    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.