MKWINPEIMG(1)
β¨ MKWINPEIMG(1) β¨
okay so bestie, you're reading the manual page for mkwinpeimg β that's a User Command, and it lives in the wimlib family of tools. grab a snack, this one's a whole vibe π
πΈ NAME πΈ
mkwinpeimg β Make a customized bootable image of Windows PE π
π¦ SYNOPSIS π¦
mkwinpeimg [OPTIONS] IMAGE
π DESCRIPTION π
so basically, mkwinpeimg can make a bootable image of Windows PE by taking files from a mounted Windows installation ISO image (Vista or later), or from the mounted ISO image for the Windows Automated Installation Kit (WAIK) or the WAIK supplement. The --windows-dir and --waik-dir options are how you tell it where those mounted ISOs are chilling. You only need one or the other, not both, ok?
The files that mkwinpeimg will retrieve are boot.wim, bootmgr, boot.sdi, and bcd. And if you're making an ISO image, the file etfsboot.com gets retrieved too. β¨ Microsoft owns the rights to these files and they are not distributed with wimlib. just so we're clear π
mkwinpeimg can make two types of bootable images:
- The default is to make a bootable disk image. This image is not partitioned and is formatted into a FAT filesystem.
syslinux(1)is required to make this type of image, because it's used to chainloadbootmgr. Also,mtools(1)is required so that the FAT filesystem can be created without root privileges. no root, no problem π«Ά - The other type is a bootable ISO image. To make this one, give the
--isooption.mkisofs(1)is required for this. And in--isomode you can specify IMAGE as-to write the ISO image to standard output. iconic. π
If you make a disk image, you could put it on a USB drive, and if you make an ISO image, you could put it on a CD. In addition, both types of images can be loaded by the SYSLINUX or PXELINUX bootloaders using the MEMDISK module. slay π
Windows PE itself is contained in the boot.wim file. mkwinpeimg can modify this file before embedding it in a bootable image. The most useful modification is to specify an executable or batch file for Windows PE to execute as soon as it starts up β use the --start-script FILE option to specify such a file. You may also add arbitrary files to boot.wim by putting them in a directory, then specifying the --overlay DIR option. However, for more extensive modifications, consider modifying the boot.wim file separately using wimmountrw(1) or wimupdate(1), then providing it to mkwinpeimg using the --wim option. iykyk β¨
mkwinpeimg can also make only a modified boot.wim, rather than a bootable ISO or disk image, if the --only-wim option is given.
π OPTIONS π
-i,--isoβ Make an ISO image instead of a disk image. π-o,--only-wimβ Make neither a disk image nor an ISO image; instead, only make a modifiedboot.wimfile.-W,--windows-dir=DIRβ Use DIR as the location of the mounted Windows installation ISO image. If neither--windows-dirnor--waik-diris specified, then the script looks for the mounted ISO in the following default locations:/mnt/windows,/mnt/windows7,/mnt/windows8, and/mnt/windows10. it goes looking for you, bestie π΅οΈβοΈ-A,--waik-dir=DIRβ Get the boot files andboot.wimfrom the ISO of the Windows Automated Installation Kit mounted on DIR instead of from a Windows installation ISO. 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.inito execute FILE when Windows PE starts up. main character energy fr fr π₯-w,--wim=WIMβ Use WIM as the"boot.wim"file. This defaults to the appropriate WIM file from the Windows ISO, WAIK, or WAIK supplement.-O,--overlay=DIRβ Adds all the files in DIR to the Windows PE image. π-t,--tmp-dir=DIRβ Use DIR for temporary files. Defaults to a directory made using"mktemp -d".-a,--arch=ARCHβ Use the Windows PE version from the Windows Automated Installation Kit (or the WAIK supplement) that has the CPU architecture ARCH. Only valid with--waik-dir. Possible values:"x86"or"amd64". Default is"x86". Note: the WAIK also contains a Windows PE image for theia64(Itanium) architecture; however, this is not supported by this script. π§-h,--helpβ Display help. we love a helpful king π«Ά-v,--versionβ Show version information. β¨
π EXAMPLES π
Create a bootable disk image of Windows PE from the Windows (Vista or later) installation media mounted on /media/windows:
mkwinpeimg --windows-dir=/media/windows winpe.img
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:
mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
Create a bootable image of Windows PE from the Windows installation media mounted on /media/windows, add and make it execute "install.cmd" when it starts up. In this example the image is created in the root directory of the TFTP server for network booting.
mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows /var/tftpboot/winpe.img
π NOTES π
Microsoft's licenses may limit the things that Windows PE can be used for, and they may limit your rights to redistribute customized versions of Windows PE. read the fine print bestie, no cap π
π REPORTING BUGS π
Report bugs to https://wimlib.net/forums/. they wanna hear from you π
π SEE ALSO π
and that's the whole page!! this was wimlib 1.14.5, from January 2026 β thanks for reading, ily, go make a Windows PE image π¦β¨π
π¦ where this page comes from
- arch rolling: wimlib 1.14.5-4 Β· LGPL-2.1-only OR LGPL-3.0-only
- fedora 43: wimlib-utils 1.14.5-1.fc43 Β· GPL-3.0-or-later AND MIT
- fedora 44: wimlib-utils 1.14.5-1.fc44 Β· GPL-3.0-or-later AND MIT
- nixpkgs unstable: wimlib 1.14.5
- ubuntu resolute: wimtools 1.14.5-1 Β· GPL3.0+-with-exception
- ubuntu stonking: wimtools 1.14.5-1build1 Β· GPL3.0+-with-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms