Skip to content

Instantly share code, notes, and snippets.

@nonakap
Created September 14, 2022 09:17
Show Gist options
  • Save nonakap/5dd041b272f27937043c5a56dfee40e8 to your computer and use it in GitHub Desktop.
Save nonakap/5dd041b272f27937043c5a56dfee40e8 to your computer and use it in GitHub Desktop.
dhcpd.conf for NetBSD/x64
host netbsd-x86 {
hardware ethernet XX:XX:XX:XX:XX:XX;
fixed-address netbsd-x86;
option host-name "netbsd-x86";
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
if option client-arch = 00:06 {
filename "bootia32.efi";
} else if option client-arch = 00:07 or option client-arch = 00:09 {
filename "bootx64.efi";
} else {
filename "pxeboot_ia32.bin";
}
} elsif substring (option vendor-class-identifier, 0, 18) = "NetBSD:amd64:libsa" {
# bootx64.efi PXE boot
if filename = "tftp:boot.cfg" {
filename "tftp:boot.cfg";
} elsif filename = "boot.cfg" {
filename "tftp:boot.cfg";
} elsif filename = "netbsd" {
filename "nfs:netbsd";
}
} elsif substring (option vendor-class-identifier, 0, 17) = "NetBSD:i386:libsa" {
# BIOS/bootia32.efi PXE boot
if filename = "tftp:boot.cfg" {
filename "tftp:boot.cfg";
} elsif filename = "boot.cfg" {
filename "tftp:boot.cfg";
} elsif filename = "netbsd" {
filename "nfs:netbsd";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment