Initial installation DHCP options

WinPE startup image that is used in the initial installation can be configured by editing mdvariables.cmd in the PE image or more preferably by using DHCP options.

All user configurable settings in mdvariables.cmd can be configured in DHCP options. The settings can be configured in both places (mdvariables.cmd and DHCP) but the corresponding DHCP options will override the options in mdvariables.cmd.

Available Miradore specific DHCP options

Number

Name

230

Miradore server

Miradore server's name (FQDN) or IP address

231

Miradore instance

Miradore instance name (default=Miradore)

232

HTTP/HTTPS port

Miradore user interface's HTTP/HTTPS port (1-65536) (default=80)

233

Use HTTPS

Use HTTPS when connecting to Miradore server (0/1) (default=0)

234

WinPE keyboard layout

Sets keyboard layout in MS Windows locale format (0409:0000xxxxx) (default=0409:0000040b)

235

Proxy server[:port]

Proxy server's name (FQDN) or IP address (optionally followed by colon and TCP port)

236

Proxy authentication method (none, basic, digest, ntlm)

Authentication method configured in the proxy server

237

Proxy user

Username to be used when authenticating to the proxy server

238

Proxy user password

Password for the authenticating proxy user

 

Configuring DHCP options

By default Microsoft's DHCP server does not show all possible options so you must add the options to be configured.

Use following commands on the DHCP server to add Miradore options:

netsh Dhcp Server Add Optiondef 230 "Miradore server" STRING 0 comment="Miradore server's name (FQDN) or IP address"

netsh Dhcp Server Add Optiondef 231 "Miradore instance" STRING 0 comment="Miradore instance name" "Miradore"

netsh Dhcp Server Add Optiondef 232 "Miradore HTTP/HTTPS port" STRING 0 comment="Miradore HTTP/HTTPS port (1-65536)" "80"

netsh Dhcp Server Add Optiondef 233 "Miradore Use HTTPS" STRING 0 comment="Use HTTPS when connecting to Miradore server (0/1)" "0"

netsh Dhcp Server Add Optiondef 234 "Miradore WinPE Keyboard Layout" STRING 0 comment="Sets Miradore WinPE keyboard layout (0409:0000xxxxx)" "0409:0000040b"

netsh Dhcp Server Add Optiondef 235 "Proxy server[:port]" STRING 0 comment="Proxy server's name (FQDN) or IP address (and port if not 80)"

netsh Dhcp Server Add Optiondef 236 "Proxy authentication method" STRING 0 comment="Proxy authentication method (None,Basic,Digest,NTLM)"

netsh Dhcp Server Add Optiondef 237 "Proxy user" STRING 0 comment="Proxy username"

netsh Dhcp Server Add Optiondef 238 "Proxy password" STRING 0 comment="Proxy user's password (plaintext)"

After you have added the options, you can configure them to scope level or server level.

How to enable network PXE boot

Configure the following DHCP options:

Number

Name

Description

66

Boot Server Host Name

Set the installation point server name or its TCP/IP address.

67

Bootfile Name

Set as "boot\pxeboot.com".

The boot file "boot\pxeboot.com" works only with computers that have legacy BIOS and on UEFI computers that have Compatibility Support Module (CSM) enabled. See instructions for UEFI computers below.

How to enable network PXE boot for both UEFI and legacy BIOS computers

In order to support network boot for both UEFI and legacy BIOS computers, you must have a DHCP server which can return different options to the requesting client depending on the client’s firmware. The clients are differentiated by a vendor class identifier sent in the DHCP request. The following Vendor Class Identifiers are sent:

32bit UEFI: PXEClient:Arch:00006:UNDI:003016

64bit UEFI: PXEClient:Arch:00007:UNDI:003016

Legacy BIOS: PXEClient:Arch:00000:UNDI:002001

Windows Server 2012 has DHCP policies which can be used in this scenario. Linux DHCP server can also differentiate between the clients. Other DHCP servers may have this kind of features as well.

How to configure Windows Server 2012 DHCP server options

Configure option 66 to contain installation point server name or IP address.

Use PowerShell on the DHCP server and enter the following commands:

Add-DhcpServerv4Class -Name "PXE clients (Legacy BIOS)" -Type Vendor -Data "PXEClient:Arch:00000:UNDI:002001"

Add-DhcpServerv4Class -Name "PXE clients (32bit UEFI)" -Type Vendor -Data "PXEClient:Arch:00006:UNDI:003016"

Add-DhcpServerv4Class -Name "PXE clients (64bit UEFI)" -Type Vendor -Data "PXEClient:Arch:00007:UNDI:003016"

Add-DhcpServerv4Policy -Name "PXE clients (Legacy BIOS)" -Description "Policy for PXE clients (Legacy BIOS)" -Condition "OR" -VendorClass "EQ", "PXE clients (Legacy BIOS)"

Add-DhcpServerv4Policy -Name "PXE clients (32bit UEFI)" -Description "Policy for PXE clients (32bit UEFI)" -Condition "OR" -VendorClass "EQ", "PXE clients (32bit UEFI)"

Add-DhcpServerv4Policy -Name "PXE clients (64bit UEFI)" -Description "Policy for PXE clients (64bit UEFI)" -Condition "OR" -VendorClass "EQ", "PXE clients (64bit UEFI)"

Add-DhcpServerv4OptionDefinition -Name "WPAD / Boot configuration file" -OptionId 252 -Type String

Set-DhcpServerv4OptionValue -PolicyName "PXE clients (Legacy BIOS)" -OptionId 67 -Value "boot\pxeboot.com"

Set-DhcpServerv4OptionValue -PolicyName "PXE clients (Legacy BIOS)" -OptionId 252 -Value "boot\bcd"

Set-DhcpServerv4OptionValue -PolicyName "PXE clients (32bit UEFI)" -OptionId 67 -Value "boot\bootia32.efi"

Set-DhcpServerv4OptionValue -PolicyName "PXE clients (32bit UEFI)" -OptionId 252 -Value "boot\bcd.x86"

Set-DhcpServerv4OptionValue -PolicyName "PXE clients (64bit UEFI)" -OptionId 67 -Value "boot\bootx64.efi"

Set-DhcpServerv4OptionValue -PolicyName "PXE clients (64bit UEFI)" -OptionId 252 -Value "boot\bcd.x64"

 

Notice that you can run the "Add-DhcpServerv4Policy" and "Set-DhcpServerv4OptionValue" commands for certain DHCP scopes only. See the examples below.

Add-DhcpServerv4Policy -Name "PXE clients (Legacy BIOS)" -Description "Policy for PXE clients (Legacy BIOS)" -Condition "OR" -VendorClass "EQ", "PXE clients (Legacy BIOS)" -ScopeId 192.168.1.0

Set-DhcpServerv4OptionValue -PolicyName "PXE clients (32bit UEFI)" -OptionId 252 -Value "boot\bcd.x86" -ScopeId 192.168.1.0

How to configure Linux DHCP server (dhcpd):

Linux DHCP server (dhcpd) has a “pxe-system-type” option which can be used to differentiate the clients. Below is an example "dhcpd.conf" that may be used (replace the IP addresses with your own values):

ddns-update-style interim;

 

allow booting;

allow bootp;

 

ignore client-updates;

set vendorclass = option vendor-class-identifier;

 

option pxe-system-type code 93 = unsigned integer 16;

 

subnet 192.168.1.0 netmask 255.255.255.0 {

option routers             192.168.1.5;

option domain-name-servers 192.168.1.1;

option subnet-mask         255.255.255.0;

range dynamic-bootp        192.168.1.100 192.168.1.254;

default-lease-time         21600;

max-lease-time             43200;

next-server                192.168.1.10;

class "pxeclients" {

match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

if option pxe-system-type = 00:06 {

filename "boot\\bootia32.efi";

} else if option pxe-system-type = 00:07 {

filename "boot\\bootx64.efi";

} else {

filename "boot\\pxeboot.com";

}

}

}

 

Network boot will not be used when initial installation for a managed Windows computer is started from Miradore. In this case the WinPE image is copied to the hard disk and booted from there. See Initial installation without network boot.

For more information about network boot see Initial installation startup methods.

See also

Initial installation startup methods

Initial installation without network boot

Miradore TFTP server configuration

Using private CA certificate with initial installation

Troubleshooting TFTP issues