SCCM with PXE boot using a Linux DHCP Proxy and S2S VPN

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • gangsterhenk
  • Registratie: September 2007
  • Laatst online: 30-12-2022
Just for sharing:

Experiment: install a laptop with Windows using a remote SCCM server

Setup:

Local:
-Draytek (DHCP server and DNS)
-Laptop with legacy PXE boot (UEFI not tested)
-Old QNAP (ARM based)
-Site to Site VPN to remote location (IPSEC tunnel)

Remote Location:
-Draytek
-SCCM server
-Domain controller (also DHCP server)

To use PXE boot on the laptop we need some sort of relaying, on the local Draytek router you can choose “Enable Relay Agent” at the DHCP section to specify a (remote) DHCP relay server, typing in the remote DHCP server did not work, as we don’t want to mess further with the router we wanted to try another method.

We wanted to use the QNAP with DNSMASQ as a boot proxy.

As the QNAP is limited in commands to install stuff we installed Entware first:

https://github-wiki-see.p.../wiki/Install-on-QNAP-NAS
http://bin.entware.net/other/Entware_1.03a_alt.qpkg

Install DNSMASQ with opkg.

code:
1
/opt/bin/opkg install dnsmasq

In /opt/etc edit the dnsmasq.conf with nano (install it first) or vi and add these lines at the bottom of the file:

port=0
log-dhcp
dhcp-boot=pxelinux.0
pxe-service=X86PC, "Network Boot", pxelinux
dhcp-range=192.168.1.0,proxy,255.255.255.0
enable-tftp
tftp-root=/tftpboot

Where example 192.168.1.0 is the local network.

Check if dnsmasq is running:

code:
1
ps | grep dnsmasq

If not launch it:

code:
1
/opt/sbin/dnsmasq


Create the following folder structure on the QNAP:

code:
1
sudo mkdir -p /tftpboot/pxelinux.cfg

Find and download syslinux-6.03.zip (other versions will probably also work) and extract.

Copy the below files from the syslinux folder to the tftpboot folder:

pxelinux.0
menu.c32
pxechn.c32
libutil.c32
ldlinux.c32
libcom32.c32


Create a new file called “default” in folder /tftpboot/pxelinux.cfg

Contents of “default”:
--------------------------------------------------------------------------------------
default menu.c32
prompt 0
menu title Boot Menu

LABEL Windows Deployment Services
kernel pxechn.c32
append 192.168.2.1::\SMSBoot\x64\wdsnbp.com -W

---------------------------------------------------------------------------------------

(192.168.2.1 = SCCM SERVER IP example)


Network boot the laptop and response should be visible.

We noticed that the boot worked until this step, stayed in loop:

TFTP Download: sms\x64\pxeboot.com

TFTP Download: sms\x64\pxeboot.com


After a lot of investigation we suspected a connection issue and tried this registry setting on the SCCM
server:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WDSServer\Providers\WDSTFTP

Name: MaximumBlockSize
Type: (REG_DWORD)
Value range: 512–1456
Base: (Decimal)

After changing this key to “1360” the TFTP download was successful and F12 prompt appeared.

After pressing F12 the boot image started to load but it was very slow, some extra tweaking was required on below registry keys:


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP
Name: RamDiskTFTPWindowSize
Type: REG_DWORD

and

Location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP
Name: RamDiskTFTPBlockSize
Type: REG_DWORD
Value: <customized block size>


We set these on the SCCM server at the following values:

RamDiskTFTPBlockSize:4096
RamDiskTFTPWindowSize:16


The throughput was ten times faster !


After the boot was completed the task sequence did not appear and the error was:

“unknown host (gethostbyname failed) : 80072ee7 Failed task sequence 0x80004005”
This error is related to DNS. The laptop could not resolve the FQDN SCCM server name.

On the local Draytek we used the setting:
LAN DNS Resolution / Conditional DNS Forwarding

And added a DNS forwarding record (IP address example = domain controller / DNS server remote site)

Domain name
<FQDN name SCCM SERVER> or <*.domain.name> Type
DNS Forwarding DNS Server
192.168.2.2

Then the Task Sequence menu appeared and could install Windows OS.

Acties:
  • +1 Henk 'm!

  • HKLM_
  • Registratie: Februari 2009
  • Laatst online: 27-09 17:47
Leuk maar zoals je het omschrijft is het wel warrig. Als je geïnteresseerd bent in Cloud Deployment kan je eens deze pagina's bekijken

Cloud OS Deployment, Part 1 – Running MDT Task Sequences from Microsoft Intune

Cloud OS Deployment, Part 2 – Bare Metal Deployment via MDT from the Cloud

Cloud OS Deployment, Part 3 – Bare Metal Deployment via ConfigMgr with Content from the Cloud

Cloud OS Deployment, Part 4 – Imaging over Internet, directly into Windows Autopilot

Hij maakt gebruik van de open source PowerShell Deployment (PSD) extension welke het mogelijk maakt om bare metal deployments over Internet te doen waarbij de VM in Azure/AWS hangt :)

[ Voor 8% gewijzigd door HKLM_ op 30-12-2022 11:56 ]

Cloud ☁️