1 .TH MKWINPEIMG "1" "August 2014" "mkwinpeimg (wimlib @VERSION@)" "User Commands"
3 mkwinpeimg \- Make a customized bootable image of Windows PE
6 [\fIOPTIONS\fR] \fIIMAGE\fR
8 \fBmkwinpeimg\fR is able to make a bootable image of Windows PE by taking files
9 from a mounted Windows DVD (Windows Vista, Windows 7 or Windows 8) or the
10 mounted ISO image for the Windows Automated Installation Kit (WAIK) or the WAIK
12 \fB--windows-dir\fR and \fB--waik-dir\fR options are used to specify the
13 locations of these mounted ISOs. You only need one or the other. The files
14 that \fBmkwinpeimg\fR will retrieve are \fIboot.wim\fR, \fIbootmgr\fR,
15 \fIboot.sdi\fR, and \fIbcd\fR. If making an ISO image, the file
16 \fIetfsboot.com\fR is also retrieved. Microsoft owns the rights to these files
17 and they are not distributed with wimlib.
19 \fBmkwinpeimg\fR can currently make two types of bootable images. The default
20 is to make a bootable disk image. The image is not partitioned and is formatted
21 into a FAT filesystem. \fBsyslinux\fR(1) is required to make this type of
22 image, as it is used to chainload \fIbootmgr\fR. Also, \fBmtools\fR(1) is
23 required so that the FAT filesystem can be created without root privileges.
25 The other type of bootable image that \fBmkwinpeimg\fR can make is a bootable
26 ISO image. To make this type of image, give the \fB--iso\fR option.
27 \fBmkisofs\fR(1) is required to make this type of image. In \fB--iso\fR mode,
28 you can specify \fIIMAGE\fR as "-" to write the ISO image to standard output.
30 If you make a disk image, you could put it on a USB drive, and if you make an
31 ISO image, you could put it on a CD. In addition, both types of images can be
32 loaded by the SYSLINUX or PXELINUX bootloaders using the MEMDISK module.
34 Windows PE itself is contained in the \fIboot.wim\fR file. \fBmkwinpeimg\fR can
35 modify this file before embedding it in a bootable image. The most useful
36 modification is to specify an executable or batch file for Windows PE to execute
37 as soon as it starts up. Use the \fB--start-script\fR \fIFILE\fR option to
38 specify such a file. You may also add arbitrary files to \fIboot.wim\fR by
39 putting them in a directory, then specifying the \fB--overlay\fR \fIDIR\fR
40 option. However, for more extensive modifications, consider modifying the
41 \fIboot.wim\fR file separately using \fB@IMAGEX_PROGNAME@ mountrw\fR or
42 \fB@IMAGEX_PROGNAME@ update\fR, then providing it to \fBmkwinpeimg\fR using the
45 \fBmkwinpeimg\fR can also make only a modified \fIboot.wim\fR, rather than a
46 bootable ISO or disk image, if the \fB--only-wim\fR option is given.
48 The Windows PE WIMs provided in Windows 7, Windows 8, and the WAIK are not the
49 same, but are all similar. The best one to use is likely the one from the WAIK,
50 as that one is the smallest.
53 \fB\-i\fR, \fB\-\-iso\fR
54 Make an ISO image instead of a disk image.
56 \fB\-o\fR, \fB\-\-only-wim\fR
57 Make neither a disk image nor an ISO image; instead, only make a modified
60 \fB\-W\fR, \fB\-\-windows\-dir\fR=\fIDIR\fR
61 Use DIR as the location of the mounted Windows 7 or Windows 8 DVD. Default is
62 /mnt/windows, then /mnt/windows7, then /mnt/windows8.
64 \fB\-A\fR, \fB\-\-waik\-dir\fR=\fIDIR\fR
65 Get the boot files and boot.wim from the ISO of the Windows Automated
66 Installation Kit mounted on DIR instead of from the Windows 7 or Windows 8 DVD.
67 This also works if the mounted ISO is for the WAIK supplement rather than the
70 \fB\-s\fR, \fB\-\-start\-script\fR=\fIFILE\fR
71 Add FILE to the root directory of Windows PE image and adjust
72 \eWindows\eSystem32\ewinpeshl.ini to execute FILE when Windows PE starts up.
74 \fB\-w\fR, \fB\-\-wim\fR=\fIWIM\fR
75 Use WIM as the "boot.wim" file. This defaults to the appropriate WIM file from
76 the Windows DVD, WAIK, or WAIK supplement.
78 \fB\-O\fR, \fB\-\-overlay\fR=\fIDIR\fR
79 Adds all the files in DIR to the Windows PE image.
81 \fB\-t\fR, \fB\-\-tmp\-dir\fR=\fIDIR\fR
82 Use DIR for temporary files. Defaults to a directory made using "mktemp -d".
84 \fB\-a\fR, \fB\-\-arch\fR=\fIARCH\fR
85 Use the Windows PE version from the Windows Automated Installation Kit (or the
86 WAIK supplement) that has the CPU architecture \fIARCH\fR. Only valid with
87 \fB\-\-waik\-dir\fR. Possible values: "x86" or "amd64". Default is "x86".
88 Note: the WAIK also contains a Windows PE image for the ia64 (Itanium)
89 architecture; however, this is not supported by this script.
91 \fB\-h\fR, \fB\-\-help\fR
94 \fB\-v\fR, \fB\-\-version\fR
95 Show version information.
97 Create a bootable disk image of Windows PE from the Windows Vista, 7, or 8
98 installation media mounted on /media/windows:
101 mkwinpeimg --windows-dir=/media/windows winpe.img
104 Create a bootable ISO of Windows PE from the WAIK (or WAIK supplement) mounted
105 on /media/waik, and add all the files in "winpe_overlay" to Windows PE's
109 mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
112 Create a bootable image of Windows PE from the Windows installation media
113 mounted on /media/windows, add and make it execute "install.cmd" when it starts
114 up. In this example the image is created in the root directory of the TFTP
115 server for network booting.
118 mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows /var/tftpboot/winpe.img
122 Microsoft's licenses may limit the things that Windows PE can be used for, and
123 they may limit your rights to redistribute customized versions of Windows PE.
125 Report bugs to ebiggers3@gmail.com.
127 .BR @IMAGEX_PROGNAME@ (1)