So I moved all files for booting via pxe from root directory to /bios directory and changed dhcp-boot
from dhcp-boot=pxelinux.0
to dhcp-boot=/bios/pxelinux.0
, but my vm still booting from /pxelinux.0
, not /bios/pxelinux.0
log from server:
❮ sudo systemctl status dnsmasq-pxe
● dnsmasq-pxe.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq-pxe.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2021-01-01 10:11:21 WIB; 1min 17s ago
Process: 19637 ExecStart=/usr/sbin/dnsmasq -C /etc/dnsmasq-pxe.conf (code=exited, status=0/SUCCESS)
Main PID: 19639 (dnsmasq)
Tasks: 1 (limit: 423)
Memory: 364.0K
CGroup: /system.slice/dnsmasq-pxe.service
└─19639 /usr/sbin/dnsmasq -C /etc/dnsmasq-pxe.conf
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 tags: eth0
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 bootfile name: pxelinux.0
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 next server: 192.168.69.254
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 broadcast response
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 sent size: 1 option: 53 message-type 5
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 sent size: 4 option: 54 server-identifier 192.168.69.254
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 sent size: 9 option: 60 vendor-class 50:58:45:43:6c:69:65:6e:74
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 sent size: 17 option: 97 client-machine-id 00:2b:1b:a4:48:8a:df:9b:48:a8:
Jan 01 10:12:00 orangepizero dnsmasq-dhcp(19639): 0 sent size: 7 option: 43 vendor-encap 47:04:80:00:00:00:ff
Jan 01 10:12:00 orangepizero dnsmasq-tftp(19639): file /srv/pxe/pxelinux.0 not found
log from VM:
Booting from PXE menu
PXE
PXEBS (net0 type 128)... ok
Next server: 192.168.69.254
Filename: pxelinux.0
tftp://192.168.69.254/pxelinux.0... No such file or directory (http://ipxe.org/2d12603b)
No more network devices
dnsmasq-pxe.conf (i’m using dnsmasq-pxe.conf as dnsmasq’s config)
# Disable DNS Server
port=0
# Enable DHCP logging
log-dhcp
# Respond to PXE requests for the specified network;
# run as DHCP proxy
dhcp-range=192.168.69.0,proxy
#dhcp-no-override
# Provide network boot option called "Network Boot".
pxe-service=x86PC,"Network Boot",pxelinux
enable-tftp
dhcp-boot=/bios/pxelinux.0
tftp-root=/srv/pxe
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,uefi/syslinux.efi