]> wimlib.net Git - wimlib/blob - doc/man1/mkwinpeimg.1.in
wimboot.c: Attach WoF driver if not running on target volume
[wimlib] / doc / man1 / mkwinpeimg.1.in
1 .TH MKWINPEIMG "1" "March 2014" "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) or the WAIK
11 supplement.  The
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.
18 .PP
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.
24 .PP
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.
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 \fB@IMAGEX_PROGNAME@ mountrw\fR or
41 \fB@IMAGEX_PROGNAME@ 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 .PP
47 The Windows PE WIMs provided in Windows 7, Windows 8, and the WAIK are not the
48 same, but are all similar.  The best one to use is likely the one from the WAIK,
49 as that one is the smallest.
50 .SH OPTIONS
51 .TP 6
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 This also works if the mounted ISO is for the WAIK supplement rather than the
67 WAIK itself.
68 .TP
69 \fB\-s\fR, \fB\-\-start\-script\fR=\fIFILE\fR
70 Add FILE to the root directory of Windows PE image and adjust
71 \eWindows\eSystem32\ewinpeshl.ini to execute FILE when Windows PE starts up.
72 .TP
73 \fB\-w\fR, \fB\-\-wim\fR=\fIWIM\fR
74 Use WIM as the "boot.wim" file.  This defaults to the appropriate WIM file from
75 the Windows DVD, WAIK, or WAIK supplement.
76 .TP
77 \fB\-O\fR, \fB\-\-overlay\fR=\fIDIR\fR
78 Adds all the files in DIR to the Windows PE image.
79 .TP
80 \fB\-t\fR, \fB\-\-tmp\-dir\fR=\fIDIR\fR
81 Use DIR for temporary files.  Defaults to a directory made using "mktemp -d".
82 .TP
83 \fB\-a\fR, \fB\-\-arch\fR=\fIARCH\fR
84 Use the Windows PE version from the Windows Automated Installation Kit (or the
85 WAIK supplement) that has the CPU architecture \fIARCH\fR.  Only valid with
86 \fB\-\-waik\-dir\fR.  Possible values: "x86" or "amd64".  Default is "x86".
87 Note: the WAIK also contains a Windows PE image for the ia64 (Itanium)
88 architecture; however, this is not supported by this script.
89 .TP
90 \fB\-h\fR, \fB\-\-help\fR
91 Display help.
92 .TP
93 \fB\-v\fR, \fB\-\-version\fR
94 Show version information.
95 .SH EXAMPLES
96 Create a bootable disk image of Windows PE from the Windows Vista, 7, or 8
97 installation media mounted on /media/windows:
98 .RS
99 .PP
100 mkwinpeimg --windows-dir=/media/windows winpe.img
101 .RE
102 .PP
103 Create a bootable ISO of Windows PE from the WAIK (or WAIK supplement) mounted
104 on /media/waik, and add all the files in "winpe_overlay" to Windows PE's
105 filesystem:
106 .RS
107 .PP
108 mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
109 .RE
110 .PP
111 Create a bootable image of Windows PE from the Windows installation media
112 mounted on /media/windows, add and make it execute "install.cmd" when it starts
113 up.  In this example the image is created in the root directory of the TFTP
114 server for network booting.
115 .RS
116 .PP
117 mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows /var/tftpboot/winpe.img
118 .RE
119 .PP
120 .SH NOTES
121 Microsoft's licenses may limit the things that Windows PE can be used for, and
122 they may limit your rights to redistribute customized versions of Windows PE.
123 .SH REPORTING BUGS
124 Report bugs to ebiggers3@gmail.com.
125 .SH SEE ALSO
126 .BR @IMAGEX_PROGNAME@ (1)