{"id":1015,"date":"2022-09-04T16:42:54","date_gmt":"2022-09-04T08:42:54","guid":{"rendered":"https:\/\/benson.ml\/?p=1015"},"modified":"2022-09-05T10:15:16","modified_gmt":"2022-09-05T02:15:16","slug":"tiny-pxe-server%e6%97%a0%e7%9b%98%e7%bd%91%e5%90%af%e8%bf%9c%e7%a8%8b%e5%ae%89%e8%a3%85%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/benson80.eu.org\/?p=1015","title":{"rendered":"Tiny PXE Server\u65e0\u76d8\u7f51\u542f\u8fdc\u7a0b\u5b89\u88c5\u7cfb\u7edf"},"content":{"rendered":"\n<p>\u68c0\u6d4bTFTP\u670d\u52a1\u542f\u52a8\u662f\u5426\u6210\u529f\uff0c\u5728\u547d\u4ee4\u884c\u4e0b\u8fd0\u884c\uff0c\u53ef\u4ee5\u770b\u5230UDP:69\u7aef\u53e3\u5728\u4fa6\u542c\uff1a<br>netstat -an | find &#8220;69&#8221;<br>UDP 192.168.3.217:69 <em>:<\/em><\/p>\n\n\n\n<p>\u521b\u5efa\u76ee\u5f55\uff1a<br>cd pxesrv\\files<br>mkdir win10\\boot,win10\\sources,win11\\boot,win11\\sources<\/p>\n\n\n\n<p>\u62f7\u8d1d\u6216\u89e3\u538bWindows\u7684\u542f\u52a8\u5185\u6838\u6587\u4ef6\u548c\u5b89\u88c5\u5305\uff0cI\u4e3a\u5149\u76d8\u9a71\u52a8\u7b26\u53f7\uff1a<\/p>\n\n\n\n<p><strong>Windows10\u5185\u6838\u53cawim\u5b89\u88c5\u5305\uff0c\u52a0\u8f7dWin10\u7684ISO\u5230I\u76d8<\/strong><\/p>\n\n\n\n<p>copy I:\\boot\\bcd E:\\pxesrv\\files\\win10\\boot\\<br>copy I:\\boot\\boot.sdi E:\\pxesrv\\files\\win10\\boot\\<br>copy I:\\sources\\boot.wim E:\\pxesrv\\files\\win10\\sources\\<\/p>\n\n\n\n<p>copy I:\\boot\\bcd E:\\pxesrv\\files\\win11\\boot\\<br>copy I:\\boot\\boot.sdi E:\\pxesrv\\files\\win11\\boot\\<br>copy I:\\sources\\boot.wim E:\\pxesrv\\files\\win11\\sources\\<\/p>\n\n\n\n<p>\u96f7\u7535PE\u5b58\u653e\u4f4d\u7f6e\uff1a<br>copy I:\\bootmgr E:\\pxesrv\\files\\boot\\<br>copy I:\\bootmgr.efi E:\\pxesrv\\files\\boot\\<br>copy I:\\efi\\boot\\bootx64.efi E:\\pxesrv\\files\\boot\\<br>copy I:\\boot\\bcd E:\\pxesrv\\files\\boot\\<br>copy I:\\boot\\boot.sdi E:\\pxesrv\\files\\boot\\<br>copy I:\\sources\\boot.wim E:\\pxesrv\\files\\boot\\<\/p>\n\n\n\n<p>\u590d\u5236ISO\u5149\u76d8\u955c\u50cf\u6587\u4ef6\u5230\u6307\u5b9a\u8def\u5f84\uff0cimages\u5b58\u653eISO\u6587\u4ef6\uff1a<br>copy winpe.iso\u6216\u8005PE64.wim pxesrv\\files\\images<\/p>\n\n\n\n<p>\u67e5\u4e0b\u7ed3\u679c\uff1a<br>tree \/f pxesrv\\files\\win10<br>tree \/f pxesrv\\files\\win11<br>tree \/f pxesrv\\files\\images<\/p>\n\n\n\n<p>boot-url http:\/\/192.168.3.217<br>set boot-url http:\/\/${next-server}<\/p>\n\n\n\n<p>:WinPE<br>kernel ${boot-url}\/wimboot<br>initrd ${boot-url}\/BOOTMGR BOOTMGR<br>initrd ${boot-url}\/bootmgr.efi bootmgr.efi<br>initrd ${boot-url}\/Bootx64.efi Bootx64.efi<br>initrd ${boot-url}\/boot\/BCD BCD<br>initrd ${boot-url}\/boot\/boot.sdi boot.sdi<br>initrd ${boot-url}\/boot\/boot.wim boot.wim<br>boot<br>goto start<\/p>\n\n\n\n<p>:winpe<br>sanboot &#8211;no-describe ${boot-url}\/images\/winpe.iso || goto failed<br>goto start<\/p>\n\n\n\n<p>kernel\uff1a\u8c03\u7528\u5185\u6838<\/p>\n\n\n\n<p>initrd\uff1a\u8c03\u7528img<\/p>\n\n\n\n<p>sanboot\uff1a\u8c03\u7528iso\u6587\u4ef6<\/p>\n\n\n\n<p>\u865a\u62df\u673a\u9009\u62e9BIOS\u542f\u52a8<\/p>\n\n\n\n<p>UEFI \u4f7f\u7528bootx64.efi \uff1bBIOS\u4f7f\u7528undionly.kpxe<\/p>\n\n\n\n<p>IP\u5730\u5740\u6c60\u586b\u5c11\u4e9b\uff0c\u6bd4\u598220<\/p>\n\n\n\n<p>console &#8211;picture http:\/\/${next-server}\/ipxe.png<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5982\u679c\u5728\u771f\u673a\u73af\u5883\u4e0b\u5b89\u88c5\uff0c\u5e94\u52fe\u9009DNSd\uff0c\u4e14\u53d6\u6d88ProxyDhcp\u52fe\u9009\uff0c\u5426\u5219\u65e0\u6cd5\u4e3a\u5ba2\u6237\u673a\u5206\u914dIP\u5730\u5740<\/p>\n\n\n\n<p>config.ini<br>root=files<br>filename=ipxe-x86_64.efi<br>httpd=1<br>proxydhcp=0<br>poolstart=192.168.0.66<br>poolsize=20<\/p>\n\n\n\n<p>\u9700\u8981\u5148\u5173\u95ed\u9632\u706b\u5899\uff0c\u542f\u52a8\u6587\u4ef6\u7528ipxe-x86_64.efi<\/p>\n\n\n\n<p>\u8fdb\u5165 Windows 10\u621611 \u5b89\u88c5\u76d8\u5185\u7f6e\u7684 PE \u754c\u9762\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65-&gt;\u4fee\u590d\u8ba1\u7b97\u673a-&gt;\u7591\u96be\u89e3\u7b54-&gt;\u547d\u4ee4\u63d0\u793a\u7b26<br>\u4e0a\u4e00\u6b65\u542f\u52a8\u7684 PE \u5e76\u672a\u542f\u7528\u7f51\u7edc\uff0c\u6545\u8fd8\u9700\u8981\u542f\u52a8\u7f51\u7edc\uff1a\u5728\u51fa\u73b0\u7684 \u547d\u4ee4\u63d0\u793a\u7b26 \u7a97\u53e3\u4e2d\u8f93\u5165 startnet \u5e76\u56de\u8f66\uff0c\u7b49\u5f85\u547d\u4ee4\u6267\u884c\u5b8c\u6bd5\u540e\uff0c\u518d\u8f93\u5165 ipconfig \u56de\u8f66\uff0c\u5df2\u7ecf\u83b7\u5f97IP\u5730\u5740\u3002<\/p>\n\n\n\n<p>\u5c06\u8fdc\u7a0b\u5171\u4eab\u4f5c\u4e3a\u672c\u5730\u9a71\u52a8\u5668<br>net use Z: \\192.168.3.170\\win10<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u68c0\u6d4bTFTP\u670d\u52a1\u542f\u52a8\u662f\u5426\u6210\u529f\uff0c\u5728\u547d\u4ee4\u884c\u4e0b\u8fd0\u884c\uff0c\u53ef\u4ee5 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1015","post","type-post","status-publish","format-standard","hentry","category-windows"],"_links":{"self":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1015"}],"version-history":[{"count":4,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1015\/revisions"}],"predecessor-version":[{"id":1020,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1015\/revisions\/1020"}],"wp:attachment":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}