Windows 7 and Server 2008 R2 SP1 Slipstream Guide (manually - no rt7lite)

Discussion in 'Windows 7' started by Stannieman, Dec 26, 2011.

  1. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Reserved: Building WinPE for Windows Vista and Server 2008.
    Still has to be done.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Building WinPE images for Windows 7 SP1 and Server 2008 R2 SP1

    We won't start from a barebone WinPE here. The reason is that the WinPE-SRT-Package is not included in the WAIK. Therefore we start from a boot.wim that has that package already in it. Because we don't start from a barebone WinPE now you we only need to change the languages and one package if required, and nothing else.

    The steps in blue are only required if you are slipstreaming an ISO with a language other than English (EN-US).



    First we're going to service index 1 of boot.wim.
    Mount index 1 with the command:
    C:\slip\tools\Dism.exe /mount-wim /wimfile:C:\slip\yyyWINPE7601\boot.wim /index:1 /mountdir:C:\slip\yyyWINPE7601 /mount
    List all packages that are installed with the command:
    C:\slip\tools\Dism.exe /image:C:\slip\yyyWINPE7601\mount /get-packages
    Now remove all packages that have en-US in their name with the command:
    C:\slip\tools\Dism.exe /image:C:\slip\yyyWINPE7601\mount /remove-package /packagename:pACKAGENAME
    Replace PACKAGENAME with the names you see after the previous command, for example:
    /packagename:Microsoft-Windows-WinPE-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~6.1.7601.17514
    Remember to remove only those with en-US in the name.

    Now add all the language packages for your language:
    C:\slip\tools\Dism.exe /image:C:\slip\yyyWINPE7601\mount /add-package /packagepath:C:\slip\yyyWINPE7601\packages\LN-LN\PACKAGENAME.CAB
    Replace PACKAGENAME.CAB with he following names:
    LP_LN-LN.CAB
    WINPE-SCRIPTING_LN-LN.CAB
    WINPE-SRT_LN-LN.CAB
    WINPE-WDS-TOOLS_LN-LN.CAB
    WINPE-WMI_LN-LN.CAB

    Replace every LN-LN with your desired language ID, for example NL-NL for Dutch, FR-FR for French, ...
    You also may want to add some of the WINPE-FONTSUPPORT-LN-LN.CAB packages dependent of what your language is. They are directly in the packages directory and not in a separate LN-LN directory.

    Now you can unmount index 1:
    C:\slip\tools\Dism.exe /unmount-wim /mountdir:C:\slip\yyyWINPE7601\mount /commit



    Ok now it's time for index 2 of boot.wim to be serviced.
    This is equivalent to the update of index 1, but different in these few things.
    To mount you need to use /index:2 instead of /index:1.

    If you are slipstreaming a Server 2008 R2 ISO, also remove all the packages with WinPE-Setup-Client-Package in the name (if any). Then make sure the WinPE-Setup-Server-Package package is added, if it isn't already you can add it like the other packages. It's located directly in the packages folder, not in an LN-LN folder.
    If you are slipstreaming a Windows 7 ISO, also remove all the packages with WinPE-Setup-Server-Package in the name (if any). Then make sure the WinPE-Setup-Client-Package package is added, if it isn't already you can add it like the other packages. It's located directly in the packages folder, not in an LN-LN folder.

    You also need to add the following additional language packages:
    WINPE-SETUP_LN-LN.CAB

    WINPE-SETUP-CLIENT_LN-LN.CAB
    (Only for client versions)
    WINPE-SETUP-SERVER_LN-LN.CAB (Only for server versions)

    Index 2 requires additional care for the language settings:
    C:\slip\tools\Dism.exe /image:C:\slip\yyyWINPE7601\mount /Set-AllIntl:ln-LN




    In the big Windows image itself there is also a recovery image named winRE.wim. Microsoft made it easy for us, as it's an exact copy of index 2 of boot.wim.
    To extract it, use the command:
    C:\slip\tools\imagex.exe /export C:\slip\yyyWINPE7601\boot.wim 2 C:\slip\yyyWINPE7601\winRE.wim /check /verify
    There is however one slight difference: the image name and description. To change these use the following command:
    C:\slip\tools\imagex.exe /info C:\slip\yyyWINPE7601\winRE.wim 1 "Microsoft Recovery Environment (yyy)" "Microsoft Windows Recovery Environment (yyy)"
    Again replace yyy with your architecture, being x86, x64 or ia64.

    Now to reduct the size of boot.wim a bit we can also export that one:
    C:\slip\tools\imagex.exe /export C:\slip\yyyWINPE7601\boot.wim * C:\slip\yyyWINPE7601\boot2.wim /check /verify
    Now remove boot.wim and rename boot2.wim to boot.wim.



    Congratulations, you just completed the most boring part: updating setup and Recovery Environment files, all relatively small changes compared to the big Service Pack slipstream!
    You can now return to the first post.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Reserved: Integrating SP1 into a Windows Vista RTM image.
    Still has to be done.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Reserved: Integrating SP2 into a Windows Vista SP1 or Server 2008 RTM (SP1 equivalent) image.
    Still has to be done.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Integrating SP1 into a Windows 7 RTM or Server 2008 R2 RTM image

    Ok Now we're ready for the big trick. First of all extract the Service Pack to the spextract directory. That's not to hard to do, just use the command:
    C:\slip\SP1.exe -xC:\slip\spextract
    and point it to the spextract directory.
    There is no indication about when it's finished, so I suggest watching your HDD led to guess when the extraction has finished.
    In spextract you'll now find a bunch of folders and files, we are interested in windows6.1-KB976932-yyy.cab (the biggest file in there), that's the one that contains the Service Pack files.
    Extract the cab file to the cabextract directory with the command:
    expand C:\slip\spextract\windows6.1-KB976932-yyy.cab C:\slip\cabextract -F:*
    Again don't forget to replace yyy with your architecture.
    The extraction can take a while as it's a pretty large amount of data that's being extracted. Once the extraction of the cabinet is complete, you can remove the spextract directory as we don't need it anymore. Alternatively you can use your favourite archive manager (7-Zip, WinRAR, WinZip, ...) instead of the expand command to extract the files.



    In cabextract you should find some other cab files:
    KB976933-LangsCabX.cab, where X is a number. How many LangsCab files you have depends on which languages are included in the Service Pack you downloaded.
    NestedMPPContent.cab
    Extract all the cab files again to C:\slip\cabextract. This time don't use the expand command. The reason is that I'm not sure if expand actually overwrites files that already exist, and overwriting is preferred. Therefore open each file with your favourite archive manager. Don't worry if you don't have an archive manager installed, Windows Explorer can also open them.
    Overwrite any files if asked. Extract the LangsCab files first in the correct numerical order, then extract NestedMppContent.cab.
    I think that for the LangsCab files it's enough to only extract the one that contains your language, but to avoid weird problems just take the time to extract them all.
    After extraction delete all the LangsCab files and NestedMppContent.cab.



    Now you need to find three files that need to be modified.
    The first one is update.ses, so open that file with notepad. You'll see four sections. In the section <Tasks operationMode="OfflineInstall"> there is somewhere targetState="Absent". Of course we don't want the Service Pack to be absent after it's slipstreamed, therefore change the word Absent to Installed.
    Also open update.mum in notepad. At the bottom there is allowedOffline="false". We want to allow it offline, so change false to true.
    The last file to open in notepad is Windows7SP1-KB976933~31bf3856ad364e35~yyy~6.1.1.17514.mum. Just as with update.mum you must set allowedOffline="false" to true at the bottom of the file. Please note the yyy!



    The time has come to mount install.wim. First you need to know that install.wim is actually made out of multiple images, and that each sub image is identified by a name and index number. Remember that also boot.wim had an index 1 and index 2, and thus has two images in it. Each index of install.wim represents an edition. For example Windows 7 x64 has four of them (Home Basic, Home Premium, Professional and Ultimate). The number varies per architecture. The same goes for Server 2008 R2.
    If you want all the editions to be updated to SP1, you need to update all the indexes separately, otherwise only one edition will end up having SP1 in it. If you need only one edition however you can update only that one, and leave all the other editions which you'll never use out of the final install.wim. For example if you'll only ever need Ultimate, just update the Ultimate index and remove all other editions afterwards.
    How to remove them will be explained later on.

    You should have already copied the to be updated install.wim to C:\slip.
    Now run the command:
    C:\slip\tools\Dism.exe /get-wiminfo /wimfile:C:\slip\install.wim
    It returns a list of all indexes and a description of what product and edition is in every index.

    For each index that you want to update you need to do the steps in blue.

    Mount the index using:
    C:\slip\tools\Dism.exe /mount-wim /wimfile:C:\slip\install.wim /index:X /mountidr:C:\slip\mount
    Replace X with the desired index number.
    Apply the Service Pack to the mounted image:
    C:\slip\tools\Dism.exe /image:C:\slip\mount /add-package /packagepath:C:\slip\cabextract
    This can take a while as the Service Pack is pretty big, but this is the actual slipstreaming process so any patience will be rewarded with an updated Windows version! It could look like it hangs at 100%, this is not the case so let it run in peace.
    As you might know Microsoft released media refresh versions of integrated SP1 media on MSDN. These versions include a hotfix which fixes a bug that occurs in the OOBE if you want non-ascii characters in the computer name. This hotfix is available from Microsoft upon request only. Don't worry, I requested it and it's included in the yyyWINPE7601 folder.
    So to get your ISO on the same level as Microsoft's medie refresh release, add this hotfix with the command (this only applies to client versions, server versions don't need the hotfix):
    C:\slip\tools\Dism.exe /image:C:\slip\mount /add-package /packagepath:C:\slip\yyyWINE7601\KB2534111.msu
    The last thing in the image that needs to be updated is the Microsoft Recovery Environment.
    Replace C:\slip\mount\Windows\System32\Recovery\winRE.wim with the winRE.wim you created previously. Make sure to copy the new winRE.wim and not move it, you'll need winRE.wim again to update the other indexes.
    That was it! Unmount the the index using:
    C:\slip\tools\Dism.exe /unmount-wim /mountdir:C:\slip\mount /commit




    Now you have an install.wim that's fully updated, but is a bit bloated. This is because there are some things which have become redundant that weren't removed. To remove them we'll export the image just like we have done with boot.wim.
    If you have integrated SP1 in all of the indexes, just export all indexes at once:
    C:\slip\tools\imagex.exe /export C:\slip\install.wim * C:\slip\install2.wim
    If you have updated only some of the indexes you need to export the updated indexes one by one, in the correct numerical order. For each desired index run:
    C:\slip\tools\imagex.exe /export C:\slip\install.wim X C:\slip\install2.wim /check /verify
    Replace X with the index number to be added.
    Remove install.wim and rename install2.wim to install.wim.


    You're now ready to rebuild your updated ISO! Return to the point where you came from in the first post.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Reserved: Building WinPE images for Windows 7 SP2 and Server 2008 R2 SP2.
    If a new WAIK will be made for Windows 7 SP2 and Server 2008 R2 SP2, the method to build WinPE images will be posted here. It'll probably be equivalent with SP1.
    Still has to be done/waiting for SP2.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Reserved: Integrating SP2 into a Windows 7 SP1 or Server 2008 R2 SP1 image.
    If it's doable the method will be posted here
    Still has to be done/waiting for SP2.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Reserved: Building WinPE images for Windows 8 SP1 and Server 8 R2 SP1.
    It's still far away but if it's possible the method for building WinPE images for SP1 will be posted here.
    Still has to be done/waiting for Windows 8 and Server 8 and afterwards SP1.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    Reserved: Integrating SP1 into a Windows 8 SP1 or Server 8 SP1 image.
    If it's doable the method will be posted here
    Still has to be done/waiting for Windows 8 and Server 8 and afterwards SP1.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. OldMX

    OldMX MDL Addicted

    Jul 30, 2009
    538
    229
    30
    Awesome, thanks a lot Stannieman :)