{"id":791,"date":"2014-01-12T21:49:11","date_gmt":"2014-01-12T20:49:11","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=791"},"modified":"2019-05-14T20:17:22","modified_gmt":"2019-05-14T18:17:22","slug":"boot-winpe-over-pxe-on-a-uefi-computer","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=791","title":{"rendered":"Boot WINPE over PXE on a UEFI computer"},"content":{"rendered":"<p>Here below some drafts notes on how to boot WINPE on a UEFI computers.<\/p>\n<p><strong>1\/Files you need from\u00a0your windows x64 dvd<\/strong><\/p>\n<p>-\\efi\\boot\\bootx64.efi file (1)<br \/>\n-\\efi\\boot\\bcd file (2)<br \/>\n-\\efi\\boot\\boot.sdi file (3)<br \/>\n-\\efi\\microsoft\\boot\\fonts folder (4)<br \/>\n-\\sources\\boot.wim (5)<\/p>\n<p>If you dont find bootx64.efi, you can use bootmgfw.efi which is in install.wim on your dvd (sources folder).<br \/>\nUse 7zip to extract this file from the wim file and rename it to bootx64.efi<\/p>\n<p><strong>2\/Files you need in your tftp root<\/strong><\/p>\n<p>-get in your tftp root<br \/>\nput bootx64.efi (from 1)<br \/>\n-create a SOURCES folder<br \/>\nput boot.wim in there (from 5)<br \/>\n-create a BOOT folder<br \/>\nput boot.sdi in there (from 3)<br \/>\nput bcd in there (from 2) \/ applies <strong>for Win8<\/strong><br \/>\n-create a EFI\/MICROSOFT\/BOOT folder<br \/>\nput bcd in there (from 2) \/ applies <strong>for Win7<\/strong><br \/>\nput the FONT folder in there (from 4)<\/p>\n<p>You should end up with the following :<br \/>\n=&gt;ROOT<br \/>\n-bootx64.efi<br \/>\n==&gt;SOURCES<br \/>\n==boot.wim<br \/>\n==&gt;BOOT<br \/>\n==boot.sdi<br \/>\n==bcd (<strong>for win8<\/strong>)<br \/>\n==&gt;EFI\/MICROSOFT\/BOOT<br \/>\n==bcd (<strong>for win7<\/strong>)<br \/>\n===&gt;FONTS<br \/>\n===*.ttf<\/p>\n<p><strong>3\/Things you need to do on your boot.wim<\/strong><\/p>\n<p>Add the following winpeshl.ini (create it with notepad) file in your boot.wim (system32), making it a \u00ab\u00a0cheap\u00a0\u00bb winpe.<\/p>\n<p>To modify your boot.wim, you can either mount\/change\/commit it with <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/jj980032(v=winembedded.81).aspx\" target=\"_blank\" rel=\"noopener\">DISM <\/a>(from the command line), or with <a href=\"https:\/\/labalec.fr\/erwan\/?page_id=42\" target=\"_blank\" rel=\"noopener\">CloneDisk <\/a> or else modify it with <a href=\"http:\/\/reboot.pro\/topic\/18345-wimlib-with-imagex-implementation\/\" target=\"_blank\" rel=\"noopener\">wimlib<\/a> :<br \/>\n<code>wimlib-imagex update boot.wim 1 --command=\"add CustomWinpeshl.ini \\Windows\\System32\\winpeshl.ini\"<\/code><\/p>\n<p><code><br \/>\n[LaunchApps]<br \/>\n%SYSTEMDRIVE%\\Windows\\system32\\startnet.cmd<br \/>\n%SYSTEMDRIVE%\\windows\\system32\\cmd.exe<br \/>\n<\/code><\/p>\n<p><strong>4\/Things you need to do in your PXE Server : <\/strong><\/p>\n<p>Set bootx64.efi as the bootp filename.<\/p>\n<p>The UEFI + PXE boot process will be the following :<br \/>\n&#8211;<strong>pxe-&gt;bootx64.efi (from windows install dvd)-&gt;bcd (pointing to winload.efi)-&gt;boot.wim (x64 only)<\/strong><\/p>\n<p>as opposed to a legacy bios computer :<br \/>\n&#8211;<strong>pxe-&gt;pxeboot.n12 (from windows install dvd)-&gt; bootmgr.exe -&gt; bcd (pointing to winload.exe) -&gt; boot.wim<\/strong><\/p>\n<p>Site note : you can use option dhcp 252 to decide which BCD file to load.<br \/>\nCan be handy when you want to switch from a UEFI computer to a legacy BIOS computer : efi\\microsoft\\boot or boot\\bcd<\/p>\n<p><a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/01\/tps_howto_uefi.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-942\" src=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/01\/tps_howto_uefi-283x300.png\" alt=\"tps_howto_uefi\" width=\"283\" height=\"300\" srcset=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/01\/tps_howto_uefi-283x300.png 283w, https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/01\/tps_howto_uefi-24x24.png 24w, https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/01\/tps_howto_uefi.png 520w\" sizes=\"auto, (max-width: 283px) 100vw, 283px\" \/><\/a><\/p>\n<p>side note : you can check if you booted on uefi with the following <code>reg query HKLM\\System\\CurrentControlSet\\Control \/v PEFirmwareType<\/code> Will output 0x1 for bios, 0x2 for uefi.<\/p>\n<p>Cheers,<br \/>\nErwan<\/p>\n<p>Note that\u00a0the following would aso work :\u00a0<strong><span style=\"color: #444444;\">P<\/span><\/strong><span style=\"color: #444444;\"><strong>XE-&gt;\u00a0IPXE.efi -&gt;MS\u00a0<span class=\"searchlite\">Bootx64.efi<\/span>\u00a0-&gt;BCD (winload.efi) -&gt;Boot.wim (x64)<\/strong>.<\/span><\/p>\n<p>Ipxe script<br \/>\n<code><br \/>\n#!ipxe<br \/>\n#change with you dhcp or proxydhcp server<br \/>\nset next-server 192.168.1.11<br \/>\nset filename boot\/x64\/bootmgfw.efi<br \/>\nchain tftp:\/\/${next-server}\/${filename}<br \/>\n<\/code><\/p>\n<p>And changes to apply to your BCD : <code>bcdedit.exe \/store my.bcd \/set {bootmgr} nointegritychecks yes<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here below some drafts notes on how to boot WINPE on a UEFI computers. 1\/Files you need from\u00a0your windows x64 dvd -\\efi\\boot\\bootx64.efi file (1) -\\efi\\boot\\bcd file (2) -\\efi\\boot\\boot.sdi file (3) -\\efi\\microsoft\\boot\\fonts folder (4) -\\sources\\boot.wim (5) If you dont find bootx64.efi, you can use bootmgfw.efi which is in install.wim on your dvd (sources folder). Use 7zip <a href='https:\/\/labalec.fr\/erwan\/?p=791' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,28,21],"tags":[94],"class_list":["post-791","post","type-post","status-publish","format-standard","hentry","category-boot","category-tinypxe-server","category-winpe","tag-efi","category-16-id","category-28-id","category-21-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=791"}],"version-history":[{"count":38,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions"}],"predecessor-version":[{"id":2142,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions\/2142"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}