2023-04-13 21:24:44 +00:00

536 lines
22 KiB
Plaintext

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
iPXE - open source boot firmware [wimboot]
</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="wimboot"/>
<link rel="search" type="application/opensearchdescription+xml" href="/lib/exe/opensearch.php" title="iPXE - open source boot firmware"/>
<link rel="start" href="/"/>
<link rel="contents" href="/wimboot?do=index" title="Sitemap"/>
<link rel="manifest" href="/lib/exe/manifest.php"/>
<link rel="alternate" type="application/rss+xml" title="Recent Changes" href="/feed.php"/>
<link rel="alternate" type="application/rss+xml" title="Current namespace" href="/feed.php?mode=list&amp;ns="/>
<link rel="alternate" type="text/html" title="Plain HTML" href="/_export/xhtml/wimboot"/>
<link rel="alternate" type="text/plain" title="Wiki Markup" href="/_export/raw/wimboot"/>
<link rel="canonical" href="https://ipxe.org/wimboot"/>
<link rel="stylesheet" type="text/css" href="/lib/exe/css.php?t=doogiestpl&amp;tseed=c353b386e7712527745f967265a28687"/>
<!--[if gte IE 9]><!-->
<script type="text/javascript">/*<![CDATA[*/var NS='';var JSINFO = {"id":"wimboot","namespace":"","ACT":"show","useHeadingNavigation":0,"useHeadingContent":0};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="/lib/exe/jquery.php?tseed=23f888679b4f1dc26eef34902aca964f"></script>
<script type="text/javascript" charset="utf-8" src="/lib/exe/js.php?t=doogiestpl&amp;tseed=c353b386e7712527745f967265a28687"></script>
<!--<![endif]-->
<link rel="shortcut icon" href="/lib/tpl/doogiestpl/images/favicon.ico" />
<link rel="apple-touch-icon" href="/lib/tpl/doogiestpl/images/apple-touch-icon.png" />
</head>
<body>
<div class="dokuwiki ">
<!-- login state -->
<div class="user">
</div>
<!-- breadcrumbs -->
<div class="clearer"></div>
<div class="stylehead">
<div class="header">
<div class="logo">
<a href="/start" name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]">iPXE - open source boot firmware</a> </div>
<div class="tools">
<div class="pagename">
<!-- mcb30 - removed backlinks and replaced with logo -->
<a href="/start" name="dokuwiki__logo" id="dokuwiki__logo"><img src="/_media/logos/ipxe-small.png" width="159" height="105" alt="iPXE logo" /></a> </div>
</div>
<div class="clearer"></div>
<div class="tabnav" id="tab__nav">
<ul>
<li class="level1"><div class="li"> <a href="/start" class="wikilink1" title="start">Home</a></div>
</li>
<li class="level1"><div class="li"> <span class="curid"><a href="/download" class="wikilink1" title="download">Download</a></span></div>
</li>
<li class="level1"><div class="li"> <a href="/pics" class="wikilink1" title="pics">Screenshots</a></div>
</li>
<li class="level1"><div class="li"> <a href="/docs" class="wikilink1" title="docs">Documentation</a></div>
</li>
<li class="level1"><div class="li"> <a href="/faq" class="wikilink1" title="faq">FAQ</a></div>
</li>
<li class="level1"><div class="li"> <a href="/contact" class="wikilink1" title="contact">Contact</a></div>
</li>
</ul>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="page">
<!-- ......... wikipage start ......... -->
<!-- TOC START -->
<div id="dw__toc" class="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>
<ul class="toc">
<li class="level1"><div class="li"><a href="#advantages">Advantages</a></div></li>
<li class="level1"><div class="li"><a href="#download">Download</a></div></li>
<li class="level1"><div class="li"><a href="#getting_started">Getting started</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#extract_the_windows_boot_files">Extract the Windows boot files</a></div></li>
<li class="level2"><div class="li"><a href="#download_wimboot">Download wimboot</a></div></li>
<li class="level2"><div class="li"><a href="#create_the_ipxe_script">Create the iPXE script</a></div></li>
<li class="level2"><div class="li"><a href="#boot">Boot</a></div></li>
<li class="level2"><div class="li"><a href="#next_steps">Next steps</a></div></li>
</ul>
</li>
<li class="level1"><div class="li"><a href="#licence">Licence</a></div></li>
<li class="level1"><div class="li"><a href="#sponsors">Sponsors</a></div></li>
<li class="level1"><div class="li"><a href="#advanced_topics">Advanced topics</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#multi-image_wim_files">Multi-image WIM files</a></div></li>
<li class="level2"><div class="li"><a href="#injected_files">Injected files</a></div></li>
<li class="level2"><div class="li"><a href="#custom_boot_manager">Custom boot manager</a></div></li>
<li class="level2"><div class="li"><a href="#disabling_automatic_bcd_modifications">Disabling automatic BCD modifications</a></div></li>
<li class="level2"><div class="li"><a href="#disabling_debug_messages">Disabling debug messages</a></div></li>
<li class="level2"><div class="li"><a href="#displaying_graphical_boot_messages">Displaying graphical boot messages</a></div></li>
<li class="level2"><div class="li"><a href="#disabling_paging">Disabling paging</a></div></li>
</ul>
</li>
<li class="level1"><div class="li"><a href="#internals">Internals</a></div></li>
<li class="level1"><div class="li"><a href="#troubleshooting">Troubleshooting</a></div></li>
</ul>
</div>
</div>
<!-- TOC END -->
<h1 id="wimboot">wimboot</h1>
<div class="level1">
<p>
<code>wimboot</code> is a boot loader for Windows Imaging Format (<code>.wim</code>) files. It enables you to boot into a <a href="https://en.wikipedia.org/wiki/Windows_Preinstallation_Environment" class="urlextern" title="https://en.wikipedia.org/wiki/Windows_Preinstallation_Environment">Windows PE (WinPE)</a> deployment or recovery environment.
</p>
<p>
You can use <code>wimboot</code> with <a href="/start" class="wikilink1" title="start">iPXE</a> to <a href="/howto/winpe" class="wikilink1" title="howto:winpe">boot Windows PE via HTTP</a>. With a Gigabit Ethernet network, a typical WinPE image should download in just a few seconds.
</p>
</div>
<h2 id="advantages">Advantages</h2>
<div class="level2">
<p>
<a href="/_detail/clipart/lightbulb.png?id=wimboot" class="media" title="clipart:lightbulb.png"><img src="/_media/clipart/lightbulb.png?w=180&amp;h=200&amp;tok=8cacff" class="mediaright" title="A light bulb" alt="A light bulb" width="180" height="200" /></a>
</p>
</div>
<h5 id="speed">Speed</h5>
<div class="level5">
<p>
<code>wimboot</code> can download images at the full speed supported by your network, since it can use <abbr title="Hyper Text Transfer Protocol">HTTP</abbr> rather than TFTP.
</p>
</div>
<h5 id="efficiency">Efficiency</h5>
<div class="level5">
<p>
<code>wimboot</code> allows Windows to reuse the memory that was used to hold the RAM disk image; there is no wasted memory.
</p>
</div>
<h5 id="ease_of_use">Ease of use</h5>
<div class="level5">
<p>
<code>wimboot</code> works directly with <code>.wim</code> image files; there is no need to wrap your <code>.wim</code> into an <abbr title="International Organization for Standardization">ISO</abbr> or FAT filesystem image.
</p>
</div>
<h5 id="biosuefi_compatibility">BIOS/UEFI compatibility</h5>
<div class="level5">
<p>
<code>wimboot</code> allows you to use a single configuration and set of files to boot under both BIOS and UEFI environments.
</p>
</div>
<h2 id="download">Download</h2>
<div class="level2">
<p>
You can download the latest version of the <code>wimboot</code> binary from <a href="https://github.com/ipxe/wimboot/releases/latest/download/wimboot" class="urlextern" title="https://github.com/ipxe/wimboot/releases/latest/download/wimboot">https://github.com/ipxe/wimboot/releases/latest/download/wimboot</a>. This is a hybrid binary that will work on both BIOS and 64-bit UEFI systems (including UEFI systems with Secure Boot enabled).
</p>
<p>
You can also download alternative binaries (e.g. for 32-bit UEFI systems) from <a href="https://github.com/ipxe/wimboot/releases/latest" class="urlextern" title="https://github.com/ipxe/wimboot/releases/latest">https://github.com/ipxe/wimboot/releases/latest</a>.
</p>
<p>
Older versions are available from <a href="https://github.com/ipxe/wimboot/releases" class="urlextern" title="https://github.com/ipxe/wimboot/releases">https://github.com/ipxe/wimboot/releases</a>.
</p>
<p>
The source code is maintained in a <code>git</code> repository at <a href="https://github.com/ipxe/wimboot" class="urlextern" title="https://github.com/ipxe/wimboot">https://github.com/ipxe/wimboot</a>.
</p>
</div>
<h2 id="getting_started">Getting started</h2>
<div class="level2">
<p>
If you have a Windows installation DVD-ROM (Vista, Server 2008, or more recent), and a web server (such as Apache or <abbr title="Internet Information Services">IIS</abbr>), then you have everything you need to start using <code>wimboot</code>.
</p>
</div>
<h3 id="extract_the_windows_boot_files">Extract the Windows boot files</h3>
<div class="level3">
<p>
<a href="/_detail/clipart/cdrom.jpeg?id=wimboot" class="media" title="clipart:cdrom.jpeg"><img src="/_media/clipart/cdrom.jpeg?w=150&amp;h=150&amp;tok=2b33e2" class="mediaright" title="A CD-ROM" alt="A CD-ROM" width="150" height="150" /></a>
</p>
<p>
Copy the contents of the Windows installation DVD-ROM to a directory on your web server (e.g. <code>/var/www/win7</code> for Apache, or <code>C:\inetpub\wwwroot\win7</code> for <abbr title="Internet Information Services">IIS</abbr>).
</p>
<p>
If you do not have enough disk space to copy the entire contents of the DVD-ROM, then you may copy only the following files:
</p>
<pre class="code"> /boot/bcd
/boot/boot.sdi
/sources/boot.wim</pre>
</div>
<h3 id="download_wimboot">Download wimboot</h3>
<div class="level3">
<p>
Download the <a href="https://github.com/ipxe/wimboot/releases/latest/download/wimboot" class="urlextern" title="https://github.com/ipxe/wimboot/releases/latest/download/wimboot">latest version of wimboot</a> and save it to the same directory on your web server.
</p>
</div>
<h3 id="create_the_ipxe_script">Create the iPXE script</h3>
<div class="level3">
<p>
Create a text file <code>boot.ipxe</code> in the same directory on your web server, containing:
</p>
<pre class="code"> #!ipxe
kernel wimboot
initrd boot/bcd BCD
initrd boot/boot.sdi boot.sdi
initrd sources/boot.wim boot.wim
boot</pre>
</div>
<h3 id="boot">Boot</h3>
<div class="level3">
<p>
Boot using <a href="/start" class="wikilink1" title="start">iPXE</a> from the <abbr title="Uniform Resource Locator">URL</abbr> of your iPXE script, e.g. <code>http://my.web.server/win7/boot.ipxe</code>. You should see iPXE download your Windows boot files via <abbr title="Hyper Text Transfer Protocol">HTTP</abbr> and boot into the Windows installer:
</p>
<p>
<a href="/_detail/screenshots/wimboot.png?id=wimboot" class="media" title="screenshots:wimboot.png"><img src="/_media/screenshots/wimboot.png?w=600&amp;h=334&amp;tok=484325" class="mediacenter" title="wimboot booting Windows 7" alt="wimboot booting Windows 7" width="600" height="334" /></a>
</p>
<p>
<a href="/_detail/screenshots/win7_installer.png?id=wimboot" class="media" title="screenshots:win7_installer.png"><img src="/_media/screenshots/win7_installer.png?w=600&amp;h=450&amp;tok=d70835" class="mediacenter" title="Windows 7 installer booted via wimboot" alt="Windows 7 installer booted via wimboot" width="600" height="450" /></a>
</p>
</div>
<h3 id="next_steps">Next steps</h3>
<div class="level3">
<p>
You can use <code>wimboot</code> to boot any bootable <code>.wim</code> image. See the <a href="/howto/winpe" class="wikilink1" title="howto:winpe">Windows PE tutorial</a> for information on how to create and customise your own <code>.wim</code> images.
</p>
</div>
<h2 id="licence">Licence</h2>
<div class="level2">
<p>
<code>wimboot</code> is free, open-source software licensed under the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html" class="urlextern" title="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU GPL</a>.
</p>
</div>
<h2 id="sponsors">Sponsors</h2>
<div class="level2">
<p>
Portions of the <code>wimboot</code> development have been sponsored by:
</p>
<p>
<a href="https://jumptrading.com" class="media" title="https://jumptrading.com"><img src="/_media/logos/jump.png?w=165&amp;h=37&amp;tok=b2c235" class="mediacenter" title="Jump Trading" alt="Jump Trading" width="165" height="37" /></a>
</p>
<p>
<a href="https://2pintsoftware.com" class="media" title="https://2pintsoftware.com"><img src="/_media/logos/2pint.png?w=106&amp;h=33&amp;tok=b919c8" class="mediacenter" title="2Pint Software" alt="2Pint Software" width="106" height="33" /></a>
</p>
<p>
<a href="https://digitalintelligence.com" class="media" title="https://digitalintelligence.com"><img src="/_media/logos/digitalintelligence.png?w=150&amp;h=28&amp;tok=42b260" class="mediacenter" title="Digital Intelligence" alt="Digital Intelligence" width="150" height="28" /></a>
</p>
</div>
<h2 id="advanced_topics">Advanced topics</h2>
<div class="level2">
<p>
<a href="/_detail/clipart/books.png?id=wimboot" class="media" title="clipart:books.png"><img src="/_media/clipart/books.png?w=180&amp;h=180&amp;tok=bcf6a6" class="mediaright" title="Some books" alt="Some books" width="180" height="180" /></a>
</p>
</div>
<h3 id="multi-image_wim_files">Multi-image WIM files</h3>
<div class="level3">
<p>
A WIM file can contain multiple bootable images. You can use the <code>index=&lt;N&gt;</code> command-line option to select the image to be booted. For example:
</p>
<pre class="code"> kernel wimboot index=2</pre>
</div>
<h3 id="injected_files">Injected files</h3>
<div class="level3">
<p>
You can provide additional files to <code>wimboot</code>. These files will appear within the <code>X:\Windows\System32</code> directory. For example:
</p>
<pre class="code"> kernel wimboot
initrd winpeshl.ini winpeshl.ini
initrd startup.bat startup.bat
initrd boot/bcd BCD
initrd boot/boot.sdi boot.sdi
initrd sources/boot.wim boot.wim
boot</pre>
<p>
You can use this to control the boot process after Windows PE has started. For example, you can use a <a href="/howto/winpe#adding_a_startup_batch_file" class="wikilink1" title="howto:winpe">startup batch file</a> to automatically start the Windows installer from a network share.
</p>
<p>
You can disable this behaviour by using the <code>rawwim</code> command-line option. For example:
</p>
<pre class="code"> kernel wimboot rawwim</pre>
</div>
<h3 id="custom_boot_manager">Custom boot manager</h3>
<div class="level3">
<p>
<code>wimboot</code> will attempt to extract an appropriate boot manager (such as <code>bootmgr</code>, <code>bootmgr.exe</code> or <code>bootmgfw.efi</code>) from the WIM file.
</p>
<p>
You can disable this behaviour by explicitly providing an appropriate set of boot manager binaries. For example:
</p>
<pre class="code"> kernel wimboot
initrd bootmgr bootmgr
initrd efi/boot/bootx64.efi bootx64.efi</pre>
</div>
<h3 id="disabling_automatic_bcd_modifications">Disabling automatic BCD modifications</h3>
<div class="level3">
<p>
<code>wimboot</code> will automatically patch standard BIOS-compatible boot configuration data (BCD) files to allow them to be used on UEFI systems, by changing all occurrences of the string “<code>.exe</code>” to “<code>.efi</code>”.
</p>
<p>
You can disable this behaviour by using the <code>rawbcd</code> command-line option. For example:
</p>
<pre class="code"> kernel wimboot rawbcd</pre>
</div>
<h3 id="disabling_debug_messages">Disabling debug messages</h3>
<div class="level3">
<p>
<code>wimboot</code> will display some debug messages by default, to assist in diagnosing problems that may occur during booting.
</p>
<p>
You can disable these debug messages by using the <code>quiet</code> command-line option. For example:
</p>
<pre class="code"> kernel wimboot quiet</pre>
</div>
<h3 id="displaying_graphical_boot_messages">Displaying graphical boot messages</h3>
<div class="level3">
<p>
<code>wimboot</code> will force the Windows boot manager to display error messages in text mode. It does this to work around a bug in some versions of the Windows boot manager, which would otherwise fail to display error messages unless suitable font files are provided.
</p>
<p>
You can disable this behaviour by using the <code>gui</code> command-line option and by providing all of the required font files. For example:
</p>
<pre class="code"> kernel wimboot gui
initrd boot/fonts/segmono_boot.ttf segmono_boot.ttf
initrd boot/fonts/segoe_slboot.ttf segoe_slboot.ttf
initrd boot/fonts/segoen_slboot.ttf segoen_slboot.ttf
initrd boot/fonts/wgl4_boot.ttf wgl4_boot.ttf</pre>
</div>
<h3 id="disabling_paging">Disabling paging</h3>
<div class="level3">
<p>
<code>wimboot</code> will automatically use paging to relocate the data files above 4GB if possible, to allow for the use of large <code>.wim</code> files on BIOS systems.
</p>
<p>
You can disable this behaviour by using the <code>linear</code> command-line option. For example:
</p>
<pre class="code"> kernel wimboot linear</pre>
</div>
<h2 id="internals">Internals</h2>
<div class="level2">
<p>
For more detailed information about the internal workings of wimboot, see the <a href="/appnote/wimboot_architecture" class="wikilink1" title="appnote:wimboot_architecture">wimboot architecture guide</a>.
</p>
</div>
<h2 id="troubleshooting">Troubleshooting</h2>
<div class="level2">
<p>
Try adding the commands <code><a href="/cmd/imgstat" class="wikilink1" title="cmd:imgstat">imgstat</a></code> and <code><a href="/cmd/prompt" class="wikilink1" title="cmd:prompt">prompt</a></code> to your iPXE script, to allow you to check that all of the files have loaded correctly. For example:
</p>
<pre class="code"> #!ipxe
kernel wimboot
initrd boot/bcd BCD
initrd boot/boot.sdi boot.sdi
initrd sources/boot.wim boot.wim
imgstat
prompt
boot</pre>
<p>
Check that only the expected files are present in the list. You may need to use the <code><a href="/cmd/imgfree" class="wikilink1" title="cmd:imgfree">imgfree</a></code> command to discard any unwanted files.
</p>
<p>
You can also try adding the <code>pause</code> command-line option for <code>wimboot</code>. For example:
</p>
<pre class="code"> kernel wimboot pause</pre>
<p>
This will instruct <code>wimboot</code> to wait for a keypress before booting Windows, to give you a further opportunity to observe any messages that may be displayed.
</p>
<p>
If you are unable to resolve your problem, then you can <a href="/contact" class="wikilink1" title="contact">contact</a> the iPXE developers and other iPXE users.
</p>
</div>
<!-- ......... wikipage stop ......... -->
</div>
<div class="clearer"></div>
<!-- footer -->
<div class="stylefoot">
<div class="bar" id="bar__bottom">
<!-- page metadata -->
<div class="meta">
<div class="doc">
<bdi>wimboot.txt</bdi> · Last modified: 2021/04/30 11:01 by <bdi>mcb30</bdi> </div>
</div>
<!-- page actions -->
<div class="bar-left" id="bar__bottomleft">
<form class="button btn_login" method="get" action="/wimboot"><div class="no"><input type="hidden" name="do" value="login" /><input type="hidden" name="sectok" value="" /><button type="submit" title="Log In">Log In</button></div></form> </div>
<!-- search form -->
<div class="bar-right" id="bar__bottomright">
<div class="searchbox">
<form action="/start" method="get" role="search" class="search doku_form" id="dw__search" accept-charset="utf-8"><input type="hidden" name="do" value="search" /><input type="hidden" name="id" value="wimboot" /><div class="no"><input name="q" type="text" class="edit" title="[F]" accesskey="f" placeholder="Search" autocomplete="on" id="qsearch__in" value="" /><button value="1" type="submit" title="Search">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form> </div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="footerinc">
<a href="/feed.php" title="Recent changes RSS feed"><img src="/lib/tpl/doogiestpl/images/button-rss.png" width="80" height="15" alt="Recent changes RSS feed" /></a>
<a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="license"><img src="/lib/images/license/button/cc-by-sa.png" alt="CC Attribution-Share Alike 4.0 International" /></a>
<a href="https://dokuwiki.org/" title="Driven by DokuWiki"><img src="/lib/tpl/doogiestpl/images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>
</div>
<!-- mcb30 - added CC attribution footer -->
<div class="dokuwiki">
<div class="meta">
<div class="doc">
All uses of this content must include an attribution to the iPXE
project and the URL https://ipxe.org
</div>
<div class="doc">
References to "iPXE" may not be altered or removed.
</div>
</div>
</div>
<div class="no">
<img src="/lib/exe/indexer.php?id=wimboot&amp;1681392702" width="2" height="1" alt="" /></div>
</body>
</html>