tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PXE-booting via EFI
On 14/09/22 20:34, Edgar Fuß wrote:
This question is mostly not NetBSD-specific, but I'm not sure the answers
I found elswhere are technically correct.
When PXE-booting in legacy BIOS mode, the filename that the DHCP server
offers in the first step is pxeboot_ia32.bin. When PXE-booting in EFI mode,
that filename should be bootx64.efi.
How can I diffentiate between the two methods in dhcpd.conf?
Common wisdom seems to check option architecture-type = 00:07,
but there are also fields in option vendor-class-identifier after
"PXEclient:" that seem to differ.
I used to have extensive notes about this, but my world has become
simpler more recently.
I use
# This should detect BIOS or UEFI
if substring (option vendor-class-identifier, 0, 20) =
"PXEClient:Arch:00007" {
filename "bootx64.efi";
}
elsif substring (option vendor-class-identifier, 0, 20) =
"PXEClient:Arch:00000" {
filename "pxeboot_ia32.bin";
} else {
option root-path "/srv/rescue/NetBSD/amd64/9.2";
}
IIRC vendor-class-identifier can also tell you whether you have an ARM,
i386, x64 etc. and whether the system is looking for an HTTP boot
server. I don't have my full notes on hand though.
Probably NetBSD-specific: In the second stage (PXE boot loading the kernel),
in legacy mode, vendor-class-identifier is "NetBSD:i386:libsa", while in EFI
mode, it seems to be "NetBSD:amd64:libsa" (note "amd64", not "x86_64").
Is this guaranteed behaviour?
Yes. I'm quite sure that anyone changing those strings now will get
yelled at.
One way I simplified my DHCPD configuration was to export all files
except the initial bootstrap via NFS, which means I don't need to
specify a filename and I just need to set the root-path. i.e. I am using
the NetBSD netboot defaults so that my configuration is easier.
Cheers,
Lloyd
Home |
Main Index |
Thread Index |
Old Index