Option | Beschreibung | Name | Wert |
#066 | Boot Server Host Name | next-server | 192.168.10.150 |
#067 | Boot File Name | filename | /w10_x64/boot/pxeboot.n12 |
dhcpd.conf (Ubuntu 18.04) Beispiel:
default-lease-time 600; max-lease-time 7200; ddns-update-style standard;
# @Home include "/etc/bind/rndc.key"; zone rl40.dd. { primary 192.168.3.11; key rndc-key; } zone 3.168.192.in-addr.arpa { primary 192.168.3.11; key rndc-key; }
subnet 192.168.3.0 netmask 255.255.255.0 { authoritative; allow unknown-clients; ddns-updates on; range 192.168.3.126 192.168.3.150; option domain-name-servers 192.168.3.11, 8.8.8.8; option domain-name "rl40.dd"; option subnet-mask 255.255.255.0; option routers 192.168.3.254; option broadcast-address 192.168.3.255; option ntp-servers 192.168.3.11; default-lease-time 600; max-lease-time 7200; allow bootp; allow booting; next-server 192.168.3.11; filename "ipxe.pxe"; class "Legacy" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000"; } class "UEFI-32-1" { # NEC/PC98 match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00001"; #filename "ipxe.i386.efi"; } class "UEFI-32-2" { # EFI Itanium match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002"; #filename "ipxe.i386.efi"; } class "UEFI-32-3" { # DEC Alpha match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00003"; #filename "ipxe.i386.efi"; } class "UEFI-32-4" { # Arc x86 match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00004"; #filename "ipxe.i386.efi"; } class "UEFI-32-5" { # Intel Lean Client match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00005"; #filename "ipxe.i386.efi"; } class "UEFI-32-6" { # EFI IA32 (Intel x86 32-bit EFI mode) match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006"; filename "ipxe.i386.efi"; } class "UEFI-64-1" { # EFI x86-64 (Intel x86 64-bit EFI mode) match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007"; filename "ipxe.x86-64.efi"; } class "SURFACE-PRO-4" { match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:Arch:00007:UNDI:003016"; #filename "ipxe7156.efi"; } class "UEFI-64-2" { # EFI Xscale match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008"; #filename "ipxe.efi"; } class "UEFI-64-3" { # EFI BC match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009"; #filename "ipxe.efi"; } #include "/etc/dhcp/apple-boot.conf"; }
Hier könnte man die Macs einbinden:
class "APPLE-32" { # Limit this class to only Intel Apple machines match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386"; # Send these options to the client (possibly forcing it, if the client didn't request it) # From: http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xml option dhcp-parameter-request-list 1,3,17,43,60; if (option dhcp-message-type = 8) { option vendor-class-identifier "AAPLBSDPC"; if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) { # BSDP List option vendor-encapsulated-options # 01:01:01:04:02:80:00:07:04:81:00:05:2a:09:0d:81:00:05:2a:08:69:50:58:45:2d:46:4f:47; 01:01:01: # Start BSDP Inform/List Option 1 (01:), Length 1 (01:), Message Type List(1) (01:) 03:04: # BSDP option code 3 (length 04) -- Server Identifier 0A:00:03:02: # Server IP (10.0.3.2), Dec->Hex 04:02: # BSDP option code 4 (length 02) -- Server Priority 80:00: # Priority (32768) Dec->Hex 07:04: # BSDP option code 7 (length 04) -- Default Image ID 81:00:00:89: # Image ID - (137) Dec->Hex # This is what is picked as Default when you only hold down N on the client # # 81 breaks into: 0 or 8 for Non-Install (NetBoot) set or Install (NetInstal) set, # Most, including DeployStudio default to NetInstall set. # Then 0 for Mac OS 9, 1 for Mac OS X (Client) # 2 for OS X Server, and 3 for Hardware Diagnostics # 4- through 127 (x4:00-xf:ff) reserved for future use # And the last two are for the Image ID (Dec->Hex) # IDs 1-4095 (00:01-0F:FF) are for Server-Specific Images (You will probably want an ID in this range) # IDs 4096-65535 (10:00-FF:FF) Are "Globally-Unique", Multiple servers can present this same ID # and the client will only see one image, and pick a random(?) server to talk to. # 09: # BSDP option code 9 -- Boot image list 2A: # Length - =5*+, eg =5*2+(23+9), =10+32, =42, Dec->Hex =2A # This only appears once in the pacakge, no matter how many images you have below 81:00:00:89: # Image ID (137) -- dec->hex, see above (Default Image ID) for how to forumlate the full ID 09:44:6f:45:2d:49:6d:61:67:65: # Length(09):Name 'DoE-Image' ascii->hex 81:00:00:8A: # Image ID -- 138 17:44:53:52:2d:4e:42:30:31:30:31:32:30:31:32:2d:30:35:31:32:32:30:31:32; # Length(Hex:17,Dec:23):Name # Name: DSR-NB01012012-05122012 } elsif (substring(option vendor-encapsulated-options, 0, 3) = 01:01:02) { # BSDP Select, This is the client selecting which image they want to boot from # Here we basically do if statements to catch what image is referenced # Since we MIGHT be clustered, Check to see if we're the server being asked, this is BSDP Option 3 (Length 04) if (substring(option vendor-encapsulated-options, 9, 4) = 0A:00:03:02) { # Match to IP: 10.0.3.2, same as above. You'll want to change this log(info, "BSDP_SELECT-Responding, Client is talking to us."); # Log we're being talked to if (substring(option vendor-encapsulated-options, 15, 4) = 81:00:00:89) { # Catch Image ID 81:00:00:89 log(info, "BSDP_SELECT-Image: 137:DOE-Image"); # This isn't _needed_, but is nice for debugging/knowing # Insert stuff needed to boot here filename "/osx/i386/booter"; next-server 10.25.64.32; option root-path = "http://10.25.64.32/build.sparseimage"; } elsif (substring(option vendor-encapsulated-options, 15, 4) = 81:00:00:8A) { # Catch Image ID 81:00:00:8A log(info, "BSDP_SELECT-Image: DSR-NB01012012-05122012"); # Insert stuff here needed for boot # This example is from the FOG Project: filename "macnbi-i386/booter"; #Replace 192.168.1.1 with the server's actual IP address. #Need clarification if NetRestore works for both Intel and PowerPC #For DeployStudio, either copy DeployStudioRuntime.sparseimage to /nbi, or use nfs share to connect to deploy studio server #option root-path "nfs::/Volumes//Library/NetBoot/NetBootSP0:/DeployStudioRuntime.sparseimage"; #option root-path "nfs:192.168.1.1:/nbi:DeployStudioRuntime.sparseimage"; option root-path "nfs:192.168.1.1:/nbi:NetInstall-Restore.dmg"; next-server 192.168.1.1; } else { log(info,"BSDP_SELECT-ERROR: Client responded with an image we don't have a match for! -- (Image added to list, but not in select catch?)"); } # End Image Selection Response #filename "ipxe.efi" } else { # Log that we are not worthy of the client's time log(info,"BSDP_SELECT-Ignoring, Client is talking to another server--We're not worthy!"); } # End Server Check } # End BSDP Options Check } # End Class
https://community.oracle.com/thread/1940821
https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcp-options
https://tools.ietf.org/html/rfc2132#section-9.4
http://www.networksorcery.com/enp/protocol/bootp/options.htm
https://forums.fogproject.org/topic/10840/virtualbox-efi-pxe-boot/4
https://wiki.fogproject.org/wiki/index.php?title=FOG_on_a_MAC#architecture