{"id":413,"date":"2022-11-22T02:10:57","date_gmt":"2022-11-22T02:10:57","guid":{"rendered":"https:\/\/3735943886.com\/?p=413"},"modified":"2023-01-21T04:03:30","modified_gmt":"2023-01-21T04:03:30","slug":"pxe-windows-pe-under-uefi-and-secure-boot-enabled","status":"publish","type":"post","link":"https:\/\/3735943886.com\/?p=413","title":{"rendered":"PXE Windows PE under UEFI and Secure Boot Enabled"},"content":{"rendered":"<h2>1. Download <strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/windows-hardware\/get-started\/adk-install\">Windows PE add-on for the Windows ADK for Windows 11, version 22H2<\/a><\/strong> and install.<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-425 size-full\" style=\"border: 5px solid #555;\" src=\"https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/00ADKDOWN.png\" alt=\"\" width=\"762\" height=\"1085\" srcset=\"https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/00ADKDOWN.png 762w, https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/00ADKDOWN-211x300.png 211w, https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/00ADKDOWN-719x1024.png 719w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/p>\n<p>In this example, <strong>Windows ADK Folder<\/strong> (default, C:\\Program Files (x86)\\Windows Kits\\10\\Assessment and Deployment Kit\\Windows Preinstallation Environment) is <strong>%PEFOLDER%<\/strong> and the <strong>TFTP Server Root<\/strong> is <strong>%TFTPROOT%<\/strong><\/p>\n<h2>2. Patch <strong>BCD<\/strong> in<strong> %PEFOLDER%\\amd64\\Media\\EFI\\Microsoft\\Boot\\<\/strong><\/h2>\n<ul>\n<li>Change the path of Boot Manager to our file, \\bootx64.efi\n<pre>&gt; bcdedit \/store BCD \/set {bootmgr} path \\bootx64.efi<\/pre>\n<\/li>\n<li>Disable Integritycheck and Change Bootmenupolicy to Legacy\n<pre>&gt; bcdedit \/store BCD \/set {bootmgr} nointegritychecks Yes\n&gt; bcdedit \/store BCD \/set {default} bootmenupolicy Legacy<\/pre>\n<\/li>\n<li>Since linux file system treats file and directory names as case-sensitive, ramdisksdipath need to be modified in case that PXE is served on linux server\n<pre>&gt; bcdedit \/store BCD \/set {7619dcc8-fafe-11d9-b411-000476eba25f} ramdisksdipath \\Boot\\boot.sdi<\/pre>\n<\/li>\n<li>Entries of patched BCD should be identical to:\n<pre>&gt; bcdedit \/store BCD \/enum all\n\nWindows Boot Manager\n--------------------\nidentifier              {bootmgr}\n<em><strong><u>path                    \\bootx64.efi<\/u><\/strong><\/em>\ndescription             Windows Boot Manager\nlocale                  en-US\ninherit                 {globalsettings}\n<strong><em><u>nointegritychecks       Yes<\/u><\/em><\/strong>\nflightsigning           Yes\ndefault                 {default}\ndisplayorder            {default}\ntoolsdisplayorder       {memdiag}\ntimeout                 30\n\nWindows Boot Loader\n-------------------\nidentifier              {default}\ndevice                  ramdisk=[boot]\\sources\\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}\npath                    \\windows\\system32\\boot\\winload.efi\ndescription             Windows Setup\nlocale                  en-US\ninherit                 {bootloadersettings}\nisolatedcontext         Yes\nosdevice                ramdisk=[boot]\\sources\\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}\nsystemroot              \\windows\n<em><strong><u>bootmenupolicy          Legacy<\/u><\/strong><\/em>\ndetecthal               Yes\nwinpe                   Yes\nems                     No\n\nWindows Memory Tester\n---------------------\nidentifier              {memdiag}\ndevice                  boot\npath                    \\efi\\microsoft\\boot\\memtest.efi\ndescription             Windows Memory Diagnostic\nlocale                  en-US\ninherit                 {globalsettings}\n\nEMS Settings\n------------\nidentifier              {emssettings}\nbootems                 No\n\nDebugger Settings\n-----------------\nidentifier              {dbgsettings}\ndebugtype               Serial\ndebugport               1\nbaudrate                115200\n\nGlobal Settings\n---------------\nidentifier              {globalsettings}\ninherit                 {dbgsettings}\n                        {emssettings}\n\nBoot Loader Settings\n--------------------\nidentifier              {bootloadersettings}\ninherit                 {globalsettings}\n                        {hypervisorsettings}\n\nHypervisor Settings\n-------------------\nidentifier              {hypervisorsettings}\ndescription             Hypervisor Settings\nhypervisordebugtype     Serial\nhypervisordebugport     1\nhypervisorbaudrate      115200\n\nDevice options\n--------------\nidentifier              {7619dcc8-fafe-11d9-b411-000476eba25f}\nramdisksdidevice        boot\n<em><strong><u>ramdisksdipath          \\Boot\\boot.sdi<\/u>\n<\/strong><\/em><\/pre>\n<\/li>\n<\/ul>\n<h2>3. Upload required files to TFTP server (For linux servers, capitalization <strong>DOES<\/strong> matter)<\/h2>\n<ul>\n<li>%PEFOLDER%\\amd64\\Media\\EFI\\Boot\\bootx64.efi to %TFTPROOT%\\bootx64.efi<\/li>\n<li>%PEFOLDER%\\amd64\\Media\\Boot\\boot.sdi to %TFTPROOT%\\<strong><u>B<\/u><\/strong>oot\\boot.sdi<\/li>\n<li>%PEFOLDER%\\amd64\\en-us\\winpe.wim to %TFTPROOT%\\<strong><u>s<\/u><\/strong>ources\\boot.wim<br>Or customized windows 11 based .wim file can be used, depending on the purposes<\/li>\n<li>patched BCD to %TFTPROOT%\\<strong><u>B<\/u><\/strong>oot\\<strong><u>BCD<\/u><\/strong><\/li>\n<\/ul>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-426 size-full\" src=\"https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/01TREE.png\" alt=\"\" width=\"684\" height=\"513\" srcset=\"https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/01TREE.png 684w, https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/01TREE-300x225.png 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/strong><br><strong>PXE would fail if TFTP directory and file structures are not properly set (e.g. capitalization mismatch on linux server)<\/strong><\/p>\n<h2>4. Verify with hyper V<\/h2>\n\n\n<figure class=\"wp-block-video\"><video height=\"768\" style=\"aspect-ratio: 1024 \/ 768;\" width=\"1024\" controls src=\"https:\/\/3735943886.com\/wp-content\/uploads\/2022\/11\/final.mp4\"><\/video><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>1. Download Windows PE add-on for the Windows ADK for Windows 11, version 22H2 and install. In this example, Windows ADK Folder (default, C:\\Program Files (x86)\\Windows Kits\\10\\Assessment and Deployment Kit\\Windows Preinstallation Environment) is %PEFOLDER% and the TFTP Server Root is %TFTPROOT% 2. Patch BCD in %PEFOLDER%\\amd64\\Media\\EFI\\Microsoft\\Boot\\ Change the path of Boot Manager to our file, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/3735943886.com\/?p=413\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PXE Windows PE under UEFI and Secure Boot Enabled&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,40,10],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-network","category-os","category-security"],"_links":{"self":[{"href":"https:\/\/3735943886.com\/index.php?rest_route=\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/3735943886.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3735943886.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3735943886.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/3735943886.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=413"}],"version-history":[{"count":26,"href":"https:\/\/3735943886.com\/index.php?rest_route=\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":451,"href":"https:\/\/3735943886.com\/index.php?rest_route=\/wp\/v2\/posts\/413\/revisions\/451"}],"wp:attachment":[{"href":"https:\/\/3735943886.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3735943886.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3735943886.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}