Louis Garcia II
2018-09-10 20:22:58 UTC
Currently I have uefi pxe boot setup and working fine. grub.cfg has different menu options pointing to different kickstart files for different systems. They are all x86_64 uefi. Is there a way to have dnsmasq serve different grub.cfg to different systems according to its MAC? Would dhcp-mac=set:<tag>,<MAC> and renaming grub.cfg to <MAC>-grub.cfg help?
Thanks.
#cat /etc/dnsmasq.conf
# Configuration file for dnsmasq:
# Log lots of extra information about DHCP transactions.
#log-dhcp
# Disables DNS function.
port=0
# Interface to listen on.
interface=lo
interface=eno2
# Ensures that Dnsmasq will listen only to those interfaces.
bind-dynamic
# DHCP server, supply the range of addresses available for
# lease and optionally a lease time.
dhcp-range=172.16.0.200,172.16.0.254,6h
# DHCP server, supply the router.
dhcp-option=3,172.16.0.1
# DHCP server, supply the DNS server.
dhcp-option=6,172.16.0.1
# DHCP server, match client.
dhcp-match=set:efi-x86_64,option:client-arch,7
# DHCP server, files to be served.
dhcp-boot=tag:efi-x86_64,shim.efi
# Enable dnsmasq's built-in TFTP server
enable-tftp
# Set the root directory for files available via FTP.
tftp-root=/srv/tftpboot
#ls /srv/tftpboot
grub.cfg grubx64.efi shim.efi
Thanks.
#cat /etc/dnsmasq.conf
# Configuration file for dnsmasq:
# Log lots of extra information about DHCP transactions.
#log-dhcp
# Disables DNS function.
port=0
# Interface to listen on.
interface=lo
interface=eno2
# Ensures that Dnsmasq will listen only to those interfaces.
bind-dynamic
# DHCP server, supply the range of addresses available for
# lease and optionally a lease time.
dhcp-range=172.16.0.200,172.16.0.254,6h
# DHCP server, supply the router.
dhcp-option=3,172.16.0.1
# DHCP server, supply the DNS server.
dhcp-option=6,172.16.0.1
# DHCP server, match client.
dhcp-match=set:efi-x86_64,option:client-arch,7
# DHCP server, files to be served.
dhcp-boot=tag:efi-x86_64,shim.efi
# Enable dnsmasq's built-in TFTP server
enable-tftp
# Set the root directory for files available via FTP.
tftp-root=/srv/tftpboot
#ls /srv/tftpboot
grub.cfg grubx64.efi shim.efi