IThastobecool.com Geeks have opinions too!

2Nov/0917

Creating a custom boot image for SCCM SP2 (WinPE 3.0)

Today I had to recreate my x86 boot image in my SCCM environment. I had just upgraded my testserver to SCCM SP2 and found that the old way of creating a boot image didn’t work anymore… seeing as SCCM SP2 uses DISM.exe instead of imagex and peimg. So I went looking for instructions on creating a custom SCCM SP2 image, but couldn’t found any, so here are the instructions :) .

1. Start the Deployment Tools Command prompt and enter the following command:

COPYPE.CMD x86 1 c:\WINPE

When you're working on a 64-bit WinPE image use "amd64" instead of "x86"

2. Mount the winpe.wim file to the mount dir that’s created automatically:

DISM /Mount-Wim /WIMFile:c:\winpe\winpe.wim /Index:1 /MountDir:C:\winpe\mount

3. Add the packages required by SCCM to the wim (again, if you’re working on 64-bit Windows PE substitute "x86" with "amd64")

DISM /Image:c:\winpe\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-scripting.cab”

DISM /Image:c:\winpe\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab”

After this step you can continue adding packages (such as winpe-hta.cab and winpe-mdac.cab) or custom files to the boot image. The 2 packages worked out above (Scripting and WMI) are required by SCCM, without these packages you will receive an error during updating your boot image to the distribution points.

4. Commit the changes to the WIM and unmount the WIM

DISM /Unmount-Wim /Mountdir:c:\winpe\mount /commit             (thank you for the correction Matt!, It appears as if I was quite sleepy when I wrote this post ;) )

5. Import your custom boot image into SCCM.

That’s it, just as simple as it was with the previous version of WAIK, only different commands :)

Comments (17) Trackbacks (3)
  1. Great Article – Only two things that are off.

    - When you do an x64 image you need to substitute “amd64″ in the commands rather than “x64″ as mentioned.

    - The command in step 4 should read: DISM /Unmount-Wim /MountDir:c:\winpe\mount /commit

  2. Thanks Matt :)
    Whoops sleepy me I guess :) . Thanks for pointing this out Matt!!!

  3. Followed this step by step. Got success with every step. Boot image still fails when adding to SCCM Boot Images. I dont know what gives. Next step is to start over with a clean install of SCCM and try the defaults again. The defaults worked the first time. When I deleted the boot images from SCCM it never let me use the defaults again.

  4. Can we not just use the prebuilt WIMs that come with SCCM SP2? They are installed to Program Files\Microsoft Configuration Manager\OSD\boot\i386.

  5. Hi Matt,

    I’m trying to inject drives to my offline boot.wim for windows 2008 server (32bit).
    DISM gives out error message.
    Error Log:
    2010-03-18 12:17:20, Info DISM DISM.EXE:
    2010-03-18 12:17:20, Info DISM DISM.EXE:
    2010-03-18 12:17:20, Info DISM DISM.EXE: Host machine information: OS Version=6.0.6001, Running architecture=x86, Number of processors=4
    2010-03-18 12:17:20, Info DISM DISM.EXE: Executing command line: Dism /SysDriveDir /?
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Getting the collection of providers from a local provider store type. – CDISMProviderStore::GetProviderCollection
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Provider has not previously been encountered. Attempting to initialize the provider. – CDISMProviderStore::Internal_GetProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Loading Provider from location C:\Program Files\Windows AIK\Tools\x86\Servicing\WimProvider.dll – CDISMProviderStore::Internal_GetProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Connecting to the provider located at C:\Program Files\Windows AIK\Tools\x86\Servicing\WimProvider.dll. – CDISMProviderStore::Internal_LoadProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Provider has not previously been encountered. Attempting to initialize the provider. – CDISMProviderStore::Internal_GetProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Loading Provider from location C:\Program Files\Windows AIK\Tools\x86\Servicing\FolderProvider.dll – CDISMProviderStore::Internal_GetProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Connecting to the provider located at C:\Program Files\Windows AIK\Tools\x86\Servicing\FolderProvider.dll. – CDISMProviderStore::Internal_LoadProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Provider has not previously been encountered. Attempting to initialize the provider. – CDISMProviderStore::Internal_GetProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Loading Provider from location C:\Program Files\Windows AIK\Tools\x86\Servicing\CompatProvider.dll – CDISMProviderStore::Internal_GetProvider
    2010-03-18 12:17:20, Info DISM DISM Provider Store: PID=3760 Connecting to the provider located at C:\Program Files\Windows AIK\Tools\x86\Servicing\CompatProvider.dll. – CDISMProviderStore::Internal_LoadProvider
    2010-03-18 12:17:20, Info DISM DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
    2010-03-18 12:17:20, Info DISM DISM.EXE: Attempting to add the commands from provider: WimManager
    2010-03-18 12:17:20, Info DISM DISM.EXE: Getting the help information collection for the provider: WimManager.
    2010-03-18 12:17:20, Info DISM DISM.EXE: Registering information from the help collection from provider: WimManager.
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(wimcommands) and category(localtoplevelhelp) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(cleanup-wim) and category(wimcommands) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(remount-wim) and category(wimcommands) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(mount-wim) and category(wimcommands) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(unmount-wim) and category(wimcommands) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(commit-wim) and category(wimcommands) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(get-wiminfo) and category(wimcommands) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Succesfully registered the Help Item with topic(get-mountedwiminfo) and category(wimcommands) for the provider(WimManager).
    2010-03-18 12:17:20, Info DISM DISM.EXE: Attempting to add the commands from provider: FolderManager
    2010-03-18 12:17:20, Info DISM DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
    2010-03-18 12:17:20, Info DISM DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
    2010-03-18 12:17:20, Info DISM DISM.EXE: Getting the help information collection for the provider: Compatibility Manager.
    2010-03-18 12:17:21, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
    2010-03-18 12:17:21, Info DISM DISM.EXE:
    2010-03-18 12:17:21, Info DISM DISM.EXE:

    Can you help inject drives….?

    Regards
    Natesh

  6. Try this

    First mount the image to a dir.

    Dism.exe /mount-wim /wimfile:”C:\Temp\Lite Touch Windows PE.WIM” /index:1 /mountdir:”C:\Temp\mount”

    then inject the drivers

    dism /image:”C:\Temp\mount” /add-driver /driver:”C:\Temp\source\drivers\driver.inf /forceunsigned

  7. Henk,

    Cant be sleeping or dreaming if writing tech doc.

  8. How can I add the amCLI command to the boot.wim. This is to enable me to configure the RAID via SCCM on a Fujitsu server. Or does anyone know of another way? Thanks

  9. Thank you for the guide! Perhaps you could tell me what I am doing wrong. I am on step 3 adding the packages. When I run the command you posted it fails (i’ve read this is because DISM does not support spaces in the path names) so I copied the packages to a folder called C:\winpecabs and tried running it from there only to see an error in my command window saying it cannot find the path specified. I look in the DISM log to find the below.

    2010-05-21 16:09:48, Error DISM DISM Package Manager: PID=6244 Incorrect parameter C:\winpe\C:\winpecabs\winpe-scripting.cab – path not found – CDISMPackageManager::Internal_CreatePackageByPath(hr:0×80070003)
    2010-05-21 16:09:48, Error DISM DISM Package Manager: PID=6244 Failed to get the underlying CBS package. – CDISMPackageManager::OpenPackageByPath(hr:0×80070003)
    2010-05-21 16:09:48, Error DISM DISM Package Manager: PID=6244 Failed to open the package at location: “C:\winpecabs\winpe-scripting.cab” – CPackageManagerCLIHandler::ProcessPackagePath(hr:0×80070003)
    2010-05-21 16:09:48, Error DISM DISM Package Manager: PID=6244 Failed while processing command add-package. – CPackageManagerCLIHandler::ExecuteCmdLine(hr:0×80070003)
    2010-05-21 16:09:48, Error DISM DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=80070003

    Has anyone figured this out? All of my boot images suddenly stopped working today with the system claiming they were not finalized. Any attempt to use a wim results in the same message so i wanted to try creating a custom one only to run into this >.<
    Thanks to anyone who can provide assistance!!!

  10. moments after i posted this i moved the files to C:\ just for fun…. sure enough it worked.
    Hopefully this helps someone else too.

  11. Dan,

    Could you tell me exactly what you did…I have the same problem since yesterday….and i can’t import boot images anymore claiming not to be finalyzed. After that I ran the PEIMG /PREP command and after that the import is working again. But after that I got problems when I want to sync the images to my distribution points….that failed….

  12. the trick was removing the “” from around the path. From what i read DISM does not support spaces in the path name. So i brought it down to C:\winpecabs\ and put the cab files in that folder and then i ran the command
    DISM /Image:c:\winpe\mount /Add-Package /PackagePath:C:\winpecabs\winpe-wmi.cab

    it will not work if you put quotes around the packagepath. That was my experience at least. ymmv

  13. Hi,

    I get the following on an Xp image

    Error: 50

    DISM does not support servicing a Windows Vista RTM or earlier operating system.

    any ideas?

  14. Well… it looks like you are trying to edit an XP image..
    The boot image is different from the Install image you are using.
    The steps provided here are for creating a custom boot image that you can import in SCCM SP2.

  15. Thanks for the reply. Yes this is an Xp image that I used to use on my RIS server, now I want to import it here but it keeps telling me it’s an invalid wim file.

  16. Well… the steps in this post are for creating a BOOT image for usage with SCCM.
    You are talking about an Operating System image. Which is an OS Install image.
    Try importing this one by right clicking Computer Management -> Operating System Deployment -> Operating System Images -> Add Operating System Image.


Leave a comment

(required)

*