]> wimlib.net Git - wimlib/blob - doc/mkwinpeimg.1.in
select_wim_image(): Set WIMLIB_NO_IMAGE on failure
[wimlib] / doc / mkwinpeimg.1.in
1 .TH MKWINPEIMG "1" "February 2013" "mkwinpeimg (wimlib @VERSION@)" "User Commands"
2 .SH NAME
3 mkwinpeimg \- Make a customized bootable image of Windows PE
4 .SH SYNOPSIS
5 .B mkwinpeimg
6 [\fIOPTIONS\fR] \fIIMAGE\fR
7
8 .SH DESCRIPTION
9
10 \fBmkwinpeimg\fR is able to make a bootable image of Windows PE by taking files
11 from a mounted Windows DVD (Windows Vista, Windows 7 or Windows 8) or the
12 mounted ISO image for the Windows Automated Installation Kit (WAIK).  The
13 \fB--windows-dir\fR and \fB--waik-dir\fR options are used to specify the
14 locations of these mounted ISOs.  You only need one or the other.  The files
15 that \fBmkwinpeimg\fR will retrieve are \fIboot.wim\fR, \fIbootmgr\fR,
16 \fIboot.sdi\fR, and \fIbcd\fR.  If making an ISO image, the file
17 \fIetfsboot.com\fR is also retrieved.  Microsoft owns the rights to these files
18 and they are not distributed with wimlib.
19
20 \fBmkwinpeimg\fR can currently make two types of bootable images.  The default
21 is to make a bootable disk image.  The image is not partitioned and is formatted
22 into a FAT filesystem.  \fBsyslinux\fR(1) is required to make this type of
23 image, as it is used to chainload \fIbootmgr\fR. Also, \fBmtools\fR(1) is
24 required so that the FAT filesystem can be created without root privileges.
25
26 The other type of bootable image that \fBmkwinpeimg\fR can make is a bootable
27 ISO image.  To make this type of image, give the \fB--iso\fR option.
28 \fBmkisofs\fR(1) is required to make this type of image.
29
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.
33
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.
41
42 \fBmkwinpeimg\fR can also make only a modified \fIboot.wim\fR, rather than a
43 bootable ISO or disk image, if the \fB--only-wim\fR option is given.
44
45 The Windows PE WIMs provided in Windows 7, Windows 8, and the WAIK are not the
46 same, but are all similar.  The best one to use is likely the one from the WAIK,
47 as that one is the smallest.
48
49 .SH OPTIONS
50
51 .TP
52 \fB\-i\fR, \fB\-\-iso\fR
53 Make an ISO image instead of a disk image.
54 .TP
55 \fB\-o\fR, \fB\-\-only-wim\fR
56 Make neither a disk image nor an ISO image; instead, only make a modified
57 \fIboot.wim\fR file.
58 .TP
59 \fB\-W\fR, \fB\-\-windows\-dir\fR=\fIDIR\fR
60 Use DIR as the location of the mounted Windows 7 or Windows 8 DVD.  Default is
61 /mnt/windows, then /mnt/windows7, then /mnt/windows8.
62 .TP
63 \fB\-A\fR, \fB\-\-waik\-dir\fR=\fIDIR\fR
64 Get the boot files and boot.wim from the ISO of the Windows Automated
65 Installation Kit mounted on DIR instead of from the Windows 7 or Windows 8 DVD.
66 .TP
67 \fB\-s\fR, \fB\-\-start\-script\fR=\fIFILE\fR
68 Add FILE to the root directory of Windows PE image and adjust
69 \eWindows\eSystem32\ewinpeshl.ini to execute FILE when Windows PE starts up.
70 .TP
71 \fB\-w\fR, \fB\-\-wim\fR=\fIWIM\fR
72 Use WIM as the "boot.wim" file.  Defaults to "sources/boot.wim" in the Windows DVD
73 directory, or F1_WINPE.WIM from the WAIK if \fB\-\-waik\-dir\fR is specified.
74 .TP
75 \fB\-O\fR, \fB\-\-overlay\fR=\fIDIR\fR
76 Adds all the files in DIR to the Windows PE image.
77 .TP
78 \fB\-t\fR, \fB\-\-tmp\-dir\fR=\fIDIR\fR
79 Use DIR for temporary files.  Defaults to a directory made using "mktemp -d".
80 .TP
81 \fB\-a\fR, \fB\-\-arch\fR=\fIARCH\fR
82 Use the Windows PE version from the Windows Automated Installation Kit that has
83 the CPU architecture \fIARCH\fR.  Only valid with \fB\-\-waik\-dir\fR.  Possible
84 values: "x86" or "amd64".  Default is "x86".  Note: the WAIK also contains a
85 Windows PE image for the ia64 (Itanium) architecture; however, this is not
86 supported by this script.
87 .TP
88 \fB\-h\fR, \fB\-\-help\fR
89 Display help.
90 .TP
91 \fB\-v\fR, \fB\-\-version\fR
92 Show version information.
93 .SH EXAMPLES
94
95 Create a bootable disk image of Windows PE from the Windows Vista, 7, or 8
96 installation media mounted on /media/windows:
97
98 .RS
99 .PP
100 mkwinpeimg --windows-dir=/media/windows winpe.img
101 .RE
102 .PP
103
104 Create a bootable ISO of Windows PE from the WAIK mounted on /media/waik, and
105 add all the files in "winpe_overlay" to Windows PE's filesystem:
106
107 .RS
108 .PP
109 mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
110 .RE
111 .PP
112
113 Create a bootable image of Windows PE from the Windows installation media
114 mounted on /media/windows, add and make it execute "install.cmd" when it starts
115 up.  In this example the image is created in the root directory of the TFTP
116 server for network booting.
117
118 .RS
119 .PP
120 mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows /var/tftpboot/winpe.img
121 .RE
122 .PP
123
124
125 .SH NOTES
126
127 Microsoft's licenses may limit the things that Windows PE can be used for, and
128 they may limit your rights to redistribute customized versions of Windows PE.
129
130 .SH REPORTING BUGS
131
132 Report bugs to ebiggers3@gmail.com.
133
134 .SH SEE ALSO
135 .BR imagex (1)