Windows 10: DISM - Split install.wim file

Discus and support DISM - Split install.wim file in Windows 10 Tutorials to solve the problem; How to: DISM - Split install.wim file [img] Information Overall, Windows image size (the size of install.wim file) is growing version by version.... Discussion in 'Windows 10 Tutorials' started by cereberus, Jan 28, 2018.

  1. cereberus Win User

    DISM - Split install.wim file


    How to: DISM - Split install.wim file

    DISM - Split install.wim file [​IMG]
    Information Overall, Windows image size (the size of install.wim file) is growing version by version. In fact, it is slowly approaching the magical 4 GB file size limit for a FAT32 formatted USB flash drive. Especially if you customize Windows image, it could easily be larger than that.

    Interestingly, the restriction that we must still use FAT32 formatted USBs to install Windows on UEFI based computers is purely artificial or arbitrary:

    (Source: GitHub - pbatard/uefi-ntfs: UEFI:NTFS - Boot NTFS partitions from UEFI)

    My custom Windows images are 10 GB+, depending on what software I pre-install before capturing the deployment / install image. To get them onto a USB flash drive without using any third-party tools, I must split the install.wim file into pieces, to stay beneath the 4 GB limit.

    In this tutorial I show how to split Windows image files larger than 4GB into smaller SWM (Split Wim) files so as to copy them to a USB flash drive, and how to deploy (install) Windows using such SWM files.





    Contents [/i] Use links below to go to any step, back button of your browser to return to this list.


    [table][tr][td]Step One:[/td] [td]Split WIM file[/td] [/tr] [tr][td]Step Two:[/td] [td]Prepare USB flash drive[/td] [/tr] [tr][td]Step Three:[/td] [td]Deploy (install) from SWM files[/td] [/tr] [/table]





    Step One [/i] Split WIM file 1.1) In below screenshot you can see that my custom install.wim file is about 12 GB (#1). Trying to copy it to USB flash drive I: gives an error because file exceeds the maximum allowed size for a FAT32 formatted device(#2):

    DISM - Split install.wim file [​IMG]

    (Click screenshot to enlarge.)

    1.2) To get the install.wim onto a USB flash drive, I need to split it to smaller SWM files using the following command (#3 in above screenshot:

    Dism /Split-Image /ImageFile:"H:\Deployment Image\install.wim" /SWMFile:"H:\Deployment Image\install.swm" /FileSize:4000

    Notice that as the path to my image file contains spaces, it must be given in quotes. Maximum size for an SWM file is 4,700 MB which although a practical size if I would store the split image on single layer DVDs is still too big for FAT32 formatted USB. I wanted to be sure that split image can be copied to USB, giving size for split SWM files as 4,000 MB.

    1.3) When done, I have the original huge install.wim file (yellow highlight) and the same image in split SWM files (blue highlight):

    DISM - Split install.wim file [​IMG]

    The first SWM file is named as install.swm, second part as install2.swm and so on.




    Step Two [/i] Prepare USB flash drive

    DISM - Split install.wim file [​IMG]
    Note You can of course create a bootable FAT32 formatted USB flash drive using your preferred method. I always use bootable WinPE USB flash drives for deployment, but creating one is only my recommendation, not obligatory. 2.1) Create a WinPE USB drive as told in this tutorial: Create WinPE or ISO Installation Upgrade Tutorials

    2.2) Create a new folder on WinPE USB, name it as you wish. In my case now I named it as ImageFiles. Copy the SWM files to this folder:

    DISM - Split install.wim file [​IMG]


    2.3) Copy & paste following DISKPART script in Notepad. Save it on root of WinPE USB as GPTConfig.txt:

    Code:
    The above script partitions a GPT disk to be used on UEFI based machines creating system partitions and one large Windows partition using all available space on disk. To modify script for multiple partition setups, see this tutorial: DISKPART - How to Partition GPT disk Installation Upgrade Tutorials

    I am also happy to help you if you need help with modifying script for multiple partitions and / or disks. Just post your partitioning plan, we'll make a script for you!

    Same script modified to partition an MBR disk on BIOS based machines. Save it as MBRConfig.txt on WinPE USB:

    Code:



    Step Three [/i] Deploy (install) from SWM files

    DISM - Split install.wim file [​IMG]
    Note Windows Setup cannot be run from split WIM. Therefore we need to partition and prepare the disk with DISKPART, and then apply Windows image with DISM, and finally create boot records to make hard disk bootable. 3.1) Boot the PC from your new WinPE disk

    3.2) Enter command diskpart (#1 in next screenshot)

    3.3) Enter command list vol (#2) to check the drive letter of your WinPE USB drive (#3). It will in most cases be drive C: when booted from WinPE on device with non-partitioned disk.

    3.4) Enter command exit (#4) to quit DISKPART

    3.5) Partition and prepare hard disk running the DISKPART script with following command (#5):

    diskpart /s C:\GPTConfig.txt

    DISM - Split install.wim file [​IMG]


    The /s switch tells system you want to run a DISKPART script. Change path to script according your actual WinPE drive letter and script name. Notice that a DISKPART script must have extension .txt

    3.6)
    Deploy Windows from SWM files with following command (#1 in next screenshot):

    Dism /apply-image /imagefile:c:\ImageFiles\install.swm /swmfile:c:\ImageFiles\install*.swm /index:1 /applydir:W:\

    Change the path for /imagefile and /swmfile switches according your actual one. As I had the SWM files stored on USB in folder ImageFiles, my path is C:\ImageFiles.

    Switch /imagefile tells DISM where to find the first SWM file, install.swm, and /swmfile where to find parts 2, 3 and so on. Because I had all SWM files in same folder, both paths are the same. Windows image will be applied to drive W: because W: is the chosen drive letter we used in DISKPART script. Windows setup will automatically change this to letter C: when we restart PC after deployment.

    3.7) Last thing to do is to add boot records for Windows on drive W: using the following command (#2):

    GPT disk / UEFI system:
    bcdboot W:\Windows

    MBR disk / BIOS system:
    bcdboot W:\Windows /s S:

    Notice that the above command only works as such if you have booted with properly made WinPE USB drive as told in steps 2.1 though 2.6. Using a normal bootable USB you must enter the command as follows:

    GPT disk / UEFI system:
    W:\Windows\System32\bcdboot W:\Windows

    MBR disk / BIOS system:
    W:\Windows\System32\bcdboot W:\Windows /s S:

    3.8) All done! Unplug the USB drive and restart PC with following command (#3):

    W:\Windows\System32\shutdown -r -t 0

    DISM - Split install.wim file [​IMG]


    Windows will restart and go through Windows Welcome (OOBE) to let you finalize Windows Setup.

    That's it!

    Kari


    Related Tutorials

    :)
     
    cereberus, Jan 28, 2018
    #1

  2. Where is Windows 10 version 1607 ISO file TechBench?

    Hi,

    I need install.wim file for DISM scans (Dism /Online /Cleanup-Image /RestoreHealth /Source:wimDISM - Split install.wim file :D:\Sources\Install.wim:1).

    Where is Windows 10 version 1607 ISO file download in Microsoft’s TechBench?
     
    Rose Family, Jan 28, 2018
    #2
  3. Unable to associate files with apps; cannot change default apps

    Using DISM:

    Following the link you provided, the instructions state to mount an ISO file to find and replace corrupted files found from dism. However, when I downloaded the ISO, there is no install.wim file. There is instead an install.emd file.

    However, simply replacing the instruction:

    DISM /Online /Cleanup-Image /RestoreHealth /source:WIM:V:\Sources\Install.wim:1 /LimitAccess

    with

    DISM /Online /Cleanup-Image /RestoreHealth /source:WIM:V:\Sources\Install.esd:1 /LimitAccess

    does not work. (V is my mounted ISO disk).

    Thanks,

    Andrew
     
    ArchbishopJubilee, Jan 28, 2018
    #3
  4. Jerry06 Win User

    DISM - Split install.wim file

    Excellent tutorial. Everything is supported by MS.
     
    Jerry06, Jan 28, 2018
    #4
  5. Tony K Win User
    Again, great tutorial, Kari. Very clever as well. *Smile

    As a novice, I'm beginning to see what I thought was a cutting-edge industry isn't so cutting-edge anymore. FAT was originally designed in 1977 for use on floppy disks, then adapted throughout the industry. It may have been great for its day, but the newer formats like NTSF or others haven't been used because of silly little drivers? This would be like having to build log cabins because no one has developed a power saw. *Confused
     
    Tony K, Jan 28, 2018
    #5
  6. Kari Win User
    What I said about this matter was that it is an artificial limitation. Quite the opposiste you claim me having said; I admitted that at the moment FAT is used and required but that the reason is artificial.

    I then quoted the author of Rufus, who on his GitHub page states the following:

    Yes, FAT is required at the moment as per those specs. However, this is an artificial limitation, nothing in those specifications explicitly forces the use of it, therefore other file systems will be bootable, too, as long as correct drivers are present.
     
  7. cereberus Win User
    Hi all, @Kari, I believe there is another way to do this which is rather easier.

    The historical problem has been that windows would only recognise one partition on a standard recoverable flash drive, making it difficult to create a bootable partititionwith files greater than 4GB as you say earlier.

    This changed with the 1703 CU version where it would handle multiple partitions but you had to use diskpart commands to handle multiple partitions. With 1709 FCU version, it now handles multiple partitions from disk management.

    So method is basically very simple.

    1) Mount iso with large install.wim as a drive (say letter D)

    2) Create two partitions on usb flash drive as follows

    Partition 1 - fat32 formatted say 2GB (may be less but I used 2 GB) (say letter E)

    Partition 2 - NTFS formatted - rest of drive (must be large enough for INSTALL.WIM+ say 2GB) (say letter F)
    INSTALL.WIM can be as large as you like.

    3) Copy all of files/folders from D EXCEPT sources folder to E

    4) create sources folder on E and copy BOOT.WIM from sources folder on D to sources folder on E.

    5) copy all files from D to folder F (does not matter that files are on E as well).

    6) Reboot PC and it will boot from FAT32 partition but install files from NTFS partition.

    My PC will not boot from an NTFS partition, but I tried the above and it worked first time.

    Total time to create flash drive was less than five minutes.

    I have only tested this on a UEFI PC but it should work for legacy bios as well provided you make the first partition active I think.
     
    cereberus, Jan 29, 2018
    #7
  8. Jerry06 Win User

    DISM - Split install.wim file

    Some Sandisk USB drives are recognized as a hard drive, which allows you to place multiple partitions on the USB drive. What I've done in the past is use diskpart to create two partitions on the Sandisk USB drive the first partition as a FAT32 and the second as a NTFS partition, which allows for larger file sizes. Install.wim just needs to be copied to the NTFS partition.

    MakeWinPEMedia will not wipe the NTFS partition. Since the Sandisk drive is recognized as a Hard drive physically there is not a Windows 10 version that is required. I've used Sandisk drives to apply windows 7 images as well.

    I hope I'm clear enough..
     
    Jerry06, Jan 29, 2018
    #8
  9. cereberus Win User
    That was point of my previous post - you no longer need usb flash drives with the hard disk attribute set. Any flash drive with enough capacity will do it now.

    As I said, I installed Windows today setup like that. It does not matter what version you are installing, but you will need to turn off secure boot for Windows 7 afaik.
     
    cereberus, Apr 4, 2018
    #9
Thema:

DISM - Split install.wim file

Loading...
  1. DISM - Split install.wim file - Similar Threads - DISM Split install

  2. How to mount wim file with DISM?

    in Windows 10 Gaming
    How to mount wim file with DISM?: I am trying to mount a wim file to customize the windows 11 installation. I downloaded the Windows 11 Media creation tool and created a usb key with it. I noticed the usb key had 2 swm files. I don't know if you can mount 2 swm files. I would prefer to mount 2 swm files...
  3. How to mount wim file with DISM?

    in Windows 10 Software and Apps
    How to mount wim file with DISM?: I am trying to mount a wim file to customize the windows 11 installation. I downloaded the Windows 11 Media creation tool and created a usb key with it. I noticed the usb key had 2 swm files. I don't know if you can mount 2 swm files. I would prefer to mount 2 swm files...
  4. Data WIM using DISM

    in Windows 10 Software and Apps
    Data WIM using DISM: Dear Support Team,Can anyone guide me how to add Data Wim in Answer file using Windows System Image Manager Windows 10 with real life example. I was able to create Data Wim using DISM but got stuck at further steps....
  5. Data WIM using DISM

    in Windows 10 Gaming
    Data WIM using DISM: Dear Support Team,Can anyone guide me how to add Data Wim in Answer file using Windows System Image Manager Windows 10 with real life example. I was able to create Data Wim using DISM but got stuck at further steps....
  6. Data WIM using DISM

    in Windows 10 Drivers and Hardware
    Data WIM using DISM: Dear Support Team,Can anyone guide me how to add Data Wim in Answer file using Windows System Image Manager Windows 10 with real life example. I was able to create Data Wim using DISM but got stuck at further steps....
  7. Dism adding drivers/updates to Wim

    in Windows 10 Gaming
    Dism adding drivers/updates to Wim: I read about adding drivers to a wim and updates. Does adding a driver replace an existing driver in the wim or does it just put it in the driver folder and you have it as an option later to choose? IE: hp driver for touchpad version 1, and you want to add/replace it with...
  8. Dism adding drivers/updates to Wim

    in Windows 10 Software and Apps
    Dism adding drivers/updates to Wim: I read about adding drivers to a wim and updates. Does adding a driver replace an existing driver in the wim or does it just put it in the driver folder and you have it as an option later to choose? IE: hp driver for touchpad version 1, and you want to add/replace it with...
  9. i wanted to split the install,wim file and it showed me this error

    in Windows 10 Gaming
    i wanted to split the install,wim file and it showed me this error: here is a picture of it https://answers.microsoft.com/en-us/windows/forum/all/i-wanted-to-split-the-installwim-file-and-it/cf26fe1d-ef1a-49a3-9097-3ab4bd2ebfe7
  10. i wanted to split the install,wim file and it showed me this error

    in Windows 10 Software and Apps
    i wanted to split the install,wim file and it showed me this error: here is a picture of it https://answers.microsoft.com/en-us/windows/forum/all/i-wanted-to-split-the-installwim-file-and-it/cf26fe1d-ef1a-49a3-9097-3ab4bd2ebfe7

Users found this page by searching for:

  1. autounattend file with split wim

    ,
  2. break up install.wim