0

I've spun up a Ubuntu 18.04 (Bionic Beaver) server* with the intention of mounting the DBAN .iso so that I can PXE boot this. *server version of Ubuntu but this is actually desktop hardware (a Dell Optiplex 3020).

I found a guide for configuring this on an older version of Ubuntu which seemed to be more or less the same (except the naming convention for network interfaces). Having followed the steps, I can't actually get the PXE boot from another machine (connected to the server via a switch) working, and as best I can tell this is to do with the configuration of dnsmasq which is being used as the DHCP server. The error I receive is

PXE-EH1: No DHCP or proxyDHCP offers were received.    
PXE-MOF: Exiting PXE ROM

Between the initial guide I was following and some other forums and such I have found whilst troubleshooting I have cobbled together the following /etc/dnsmasq.conf

dhcp-authoritative
interface=enp2s0
bind-interfaces
dhcp-options=3,0.0.0.0
dhcp-options=6,0.0.0.0
dhcp-range=10.0.0.2,10.0.0.254,6h
dhcp-boot=pxelinux.0,dban-server,10.0.0.1

When I run dnsmasq --test the syntax check is OK. And if I restart dnsmasq it throws no errors.

For info the initial config was as below and was only changed when I was having the same issue as I am now.

 dhcp-range=10.0.0.2,10.0.0.254,6h
 dhcp-boot=pxelinux.0,dban-server,10.0.0.1
 interface=enp2s0

I think the rest of my setup is OK, but as I can't seem to get dnsmasq to issue a DHCP lease to the other machines.

2

Got to the bottom of this - definitely just me knowing nothing about Linux. On the off chance that anyone else has the same issue:

It turned out by default IPv4 was disabled, noticed in ifconfig that the interface only had an IPv6 address. Open network config file:

sudo nano /etc/netplan/50-cloud-init.yaml

Then disabled DHCP and set an IPv4 address so the file reads as:

network:
   ethernets:
       enp2s0:
          dhcp4: no
          addresses: [10.0.0.1/24]
    version: 2

Make sure you use spaces not tabs in this file as it does not work when tabs are used. And obviously make sure you are using your own interface (mine is enp2s0) and the static address and netmask that you want.

Once you've saved the file enter

sudo netplan apply

That's what worked for me anyway - all other configurations worked as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.