]> wimlib.net Git - wimlib/blob - doc/mkwinpeimg.1
16d7cdf89318e2c537e8e584168c9439b422b0e9
[wimlib] / doc / mkwinpeimg.1
1 .TH MKWINPEIMG "1" "April 2012" "mkwinpeimg (wimlib 0.6.1)" "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 7 or Windows 8) or the mounted ISO image for
12 the Windows Automated Installation Kit (WAIK).  The \fB--windows-dir\fR and
13 \fB--waik-dir\fR options are used to specify the locations of these mounted
14 ISOs.  You only need one or the other.  The files that \fBmkwinpeimg\fR will
15 retrieve are \fIboot.wim\fR, \fIbootmgr\fR, \fIboot.sdi\fR, and \fIbcd\fR.  If
16 making an ISO image, the file \fIetfsboot.com\fR is also retrieved.  Microsoft
17 owns the rights to these files and they are not distributed with WIMLIB.
18
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
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
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
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.
40
41 \fBmkwinpeimg\fR can also make only a modified \fIboot.wim\fR, rather than a
42 bootable ISO or disk image, if the \fB--only-wim\fR option is given.
43
44 The Windows PE WIMs provided in Windows 7, Windows 8, and the WAIK are not the
45 same, but are all similar.  The best one to use is likely the one from the WAIK,
46 as that one is the smallest.
47
48 .SH OPTIONS
49
50 .TP
51 \fB\-i\fR, \fB\-\-iso\fR
52 Make an ISO image instead of a disk image.
53 .TP
54 \fB\-o\fR, \fB\-\-only-wim\fR
55 Make neither a disk image nor an ISO image; instead, only make a modified
56 \fIboot.wim\fR file.
57 .TP
58 \fB\-W\fR, \fB\-\-windows\-dir\fR=\fIDIR\fR
59 Use DIR as the location of the mounted Windows 7 or Windows 8 DVD.  Default is
60 /mnt/windows, then /mnt/windows7, then /mnt/windows8.
61 .TP
62 \fB\-A\fR, \fB\-\-waik\-dir\fR=\fIDIR\fR
63 Get the boot files and boot.wim from the ISO of the Windows Automated
64 Installation Kit mounted on DIR instead of from the Windows 7 or Windows 8 DVD.
65 .TP
66 \fB\-s\fR, \fB\-\-start\-script\fR=\fIFILE\fR
67 Add FILE to the root directory of Windows PE image and adjust
68 \eWindows\eSystem32\ewinpeshl.ini to execute FILE when Windows PE starts up.
69 .TP
70 \fB\-w\fR, \fB\-\-wim\fR=\fIWIM\fR
71 Use WIM as the "boot.wim" file.  Defaults to "sources/boot.wim" in the Windows DVD
72 directory, or F1_WINPE.WIM from the WAIK if \fB\-\-waik\-dir\fR is specified.
73 .TP
74 \fB\-O\fR, \fB\-\-overlay\fR=\fIDIR\fR
75 Adds all the files in DIR to the Windows PE image.
76 .TP
77 \fB\-t\fR, \fB\-\-tmp\-dir\fR=\fIDIR\fR
78 Use DIR for temporary files.  Defaults to a directory made using \e"mktemp
79 \fB\-d\fR\e".
80 .TP
81 \fB\-h\fR, \fB\-\-help\fR
82 Display help.
83 .TP
84 \fB\-v\fR, \fB\-\-version\fR
85 Show version information.
86 .SH EXAMPLES
87
88 .IP 
89 mkwinpeimg --windows-dir=/media/windows winpe.img
90 .LP
91 Create a bootable disk image of Windows PE from the Windows DVD mounted on
92 /media/windows.
93
94 .IP
95 mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
96 .LP
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
100 .IP
101 mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows /var/tftpboot/winpe.img
102 .LP
103
104 Create a bootable image of Windows PE from the Windows DVD mounted on
105 /media/windows, add and make it execute "install.cmd" when it starts up.  In
106 this example the image is created in the root directory of the TFTP server for
107 network booting.
108
109 .SH NOTES
110
111 Microsoft's licenses may limit the things that Windows PE can be used for, and
112 they may limit your rights to redistribute customized versions of Windows PE.
113
114 .SH REPORTING BUGS
115
116 Report bugs to ebiggers3@gmail.com.
117
118 .SH SEE ALSO
119 .BR imagex (1)