- Mention in help output and man page that WAIK supplement is supported
- Fix documentation for -w/--wim
- Only check for 'cabextract' when using WAIK, not WAIK supplement
- Fix check for WAIK vs. WAIK supplement
- Print full path when copying boot.wim from WAIK supplement
.SH DESCRIPTION
\fBmkwinpeimg\fR is able to make a bootable image of Windows PE by taking files
from a mounted Windows DVD (Windows Vista, Windows 7 or Windows 8) or the
.SH DESCRIPTION
\fBmkwinpeimg\fR is able to make a bootable image of Windows PE by taking files
from a mounted Windows DVD (Windows Vista, Windows 7 or Windows 8) or the
-mounted ISO image for the Windows Automated Installation Kit (WAIK). The
+mounted ISO image for the Windows Automated Installation Kit (WAIK) or the WAIK
+supplement. The
\fB--windows-dir\fR and \fB--waik-dir\fR options are used to specify the
locations of these mounted ISOs. You only need one or the other. The files
that \fBmkwinpeimg\fR will retrieve are \fIboot.wim\fR, \fIbootmgr\fR,
\fB--windows-dir\fR and \fB--waik-dir\fR options are used to specify the
locations of these mounted ISOs. You only need one or the other. The files
that \fBmkwinpeimg\fR will retrieve are \fIboot.wim\fR, \fIbootmgr\fR,
\fB\-A\fR, \fB\-\-waik\-dir\fR=\fIDIR\fR
Get the boot files and boot.wim from the ISO of the Windows Automated
Installation Kit mounted on DIR instead of from the Windows 7 or Windows 8 DVD.
\fB\-A\fR, \fB\-\-waik\-dir\fR=\fIDIR\fR
Get the boot files and boot.wim from the ISO of the Windows Automated
Installation Kit mounted on DIR instead of from the Windows 7 or Windows 8 DVD.
+This also works if the mounted ISO is for the WAIK supplement rather than the
+WAIK itself.
.TP
\fB\-s\fR, \fB\-\-start\-script\fR=\fIFILE\fR
Add FILE to the root directory of Windows PE image and adjust
\eWindows\eSystem32\ewinpeshl.ini to execute FILE when Windows PE starts up.
.TP
\fB\-w\fR, \fB\-\-wim\fR=\fIWIM\fR
.TP
\fB\-s\fR, \fB\-\-start\-script\fR=\fIFILE\fR
Add FILE to the root directory of Windows PE image and adjust
\eWindows\eSystem32\ewinpeshl.ini to execute FILE when Windows PE starts up.
.TP
\fB\-w\fR, \fB\-\-wim\fR=\fIWIM\fR
-Use WIM as the "boot.wim" file. Defaults to "sources/boot.wim" in the Windows DVD
-directory, or F1_WINPE.WIM from the WAIK if \fB\-\-waik\-dir\fR is specified.
+Use WIM as the "boot.wim" file. This defaults to the appropriate WIM file from
+the Windows DVD, WAIK, or WAIK supplement.
.TP
\fB\-O\fR, \fB\-\-overlay\fR=\fIDIR\fR
Adds all the files in DIR to the Windows PE image.
.TP
\fB\-O\fR, \fB\-\-overlay\fR=\fIDIR\fR
Adds all the files in DIR to the Windows PE image.
Use DIR for temporary files. Defaults to a directory made using "mktemp -d".
.TP
\fB\-a\fR, \fB\-\-arch\fR=\fIARCH\fR
Use DIR for temporary files. Defaults to a directory made using "mktemp -d".
.TP
\fB\-a\fR, \fB\-\-arch\fR=\fIARCH\fR
-Use the Windows PE version from the Windows Automated Installation Kit that has
-the CPU architecture \fIARCH\fR. Only valid with \fB\-\-waik\-dir\fR. Possible
-values: "x86" or "amd64". Default is "x86". Note: the WAIK also contains a
-Windows PE image for the ia64 (Itanium) architecture; however, this is not
-supported by this script.
+Use the Windows PE version from the Windows Automated Installation Kit (or the
+WAIK supplement) that has the CPU architecture \fIARCH\fR. Only valid with
+\fB\-\-waik\-dir\fR. Possible values: "x86" or "amd64". Default is "x86".
+Note: the WAIK also contains a Windows PE image for the ia64 (Itanium)
+architecture; however, this is not supported by this script.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help.
mkwinpeimg --windows-dir=/media/windows winpe.img
.RE
.PP
mkwinpeimg --windows-dir=/media/windows winpe.img
.RE
.PP
-Create a bootable ISO of Windows PE from the WAIK mounted on /media/waik, and
-add all the files in "winpe_overlay" to Windows PE's filesystem:
+Create a bootable ISO of Windows PE from the WAIK (or WAIK supplement) mounted
+on /media/waik, and add all the files in "winpe_overlay" to Windows PE's
+filesystem:
.RS
.PP
mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
.RS
.PP
mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
-A, --waik-dir=DIR Get the boot files and boot.wim from the ISO of the
Windows Automated Installation Kit mounted on DIR
instead of from the Windows 7 or Windows 8 DVD.
-A, --waik-dir=DIR Get the boot files and boot.wim from the ISO of the
Windows Automated Installation Kit mounted on DIR
instead of from the Windows 7 or Windows 8 DVD.
+ This also works if the mounted ISO is for the
+ WAIK supplement rather than the WAIK itself.
-s, --start-script=FILE Add FILE to the root directory of Windows PE image
and adjust \Windows\System32\winpeshl.ini to
execute FILE when Windows PE starts up.
-s, --start-script=FILE Add FILE to the root directory of Windows PE image
and adjust \Windows\System32\winpeshl.ini to
execute FILE when Windows PE starts up.
- -w, --wim=WIM Use WIM as the boot.wim file. Defaults to
- sources/boot.wim in the Windows DVD directory, or
- F1_WINPE.WIM from the WAIK if --waik-dir is
- specified.
+ -w, --wim=WIM Use WIM as the boot.wim file. This defaults to the
+ appropriate WIM file from the Windows DVD, WAIK,
+ or WAIK supplement.
-O, --overlay=DIR Adds all the files in DIR to the Windows PE image.
-t, --tmp-dir=DIR Use DIR as the temporary base of the ISO filesystem.
Defaults to making one using "mktemp -d".
-O, --overlay=DIR Adds all the files in DIR to the Windows PE image.
-t, --tmp-dir=DIR Use DIR as the temporary base of the ISO filesystem.
Defaults to making one using "mktemp -d".
- if [ -n "$waik_dir" ]; then
+ if [ -n "$waik_dir" ] && [ -f "$waik_dir"/wAIK${arch}.msi ]; then
if ! type -P cabextract &> /dev/null ; then
cat << EOF
ERROR: The boot files in the Windows Automated Installation Kit (WAIK) are
if ! type -P cabextract &> /dev/null ; then
cat << EOF
ERROR: The boot files in the Windows Automated Installation Kit (WAIK) are
# Get boot files from the WAIK.
stat_busy "Copying primary boot files from the Windows Automated Installation Kit ($waik_dir, $arch)"
# Get boot files from the WAIK.
stat_busy "Copying primary boot files from the Windows Automated Installation Kit ($waik_dir, $arch)"
- if [ -f "$waik_dir"/WAIK${arch}.msi ]; then
+ if [ -f "$waik_dir"/wAIK${arch}.msi ]; then
if [ $make = iso ]; then
cabextract "$waik_dir"/wAIK${arch}.msi -F F_WINPE_${arch}_etfsboot.com -p \
> "$tmp_dir"/etfsboot.com || stat_fail
if [ $make = iso ]; then
cabextract "$waik_dir"/wAIK${arch}.msi -F F_WINPE_${arch}_etfsboot.com -p \
> "$tmp_dir"/etfsboot.com || stat_fail
> "$boot_wim" 2>/dev/null || stat_fail
# WAIK supplement has different layout
else
> "$boot_wim" 2>/dev/null || stat_fail
# WAIK supplement has different layout
else
- stat_busy "Copying boot.wim from ${arch,,}/winpe.wim"
+ stat_busy "Copying boot.wim from \"${waik_dir}/${arch,,}/winpe.wim\""
cp "$waik_dir"/${arch,,}/winpe.wim "$boot_wim" || stat_fail
chmod +w "$boot_wim"
fi
cp "$waik_dir"/${arch,,}/winpe.wim "$boot_wim" || stat_fail
chmod +w "$boot_wim"
fi