]> wimlib.net Git - wimlib/blob - doc/man1/mkwinpeimg.1
wimlib-imagex: add --image-property option to wimcapture, wimappend, wiminfo
[wimlib] / doc / man1 / mkwinpeimg.1
1 .TH MKWINPEIMG "1" "November 2015" "wimlib 1.8.3" "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 installation ISO image (Vista or later) or the mounted
10 ISO image for the Windows Automated Installation Kit (WAIK) or the WAIK
11 supplement.  The \fB--windows-dir\fR and \fB--waik-dir\fR options are used to
12 specify the locations of these mounted ISOs.  You only need one or the other.
13 The files 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 make two types of bootable images.  The default is to make
19 a bootable disk image.  The image is not partitioned and is formatted into a FAT
20 filesystem.  \fBsyslinux\fR(1) is required to make this type of image, as it is
21 used to chainload \fIbootmgr\fR. Also, \fBmtools\fR(1) is required so that the
22 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.  In \fB--iso\fR mode,
27 you can specify \fIIMAGE\fR as "-" to write the ISO image to standard output.
28 .PP
29 If you make a disk image, you could put it on a USB drive, and if you make an
30 ISO image, you could put it on a CD.  In addition, both types of images can be
31 loaded by the SYSLINUX or PXELINUX bootloaders using the MEMDISK module.
32 .PP
33 Windows PE itself is contained in the \fIboot.wim\fR file.  \fBmkwinpeimg\fR can
34 modify this file before embedding it in a bootable image.  The most useful
35 modification is to specify an executable or batch file for Windows PE to execute
36 as soon as it starts up.  Use the \fB--start-script\fR \fIFILE\fR option to
37 specify such a file.  You may also add arbitrary files to \fIboot.wim\fR by
38 putting them in a directory, then specifying the \fB--overlay\fR \fIDIR\fR
39 option.  However, for more extensive modifications, consider modifying the
40 \fIboot.wim\fR file separately using \fBwimlib-imagex mountrw\fR or
41 \fBwimlib-imagex update\fR, then providing it to \fBmkwinpeimg\fR using the
42 \fB--wim\fR option.
43 .PP
44 \fBmkwinpeimg\fR can also make only a modified \fIboot.wim\fR, rather than a
45 bootable ISO or disk image, if the \fB--only-wim\fR option is given.
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 installation ISO image.  If
57 neither \fB\-\-windows\-dir\fR nor \fB\-\-waik\-dir\fR is specified, then
58 the script looks for the mounted ISO in the following default locations:
59 /mnt/windows, /mnt/windows7, /mnt/windows8, and /mnt/windows10.
60 .TP
61 \fB\-A\fR, \fB\-\-waik\-dir\fR=\fIDIR\fR
62 Get the boot files and boot.wim from the ISO of the Windows Automated
63 Installation Kit mounted on DIR instead of from a Windows installation ISO.
64 This also works if the mounted ISO is for the WAIK supplement rather than the
65 WAIK itself.
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.  This defaults to the appropriate WIM file from
73 the Windows ISO, WAIK, or WAIK supplement.
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 (or the
83 WAIK supplement) that has the CPU architecture \fIARCH\fR.  Only valid with
84 \fB\-\-waik\-dir\fR.  Possible values: "x86" or "amd64".  Default is "x86".
85 Note: the WAIK also contains a Windows PE image for the ia64 (Itanium)
86 architecture; however, this is not 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 Create a bootable disk image of Windows PE from the Windows (Vista or later)
95 installation media mounted on /media/windows:
96 .RS
97 .PP
98 mkwinpeimg --windows-dir=/media/windows winpe.img
99 .RE
100 .PP
101 Create a bootable ISO of Windows PE from the WAIK (or WAIK supplement) mounted
102 on /media/waik, and add all the files in "winpe_overlay" to Windows PE's
103 filesystem:
104 .RS
105 .PP
106 mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
107 .RE
108 .PP
109 Create a bootable image of Windows PE from the Windows installation media
110 mounted on /media/windows, add and make it execute "install.cmd" when it starts
111 up.  In this example the image is created in the root directory of the TFTP
112 server for network booting.
113 .RS
114 .PP
115 mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows /var/tftpboot/winpe.img
116 .RE
117 .PP
118 .SH NOTES
119 Microsoft's licenses may limit the things that Windows PE can be used for, and
120 they may limit your rights to redistribute customized versions of Windows PE.
121 .SH REPORTING BUGS
122 Report bugs to ebiggers3@gmail.com.
123 .SH SEE ALSO
124 .BR wimlib-imagex (1)