Pawan’s Blog

All about System Center

Deep Dive PXE boot flow for SCCM 2007/2012

Deep Dive PXE boot flow for SCCM 2007/2012

  • Comments 16
  • Likes

Deep Dive PXE boot flow for SCCM 2007/2012

Hello All,

I have seen many people do not have their concepts clear about OSD PXE for SCCM. Hence I thought if writing this blog and I tried to elaborate as much as I can on this topic.

Machine does a network boot, it sends a broadcast to entire network with option 60. Both DHCP and WDS/PXE server gets the broadcast. DHCP offers the IP address to the client. 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).

Please Note

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.

Preferably, we configure IP helpers on the routers so that the broadcast can be forwarded to the DHCP and PXE server in the other subnet. One of the caveats here is if there are any king of security/firewall on the router/switches, proper arrangement needs to be made to allow the traffic.

For instance if DHCP snooping is used, the same needs to be allowed on the router/switches on the network as they potentially block the network traffic in these cases.

 

Now after the client machine gets an IP address, It downloads WDSNBP.COM from PXE server.

This file detects the hardware architecture on the machine and this information is later used at the time of boot image download.

 

Points of failure till this point:-

  • 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.

 

Let’s now look at the logs snippet from SMSPXE.

Screenshot from A failed machine and corresponding logs from SMSPXE

 

Client lookup reply: <ClientIDReply><Identification Unknown="0" ItemKey="16777223"

00:15:5D:0B:02:4F, D4EE23C0-E33F-4AD1-8C11-17058ABE0C4E: device is in the database.       SMSPXE        1/12/2014 11:13:13 AM  3156 (0x0C54)

Client boot action reply: <ClientIDReply><Identification Unknown="0" ItemKey="16777223" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification><PXEBootAction LastPXEAdvertisementID="" LastPXEAdvertisementTime="" OfferID="" OfferIDTime="" PkgID="" PackageVersion="" PackagePath="" BootImageID="" Mandatory=""/></ClientIDReply>

00:15:5D:0B:02:4F, D4EE23C0-E33F-4AD1-8C11-17058ABE0C4E: no advertisements found

00:15:5D:0B:02:4F, D4EE23C0-E33F-4AD1-8C11-17058ABE0C4E: No boot action. Aborted.

00:15:5D:0B:02:4F, D4EE23C0-E33F-4AD1-8C11-17058ABE0C4E: Not serviced.               SMSPXE               1/12/2014 11:13:14 AM               3156 (0x0C54)

Client boot action reply: <ClientIDReply><Identification Unknown="0" ItemKey="16777223" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification><PXEBootAction LastPXEAdvertisementID="" LastPXEAdvertisementTime="" OfferID="" OfferIDTime="" PkgID="" PackageVersion="" PackagePath="" BootImageID="" Mandatory=""/></ClientIDReply>

        SMSPXE               1/12/2014 11:13:17 AM  3156 (0x0C54)

00:15:5D:0B:02:4F, D4EE23C0-E33F-4AD1-8C11-17058ABE0C4E: no advertisements found       SMSPXE        1/12/2014 11:13:17 AM  3156 (0x0C54)

 ================================================================================================================================

Screenshot from a successful PXE boot and corresponding SMSPXE log…

Client lookup reply: <ClientIDReply><Identification Unknown="0" ItemKey="0" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification></ClientIDReply>

        SMSPXE               1/12/2014 11:23:51 AM  3156 (0x0C54)

00:15:5D:0B:02:64, 773FBA8A-EB14-453C-9EB1-B8F4657199BD: device is not in the database.               SMSPXE        1/12/2014 11:23:51 AM  3156 (0x0C54)

Getting boot action for unknown machine: item key: 2046820352     SMSPXE               1/12/2014 11:23:51 AM  3156 (0x0C54)

Client boot action reply: <ClientIDReply><Identification Unknown="0" ItemKey="2046820352" ServerName="" ServerRemoteName=""><Machine><ClientID>87776601-61c0-45d4-8425-363cf7803315</ClientID><NetbiosName/></Machine></Identification><PXEBootAction LastPXEAdvertisementID="" LastPXEAdvertisementTime="" OfferID="BLR20000" OfferIDTime="12/22/2013 8:54:00 AM" PkgID="BLR00001" PackageVersion="" PackagePath="http://MSBLR.MS.LOCAL/SMS_DP_SMSPKG$/CAS00005" BootImageID="CAS00005" Mandatory="0"/></ClientIDReply>

        SMSPXE               1/12/2014 11:23:51 AM  3156 (0x0C54)

00:15:5D:0B:02:64, 773FBA8A-EB14-453C-9EB1-B8F4657199BD: found optional advertisement BLR20000        SMSPXE               1/12/2014 11:23:51 AM  3156 (0x0C54)

Getting boot action for unknown machine: item key: 2046820353     SMSPXE               1/12/2014 11:23:59 AM  3156 (0x0C54)

Client boot action reply: <ClientIDReply><Identification Unknown="0" ItemKey="2046820353" ServerName="" ServerRemoteName=""><Machine><ClientID>304cce6c-b4ec-46fc-9f28-98c017b854f8</ClientID><NetbiosName/></Machine></Identification><PXEBootAction LastPXEAdvertisementID="" LastPXEAdvertisementTime="" OfferID="BLR20000" OfferIDTime="12/22/2013 8:54:00 AM" PkgID="BLR00001" PackageVersion="" PackagePath="http://MSBLR.MS.LOCAL/SMS_DP_SMSPKG$/CAS00005" BootImageID="CAS00005" Mandatory="0"/></ClientIDReply>

        SMSPXE               1/12/2014 11:23:59 AM  3156 (0x0C54)

00:15:5D:0B:02:64, 773FBA8A-EB14-453C-9EB1-B8F4657199BD: found optional advertisement BLR20000        SMSPXE               1/12/2014 11:23:59 AM  3156 (0x0C54)

Looking for bootImage CAS00005     SMSPXE               1/12/2014 11:23:59 AM  3156 (0x0C54)

==============================================================================================================================================================================

 

So once client machine architecture detection is completed using WDSNBP.com, it proceeds further with the PXE boot. And it downloads the PXE boot files from PXE server. Depending upon the advertisement Client machine download the PXE boot files. The file downloaded at this step is controlled/ monitored by SMSPXE. SMSPXE runs a stored procedure called getbootaction and depending on the result, it gives the PXE boot files to client.

For Optional advertisement: PXE.COM (User to press F12 to continue with the Network boot)

For Mandatory Adverts: PXEBOOT.n12

If for any reason PXE boot has to aborted, machine downloads abortpxe.com. Possible reasons for aborting PXE boot could be machine is not allowed for PXE boot, Client has already done the PXE boot once and PXE boot flag is set to yes. No advert found for machine in DB. Etc…

        The client machine now downloads the Boot image, bootmgr.exe and BCD store. BootMGR and BCD store are used to initialize the WINPE environment. Boot image downloaded here would be dependent on the result of the architecture detection done earlier by WDSNBP file.

 

Once the Boot image and the other two files are downloaded completely, it initializes the WINPE which in itself is a mini OS.

NOTE:

I have seen a couple of instances where the boot image download fails and you would see the Generic OS boot failure error message. Please do troubleshoot that error message as it is irrelevant to PXE boot. It just means that there is no OS found on the machine.

Once WINPE initializes, it does a DORA again and attain an IP address from DHCP server. In 99% cases the IP address is same as of the initial IP address. What’s important to know here is machine retries for the IP address and it’s not the one which it had originally while PXE booting

Once machine attains the IP address it finds the MP from AD and then connects to MP to download all the policies. And it gets all the policies are downloaded, user will be presented with the option to select the Task sequence. (If machine only has optional adverts)

Possible Failures at this stage:-

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 getting detected. Command which you can run here is IPCONFIG and DISKPART. DISKPART will confirm the presence of storage while ipconfig will confirm network connectivity.

Chances are there that even though these two tests succeeds, the machine still reboots after winPE initialization.

Check if machine is able to find the MP and if yes if the communication is happening OK with MP or not.

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

SMSTS log at this phase will be found at

X:\SMSTSLOG\SMSTS.lOG

X:\WINDOWS\TEMP\SMSTSLOG\SMSTS.LOG

 

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

I will cover the TS execution steps in details in my upcoming blog!!!

 

  • This will help a lot.. Great work Pawan Bhai!!

  • Good One Pawan

  • Good one n way to go..!

  • Very Well Theoretical explanation... Nice Work Pawan Bahi !!!

  • Very good one

  • Very Well Theoretical explanation... Nice Work Pawan Bahi !!!

  • great job

  • Awesome Blog. Finally everyone can benefit from your OSD knowledge.

  • awesome post man...great job

  • Awesome Blog ..Pawan bhai

  • Good stuff. When is the follow up coming on TS execution steps? :)

  • Next blog will be TS execution steps, anf is expected to be there by mid May...

  • Thank you. Very good document.

  • Nicely Explained.Thank you!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment