SOLVED Multi partition Windows image, BIOS mode, with sysprep and unattend.xml

  • FOG 1.5.7 on Ubuntu 18.04 VM in VMware player.
    My case:

    • created a VM in VMware player with 30GB HDD and installed Windows 10 1803 with single partition
    • entered in Audit Mode
    • installed Windows ADK for 1803
    • installed software (apps, Office, VLC, etc.)
    • installed FOG-Client
    • created a folder on C:\customize\Win10\ to copy the Windows installation files and a Distribution folder
    • import the .wim to WSIM, select the Distribution folder
    • created an customize.xml using WSIM, validated, saved in C:\customize\
    • run sysprep.exe /generalize /oobe /shutdown /unattend:C:\customize\customize.xml
    • create a image in FOG server, having Image Type - Single Disk resizable, Image Manager - Partimage

    Now, sysprep runs fine, shuts VM down.
    Then I pxe fine, make Full host registration, I capture the image.

    Now, when I deploy this image to an HP client, with 500 GB HDD, I get only 2 partitions, the System and C.

    My question is, what I’ve missed not having the partitioning like in the unattend.xml file ?

    below is only the partitioning section from customize.xml

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="windowsPE">
            <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
            <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
                    <Disk wcm:action="add">
                            <CreatePartition wcm:action="add">
                            <CreatePartition wcm:action="add">
                            <CreatePartition wcm:action="add">
                            <ModifyPartition wcm:action="add">
                                <Label>System Reserved</Label>
                            <ModifyPartition wcm:action="add">
                                <Label>Local Disk</Label>
                            <ModifyPartition wcm:action="add">
        <settings pass="oobeSystem">
  • Moderator

    @VictorV I’m not 100% sure if this works, but you could try to make the partitions the relative percentage of size as to what you want and then capture as Resizable type image.

    If I’m not mistaken, it will try to resize those partitions according to their relative size.

    So if for example you have 😄 as 20GB of a 100GB disk and 😧 as 80GB of a 100GB disk, then it should come out as roughly 100GB for 😄 on a 500GB disk and 400GB for 😧

    Alternatively and perhaps more flexibly, you could make a non-Resizable image with just the 😄 partition and then include a SetupComplete script that automatically creates the new partition for you using diskpart.

    Or, if you are more comfortable/knowledgeable in Linux, you could also try to do the same as the above, but using FOG postdownloadscripts (scripts that run after deploying the image, but before reboot)

  • @Quazz what you suggest ? to create a VM with 500 GB and during Windows installation to create partitions C and D ?
    you might be correct, because I created another Windows VM, with 50 GB, split the C and D equally at Windows installation, captured with FOG having Image Type - Multiple partitions single disk non-resizable and … when I deployed this image to the client, I had C and D, …
    BUT, C:\ had 25Gig and D:\ 25 Gig, and another 450Gig unpartitioned space on HDD

  • Moderator

    Unattend files have multiple sections that describe a phase of the installation process.

    Creating partitions is one of the first things that happens for an installation.

    If you image after this part (eg in audit mode) then that has already taken place and will therefore not be ran at any point any more regardless of an unattend file.

    As a sidenote, we recommend using partclone as image manager.