Windows 8.1 Pro ISO - can we shrink/compress it?

Discussion in 'Windows 8' started by LQQL, Sep 15, 2013.

  1. S_A_S

    S_A_S MDL Member

    Oct 16, 2012
    236
    103
    10
    Works, but only on fat32 stick
    View attachment 24038

    Also used diskpart with the above commands, but in addition

    diskpart
    [snip]
    exit

    cd E: <- mounted iso in explorer
    cd boot
    bootsect.exe /nt60 D:
     
  2. MrMagic

    MrMagic MDL Guru

    Feb 13, 2012
    6,011
    4,153
    210
    Is the last part for making flashdrives with 32bit ISOs on 64bit host machines or vice versa ?

    I've never had to do the last bit
     
  3. S_A_S

    S_A_S MDL Member

    Oct 16, 2012
    236
    103
    10
    No, makes it bootable
     
  4. MrMagic

    MrMagic MDL Guru

    Feb 13, 2012
    6,011
    4,153
    210
    Makes it bootable without that part, like I say, I've never done that part and it's always booted fine
     
  5. S_A_S

    S_A_S MDL Member

    Oct 16, 2012
    236
    103
    10
    Than i have bootsector on stick for nothing :D

    Alway's did it that way with W7 too.
     
  6. MrMagic

    MrMagic MDL Guru

    Feb 13, 2012
    6,011
    4,153
    210
    I think the "Active" and "Assign" commands make it bootable, not sure exactly, but definitely doesn't need that last part :)
     
  7. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,228
    1,817
    90
    Assign just assigns a driveletter to the partition (or volume as windows calls it).
    Active marks a partition as active, meaning that BIOS will check this partition for boot info in it's bootsector. Non-active partitions will simply be ignored by the BIOS.
    But normally there should be put info into the bootsector as to what files to load as bootsector etc, and that's what bootsect.exe does. I don't know why you have been able to boot without it.
    Maybe you have UEFI and have only tried with x64 isos? Cause UEFI doesn't need the bootsector and can directly load an EFI bootfile from any partition, given it can read the filesystem.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. M0rriss0n

    M0rriss0n MDL Senior Member

    Sep 17, 2011
    317
    96
    10
    This is the way to go.
    Formatted to NTFS, not enough space left.
    Formatted to FAT32, the iso would fit.
    Difference = 46 Mb
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. S_A_S

    S_A_S MDL Member

    Oct 16, 2012
    236
    103
    10
    Yeah, no UEFI sh** for me, Legacy FTW.
     
  10. MrMagic

    MrMagic MDL Guru

    Feb 13, 2012
    6,011
    4,153
    210
    I do have UEFI now, but fairly sure the last time I did this, I just had a normal EFI BIOS, I've only had to use it a couple of times when MS Tool wouldn't work for whatever reason

    They would have been 64bit ISOs though yea
     
  11. jackmonter5

    jackmonter5 MDL Senior Member

    Jul 27, 2009
    480
    168
    10
    I integrated Netfx 3.5 into wim and deleted SXS folder. works great here.

    BTW you make the stick bootable by adding the active command in diskpart

    diskpart
    list disk
    select disk ?
    clean
    create partition primary
    active
    format fs=fat32 quick (use fs=ntfs for legacy/mbr)
    assign
    exit
     
  12. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,490
    2,495
    120
    #32 moderate, Sep 15, 2013
    Last edited by a moderator: Apr 20, 2017
    You can try something like this:

    1. Create C:\mount
    2. Create C:\ISO
    3. Copy content of ISO to C:\ISO
    4. Execute this:

    Code:
    @ECHO OFF
    
    DISM /Mount-Wim /WimFile:C:\ISO\sources\install.wim /index:1 /MountDir:C:\mount
    DISM /Export-Image /SourceImageFile:C:\mount\Windows\System32\Recovery\winre.wim /SourceIndex:1 /DestinationImageFile:C:\mount\Windows\System32\Recovery\winre2.wim /Compress:max /Bootable
    DEL /S /F /Q C:\mount\Windows\System32\Recovery\winre.wim
    REN C:\mount\Windows\System32\Recovery\winre2.wim winre.wim
    Dism /unmount-WIM /MountDir:C:\mount /Commit
    
    DISM /Export-Image /SourceImageFile:C:\ISO\sources\install.wim /SourceIndex:1 /DestinationImageFile:C:\ISO\sources\install2.wim /Compress:max
    DEL /S /F /Q C:\ISO\sources\install.wim
    REN C:\ISO\sources\install2.wim install.wim
    
    DISM /Export-Image /SourceImageFile:C:\ISO\sources\boot.wim /SourceIndex:1 /DestinationImageFile:C:\ISO\sources\boot2.wim /Compress:max /Bootable
    DISM /Export-Image /SourceImageFile:C:\ISO\sources\boot.wim /SourceIndex:2 /DestinationImageFile:C:\ISO\sources\boot2.wim /Compress:max /Bootable
    DEL /S /F /Q C:\ISO\sources\boot.wim
    REN C:\ISO\sources\boot2.wim boot.wim
    
     
  13. MrMagic

    MrMagic MDL Guru

    Feb 13, 2012
    6,011
    4,153
    210
    Aren't there a load of files you can delete from the sources folder if you are performing a clean install only ?
     
  14. Tito

    Tito Admin / Adviser
    Staff Member

    Nov 30, 2009
    18,954
    19,468
    340
    #34 Tito, Sep 15, 2013
    Last edited by a moderator: Apr 20, 2017
    Its the last necessary step:
    Code:
    bootsect.exe /nt60 X:
     
  15. pisthai

    pisthai Imperfect Human

    Jul 29, 2009
    7,202
    2,271
    240
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. LQQL

    LQQL MDL Addicted

    Apr 21, 2009
    772
    122
    30
    Well, problem got solved by me deleting efi folder from ISO per Ultra ISO and finally I got it on my so called 4gig flash drive...

    Figured I don't really need an efi folder because I don't have any UEFI at all. ;]
     
  17. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,432
    11,763
    240
    #37 murphy78, Sep 15, 2013
    Last edited by a moderator: Apr 20, 2017
    I've been using a new loop, thx to a post CODYQX4 made quite a while ago, and rrohela bringing to my attention the install.esd recovery compression:
    Code:
    for /l %%x in (1, 1, 7) do (
    dism /export-image /sourceimagefile:c:\win81x86\sources\install.wim /sourceindex:%%x /destinationimagefile:c:\win81x86\sources\install.esd /compress:recovery
    )
    del /q /s c:\win81x86\sources\install.wim
    Replace the 7 with however many indexes you want from the original install.wim
    Also replace the c:\win81x86 folder name with whatever you use. I just happen to use that so I don't lose track.

    install.esd files using recovery compression are MUCH smaller and both win8.0 and win8.1 setup files can read them.

    Note: you need 8.1 preview adk, 8.1 final adk, or 8.1 rtm dism to do this.