Wednesday 31 August 2016

How PXE Works


Machine Start the network boot and send the broadcast to the entire network with  option 60

Both DHCP and WDS/PXE servers gets the broadcast on port 67

DHCP Offers the free IP to the client and the client receive the IP on port 68

But before the client machine requests for the offered IP, it waits for a green signal from WDS. WDS/PXE sever runs a stored procedure, LOOKUPDEVICE for the client machine against SCCM DB. If the machine is found in the DB or If there is an advert for Unknown collection, WDS signals client to proceed with the PXE boot.

Client machine now requests for the IP offered by DHCP and DHCP then acknowledges this IP assignment. Machine finally has an IP address and is ready to proceed further. (DORA completes).

The above scenario is only true if we have the client machine PXE and DHCP all are in same subnet. If any of these 3 are in a separate subnet, necessary arrangement needs to be made so that the Broadcast sent by client could reach to both DHCP and PXE server.

In this case we configure IP helper in router so the broadcast can to forwarded to DHCP and  PXE Server.

Now the client download WDSNBP.COM from PXE server

Wdsnbp.com validates the DHCP/PXE response packet and proceeds to download PXEBoot.com

PXEBoot.com downloads Bootmgr.exe and the BCD store. The BCD store must reside in a \Boot directory in the TFTP root folder. Additionally, the BCD store must be called BCD (BootMGR and BCD store are used to initialize the WINPE environment)

Bootmgr.exe reads the BCD operating system entries and downloads Boot.sdi and the Windows PE image (Winpe.wim).

Bootmgr.exe begins booting Windows PE by calling into Winload.exe within the Windows PE image.
Point for Failure

Client Machine may not be part of SCCM DB and there is not advert on Unknown collection.        This can be tracked in SMSPXE.LOG which is available on PXE service point in MP directory.

Client machine is not in the same subnet as of the PXE and DHCP server. In this situation if the IP helper table is not configured, the broadcast sent by client will not be forwarded to the other  subnet.

Ports: 66, 67 and 4011 should be open for IP assignment and WDS file download.

Machine reboots the moment WINPE screen appears Enable command prompt in WINPE and open CMD by hitting F8 once WinPE initializes. Make sure machine has an IP address and the HDD is Setting detected. Command which you can run here is IPCONFIG and DISKPART. DISKPART will confirm the presence of storage while ipconfig will confirm network connectivity.

Collect SMSTS log to see the detailed error and troubleshoot accordingly.

Once you see the TS execution has started, we conclude PXE boot is working

Sunday 28 August 2016

SCCM Prompt Query to find Machine Name Using MAC address

During the OSD deployment you may faced issue with known machine in SCCM database. Even thought you deleted the machine, somehow the MAC address register in SCCM database in different name.

Below is the prompt query which helps to find computer name using MAC address.

select distinct SMS_R_System.Name, SMS_R_System.MACAddresses from  SMS_R_System where SMS_R_System.MACAddresses = ##PRM:SMS_R_System.MACAddresses## order by SMS_R_System.MACAddresses

SCCM SQL Query to get Bit-locker Recovery Key

  SELECT cm.Name, ck.RecoveryKeyId, cv.VolumeGuid, cvt.TypeName AS 'Volume Type', RecoveryAndHardwareCore.DecryptString(ck...