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