1MKWINPEIMG(1)                    User Commands                   MKWINPEIMG(1)
2
3
4

NAME

6       mkwinpeimg - Make a customized bootable image of Windows PE
7

SYNOPSIS

9       mkwinpeimg [OPTIONS] IMAGE
10

DESCRIPTION

12       mkwinpeimg  is  able  to  make a bootable image of Windows PE by taking
13       files from a mounted Windows installation ISO image (Vista or later) or
14       the mounted ISO image for the Windows Automated Installation Kit (WAIK)
15       or the WAIK supplement.  The --windows-dir and --waik-dir  options  are
16       used to specify the locations of these mounted ISOs.  You only need one
17       or the other.  The files that mkwinpeimg will  retrieve  are  boot.wim,
18       bootmgr,  boot.sdi,  and  bcd.   If making an ISO image, the file etfs‐
19       boot.com is also retrieved.  Microsoft owns the rights to  these  files
20       and they are not distributed with wimlib.
21
22       mkwinpeimg  can  make  two types of bootable images.  The default is to
23       make a bootable disk image.  The image is not partitioned and  is  for‐
24       matted  into  a  FAT  filesystem.  syslinux(1) is required to make this
25       type of image, as it is used to chainload bootmgr. Also,  mtools(1)  is
26       required  so that the FAT filesystem can be created without root privi‐
27       leges.
28
29       The other type of bootable image that mkwinpeimg can make is a bootable
30       ISO  image.   To  make  this  type  of  image,  give  the --iso option.
31       mkisofs(1) is required to make this type of image.  In --iso mode,  you
32       can specify IMAGE as "-" to write the ISO image to standard output.
33
34       If  you  make a disk image, you could put it on a USB drive, and if you
35       make an ISO image, you could put it on a CD.  In addition,  both  types
36       of  images  can be loaded by the SYSLINUX or PXELINUX bootloaders using
37       the MEMDISK module.
38
39       Windows PE itself is contained in the boot.wim  file.   mkwinpeimg  can
40       modify  this  file  before  embedding it in a bootable image.  The most
41       useful modification is to specify an executable or batch file for  Win‐
42       dows  PE  to  execute  as soon as it starts up.  Use the --start-script
43       FILE option to specify such a file.  You may also add  arbitrary  files
44       to boot.wim by putting them in a directory, then specifying the --over‐
45       lay DIR option.  However, for more  extensive  modifications,  consider
46       modifying  the  boot.wim  file separately using wimmountrw(1) or wimup‐
47       date(1), then providing it to mkwinpeimg using the --wim option.
48
49       mkwinpeimg can also make  only  a  modified  boot.wim,  rather  than  a
50       bootable ISO or disk image, if the --only-wim option is given.
51

OPTIONS

53       -i, --iso
54             Make an ISO image instead of a disk image.
55
56       -o, --only-wim
57             Make  neither a disk image nor an ISO image; instead, only make a
58             modified boot.wim file.
59
60       -W, --windows-dir=DIR
61             Use DIR as the location of the mounted Windows  installation  ISO
62             image.   If  neither  --windows-dir  nor --waik-dir is specified,
63             then the script looks  for  the  mounted  ISO  in  the  following
64             default  locations:  /mnt/windows,  /mnt/windows7, /mnt/windows8,
65             and /mnt/windows10.
66
67       -A, --waik-dir=DIR
68             Get the boot files and boot.wim from the ISO of the Windows Auto‐
69             mated  Installation  Kit mounted on DIR instead of from a Windows
70             installation ISO.  This also works if the mounted ISO is for  the
71             WAIK supplement rather than the WAIK itself.
72
73       -s, --start-script=FILE
74             Add  FILE  to  the  root directory of Windows PE image and adjust
75             \Windows\System32\winpeshl.ini to execute FILE  when  Windows  PE
76             starts up.
77
78       -w, --wim=WIM
79             Use WIM as the "boot.wim" file.  This defaults to the appropriate
80             WIM file from the Windows ISO, WAIK, or WAIK supplement.
81
82       -O, --overlay=DIR
83             Adds all the files in DIR to the Windows PE image.
84
85       -t, --tmp-dir=DIR
86             Use DIR for temporary files.  Defaults to a directory made  using
87             "mktemp -d".
88
89       -a, --arch=ARCH
90             Use  the  Windows PE version from the Windows Automated Installa‐
91             tion Kit (or the WAIK supplement) that has the  CPU  architecture
92             ARCH.   Only  valid  with  --waik-dir.  Possible values: "x86" or
93             "amd64".  Default is "x86".  Note: the WAIK also contains a  Win‐
94             dows  PE image for the ia64 (Itanium) architecture; however, this
95             is not supported by this script.
96
97       -h, --help
98             Display help.
99
100       -v, --version
101             Show version information.
102

EXAMPLES

104       Create a bootable disk image of Windows PE from the Windows  (Vista  or
105       later) installation media mounted on /media/windows:
106
107              mkwinpeimg --windows-dir=/media/windows winpe.img
108
109       Create  a bootable ISO of Windows PE from the WAIK (or WAIK supplement)
110       mounted on /media/waik, and add all the  files  in  "winpe_overlay"  to
111       Windows PE's filesystem:
112
113              mkwinpeimg  --iso --waik-dir=/media/waik --overlay=winpe_overlay
114              winpe.iso
115
116       Create a bootable image of Windows PE  from  the  Windows  installation
117       media  mounted on /media/windows, add and make it execute "install.cmd"
118       when it starts up.  In this example the image is created  in  the  root
119       directory of the TFTP server for network booting.
120
121              mkwinpeimg  --start-script=install.cmd --windows-dir=/media/win‐
122              dows /var/tftpboot/winpe.img
123

NOTES

125       Microsoft's licenses may limit the things that Windows PE can  be  used
126       for, and they may limit your rights to redistribute customized versions
127       of Windows PE.
128

REPORTING BUGS

130       Report bugs to ebiggers3@gmail.com.
131

SEE ALSO

133       wimlib-imagex(1)
134
135
136
137wimlib 1.13.1                      May 2019                      MKWINPEIMG(1)
Impressum