Freigeben über


Deep Dive PXE boot flow for SCCM 2007/2012

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="https://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="https://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!!!

Comments

  • Anonymous
    January 01, 2003
    Good One Pawan
  • Anonymous
    January 01, 2003
    awesome post man...great job
  • Anonymous
    January 01, 2003
    Good one n way to go..!
  • Anonymous
    January 01, 2003
    Very Well Theoretical explanation... Nice Work Pawan Bahi !!!
  • Anonymous
    January 01, 2003
    Very good one
  • Anonymous
    January 01, 2003
    Thank you. Very good document.
  • Anonymous
    January 01, 2003
    This will help a lot.. Great work Pawan Bhai!!
  • Anonymous
    January 01, 2003
    Very Well Theoretical explanation... Nice Work Pawan Bahi !!!
  • Anonymous
    January 01, 2003
    great job
  • Anonymous
    January 01, 2003
    Good work Pawan
  • Anonymous
    February 03, 2014
    Awesome Blog. Finally everyone can benefit from your OSD knowledge.
  • Anonymous
    March 05, 2014
    Awesome Blog ..Pawan bhai
  • Anonymous
    April 01, 2014
    The comment has been removed
  • Anonymous
    May 09, 2014
    The comment has been removed
  • Anonymous
    May 10, 2014
    This is a continuation from my last blog which explains the PXE flow.
    PS: PXE flow deep dive
  • Anonymous
    May 11, 2014
    Hello People,
    In continuation to my last blog PXE Deep Dive , I am writing this one next in the series
  • Anonymous
    May 31, 2014
    Nicely Explained.Thank you!
  • Anonymous
    September 26, 2014
    Very well Explained Pawan
  • Anonymous
    October 19, 2014
    Well Explained Pawan!
  • Anonymous
    February 15, 2015
    Pawan, it is really a great work. The information is very helpful. However, would like to make a comment here on the ports described for PXE boot. TFTP port number should be 69 and not 66 I suppose. Kindly re-look in to it.
  • Anonymous
    May 11, 2015
    Awesome one.. Couldn have asked for anything else to see such a post, Read twice :)
  • Anonymous
    June 02, 2015
    Thanks,very interesting!