wiki:sandbox
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:sandbox [2015-07-11 10:13] – 178.9.250.102 | wiki:sandbox [2016-01-22 19:19] (current) – removed Aleksandr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
- | |||
- | ====== wimboot ====== | ||
- | |||
- | '' | ||
- | |||
- | You can use '' | ||
- | |||
- | ===== Advantages ===== | ||
- | |||
- | {{ : | ||
- | |||
- | == Speed == | ||
- | |||
- | '' | ||
- | |||
- | == Efficiency == | ||
- | |||
- | '' | ||
- | |||
- | == Ease of use == | ||
- | |||
- | '' | ||
- | |||
- | == BIOS/UEFI compatibility == | ||
- | |||
- | '' | ||
- | |||
- | ===== Download ===== | ||
- | |||
- | You can download the latest version from [[http:// | ||
- | |||
- | Older versions are available from [[http:// | ||
- | |||
- | ===== Getting started ===== | ||
- | |||
- | If you have a Windows installation DVD-ROM (Vista, Server 2008, or more recent), and a web server (such as Apache or IIS), then you have everything you need to start using '' | ||
- | |||
- | ==== Extract the Windows boot files ==== | ||
- | |||
- | {{ : | ||
- | |||
- | Copy the contents of the Windows installation DVD-ROM to a directory on your web server (e.g. ''/ | ||
- | |||
- | 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: | ||
- | |||
- | /boot/bcd | ||
- | / | ||
- | / | ||
- | |||
- | ==== Download wimboot ==== | ||
- | |||
- | Download the [[http:// | ||
- | |||
- | ==== Create the iPXE script ==== | ||
- | |||
- | Create a text file '' | ||
- | |||
- | #!ipxe | ||
- | | ||
- | kernel wimboot | ||
- | initrd boot/ | ||
- | initrd boot/ | ||
- | initrd sources/ | ||
- | boot | ||
- | |||
- | ==== Boot ==== | ||
- | |||
- | Boot using [[: | ||
- | |||
- | {{ : | ||
- | |||
- | {{ : | ||
- | |||
- | ==== Next steps ==== | ||
- | |||
- | You can use '' | ||
- | |||
- | ===== Licence ===== | ||
- | |||
- | '' | ||
- | |||
- | {{ : | ||
- | |||
- | ===== Advanced topics ===== | ||
- | |||
- | {{ : | ||
- | |||
- | ==== Multi-image WIM files ==== | ||
- | |||
- | A WIM file can contain multiple bootable images. | ||
- | |||
- | kernel wimboot index=2 | ||
- | |||
- | ==== Custom boot manager ==== | ||
- | |||
- | '' | ||
- | |||
- | You can disable this behaviour by explicitly providing an appropriate set of boot manager binaries. | ||
- | |||
- | kernel wimboot | ||
- | initrd bootmgr | ||
- | initrd efi/ | ||
- | |||
- | ==== Disabling automatic BCD modifications ==== | ||
- | |||
- | '' | ||
- | |||
- | You can disable this behaviour by using the '' | ||
- | |||
- | kernel wimboot rawbcd | ||
- | |||
- | ==== Displaying graphical boot messages ==== | ||
- | |||
- | '' | ||
- | |||
- | You can disable this behaviour by using the '' | ||
- | |||
- | kernel wimboot gui | ||
- | initrd boot/ | ||
- | initrd boot/ | ||
- | initrd boot/ | ||
- | initrd boot/ | ||
- | |||
- | ===== How wimboot works ===== | ||
- | |||
- | When '' | ||
- | |||
- | ==== Command line processing ==== | ||
- | |||
- | When '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | ==== CPIO archive extraction ==== | ||
- | |||
- | Much like the Linux kernel, '' | ||
- | |||
- | imgfetch --name < | ||
- | |||
- | This will fetch the file given by ''< | ||
- | |||
- | **NOTE:** The virtual filename ''< | ||
- | |||
- | ==== The wimboot virtual filesystem ==== | ||
- | |||
- | The files from the CPIO archive are made available in a virtual filesystem provided up by '' | ||
- | |||
- | imgfetch --name BCD http:// | ||
- | imgfetch --name boot.sdi http:// | ||
- | imgfetch --name boot.wim http:// | ||
- | |||
- | This fetches the three files, which will all -- when '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | So for any given file, say '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | In practice, this enables '' | ||
- | |||
- | Once it's set up, the virtual filesystem is then mapped to a disk drive so that '' | ||
- | |||
- | **NOTE:** The BCD file name must be simply '' | ||
- | |||
- | **NOTE:** The '' | ||
- | |||
- | ==== Extracting bootmgr.exe ==== | ||
- | |||
- | As '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | **NOTE:** The ability to extract '' | ||
- | |||
- | **NOTE:** If no '' | ||
- | |||
- | ==== Running bootmgr.exe ==== | ||
- | |||
- | At the final stage of '' | ||
- | |||
- | ==== EFI platform differences ==== | ||
- | |||
- | On EFI platforms, a few details are changed: | ||
- | * '' | ||
- | * '' | ||
- | |||
- | ===== How bootmgr.exe works ===== | ||
- | |||
- | When '' | ||
- | |||
- | Refer to the Microsoft // | ||
- | |||
- | ==== Reading the BCD file ==== | ||
- | |||
- | '' | ||
- | to read the BCD ([[http:// | ||
- | |||
- | The BCD file can come from a variety of sources, or it can be created from scratch or modified using the '' | ||
- | |||
- | Refer to the Microsoft // | ||
- | |||
- | ==== Reading additional files ==== | ||
- | |||
- | Once the BCD is read, '' | ||
- | |||
- | **NOTE:** The SDI image is typically always provided by various Windows versions and deployment tools as '' | ||
- | |||
- | **NOTE:** The WIM image is the main image, either extracted from the Windows installation medium, or containing custom content created by the user or some automated image creation/ | ||
- | |||
- | ==== Mounting the ramdisk ==== | ||
- | |||
- | Once the relevant files are read from the virtual filesystem, '' | ||
- | |||
- | ==== Executing winload.exe ==== | ||
- | |||
- | With the SDI+WIM ramdisk mounted and ready, '' | ||
- | |||
- | ===== Troubleshooting ===== | ||
- | |||
- | Several things can go wrong in the boot process, and the '' | ||
- | |||
- | * [[device1: | ||
- | * [[device2: | ||
- | ==== Example errors ==== | ||
- | |||
- | Some common error messages are listed below: | ||
- | |||
- | * When '' | ||
- | |||
- | File: \Boot\BCD | ||
- | Status: 0xc000000f | ||
- | Info: An error occurred while attempting to read the boot configuration data. | ||
- | |||
- | * When '' | ||
- | |||
- | Status: 0xc000000f | ||
- | Info: The boot selection failed because a required device is inaccessible. | ||
- | |||
- | * When '' | ||
- | |||
- | Status: 0xc000000f | ||
- | Info: A required device isn't connected or can't be accessed. | ||
- | |||
- | ==== Finding the culprit ==== | ||
- | |||
- | The usual culprit is incorrect data in the BCD file, which causes '' | ||
- | |||
- | * referring to the wrong file name; or | ||
- | * referring to files outside the directories provided by the '' | ||
- | |||
- | By following the '' | ||
- | - Make sure to use the latest '' | ||
- | - Ensure that the '' | ||
- | * Use the '' | ||
- | - Use the '' | ||
- | |||
- | imgexec wimboot pause | ||
- | |||
- | Below is an example output of '' | ||
- | |||
- | test.bcd : 12288 bytes " | ||
- | boot.sdi : 3170304 bytes " | ||
- | install.wim : 404876823 bytes " | ||
- | wimboot : 34576 bytes [bzImage] [SELECTED] " | ||
- | |||
- | An example output of the '' | ||
- | |||
- | wimboot v2.4.1 -- Windows Imaging Format bootloader -- http:// | ||
- | | ||
- | Command line: " | ||
- | Using BCD via 0x67925074 len 0x3000 | ||
- | Using boot.sdi via 0x67929078 len 0x306000 | ||
- | Using boot.wim via 0x67c30078 len 0x1821ee17 | ||
- | ...found WIM file boot.wim | ||
- | ...found file " | ||
- | Using bootmgr.exe via 0x2bc18 len 0x7fd80 | ||
- | ...extracted bootmgr.exe | ||
- | Emulating drive 0x81 | ||
- | Entering bootmgr.exe with parameters at 0x2a520 | ||
- | |||
- | As for '' | ||
- | |||
- | ==== BCD contents ==== | ||
- | |||
- | Ensure that the BCD file contains valid configuration. To do this, you need to examine it with the Windows-only '' | ||
- | |||
- | Here's an example, using '' | ||
- | |||
- | > bcdedit /enum all /store test.bcd | ||
- | | ||
- | Windows Boot Manager | ||
- | -------------------- | ||
- | identifier | ||
- | description | ||
- | displayorder | ||
- | timeout | ||
- | | ||
- | Windows Boot Loader | ||
- | ------------------- | ||
- | identifier | ||
- | device | ||
- | description | ||
- | osdevice | ||
- | systemroot | ||
- | detecthal | ||
- | winpe Yes | ||
- | | ||
- | Setup Ramdisk Options | ||
- | --------------------- | ||
- | identifier | ||
- | description | ||
- | ramdisksdidevice | ||
- | ramdisksdipath | ||
- | |||
- | You might find that the BCD file contains references to files that have paths that will not ever match '' | ||
- | |||
- | Here's an example of creating a BCD file from scratch: | ||
- | |||
- | set BCDSTORE=BCD | ||
- | bcdedit / | ||
- | bcdedit /store %BCDSTORE% /create {ramdiskoptions} /d " | ||
- | bcdedit /store %BCDSTORE% /set {ramdiskoptions} ramdisksdidevice Boot | ||
- | bcdedit /store %BCDSTORE% /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi | ||
- | for /f " | ||
- | bcdedit /store %BCDSTORE% /set %GUID% systemroot \Windows | ||
- | bcdedit /store %BCDSTORE% /set %GUID% detecthal Yes | ||
- | bcdedit /store %BCDSTORE% /set %GUID% winpe Yes | ||
- | bcdedit /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\Boot\boot.wim, | ||
- | bcdedit /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\Boot\boot.wim, | ||
- | bcdedit /store %BCDSTORE% /create {bootmgr} /d " | ||
- | bcdedit /store %BCDSTORE% /set {bootmgr} timeout 30 | ||
- | bcdedit /store %BCDSTORE% /set {bootmgr} displayorder %GUID% | ||
- | bcdedit /enum all /store %BCDSTORE% | ||
- | |||
- | The BCD is a complex beast with lots of options, which makes it hard to know which details are required for the specific type of boot (ADK, AIK, WDS, etc). Refer to the iPXE [[: | ||
- | |||
- | ==== WIM image contents ==== | ||
- | |||
- | Should you need to verify the contents of the WIM image without access to Windows, use the example application '' | ||
wiki/sandbox.1436602425.txt.gz · Last modified: 2015-07-11 10:13 by 178.9.250.102