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="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> <InputLocale>en-US</InputLocale> <SystemLocale>en-US</SystemLocale> <UILanguage>en-US</UILanguage> <UserLocale>en-US</UserLocale> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>550</Size> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Extend>true</Extend> <Order>3</Order> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>2</Order> <Size>102500</Size> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Active>true</Active> <Format>NTFS</Format> <Label>System Reserved</Label> <Order>1</Order> <PartitionID>1</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Format>NTFS</Format> <Label>Local Disk</Label> <Letter>D</Letter> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Format>NTFS</Format> <Label>Windows</Label> <Letter>C</Letter> <Order>2</Order> <PartitionID>2</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> <WillShowUI>OnError</WillShowUI> </DiskConfiguration> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>2</PartitionID> </InstallTo> </OSImage> </ImageInstall> <UserData> <ProductKey> <Key>xxx-xxx-xxx-xxx</Key> </ProductKey> <AcceptEula>true</AcceptEula> <Organization>xyz</Organization> </UserData> </component> </settings> <settings pass="oobeSystem">
-
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.
-
@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 -
@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)