Jump to content


  • 0
anyweb

how can I configure the hard disc using Windows SIM

Question

Add component to Answer File

 

start up Windows SIM and select Microsoft-Windows-Setup from the choices in the Components section of Windows Image. Expand DiskConfiguration and then right-click on Disk and choose Add Setting to Pass 1 windowsPE

 

diskconfiguration.jpg

 

set the DiskID to "0" in properties

 

diskid.jpg

 

Note: if you try to deploy and get an error message stating Windows could not create a partition on disk 0. The error occurred while applying the unattend answer file's <DiskConfiguration> setting. Error Code:0x80004005 then set the WillWipeDisk to true

 

willwipedisk.jpg

 

 

Partition the hard disc

 

Now we want to partition the hard disk to be 40GB in size so add the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition component to the windowsPE pass.

 

diskcreatepartition.jpg

 

set the properties to order=1, size=40000 and type=primary

 

40gb.jpg

 

 

Mark as active and format with NTFS

 

Add the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition node to the windowsPE pass

 

modifypartition.jpg

 

edit your settings like this, make sure to set order and partition ID or this will not work...

 

partitionsettings.jpg

 

 

Tell Windows where to install to

 

Now that we've got our hard disc sorted we need to tell Windows where to install to, so add the Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo node to the windowsPE configuration pass

 

installto.jpg

 

set the DiskID to 0 and PartitionID to 1

 

imageinstall.jpg

 

 

 

Add more partitions

 

If you want to add more partitions you can do so as follows:

 

Right-click on CreatePartitions and choose Insert New CreatePartition

 

create_new_partitions.jpg

 

when the properties screen appears, fill in the values for Order, Size and Type (do not set Extend to True if Size is set to a value)

 

order_size_and_type.jpg

 

Now that we have created our new partition, you need to modify it, so right click on ModifyPartitions and choose Insert New Modify Parition

 

modeify_partition.jpg

 

make your changes to the properties paying close attention to the Order and PartitionID values otherwise the deployment won't work

 

partitionid.jpg

 

validate your answer file by clicking on the validate button

 

here's some sample (working) code from an XML file i've made, in this sample it makes 3 partitions, C, D, and E, C is for the Os, D for Data and E for other.

 

  <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">
				<ModifyPartitions>
					<ModifyPartition wcm:action="add">
						<Active>true</Active>
						<Format>NTFS</Format>
						<Label>OS</Label>
						<Order>1</Order>
						<PartitionID>1</PartitionID>
						<Letter>C</Letter>
					</ModifyPartition>
					<ModifyPartition wcm:action="add">
						<Format>NTFS</Format>
						<Label>data</Label>
						<Letter>D</Letter>
						<Order>2</Order>
						<PartitionID>2</PartitionID>
					</ModifyPartition>
					<ModifyPartition wcm:action="add">
						<Format>NTFS</Format>
						<Label>other</Label>
						<Letter>E</Letter>
						<Order>3</Order>
						<PartitionID>3</PartitionID>
					</ModifyPartition>
				</ModifyPartitions>
				<DiskID>0</DiskID>
				<CreatePartitions>
					<CreatePartition wcm:action="add">
						<Order>1</Order>
						<Size>40000</Size>
						<Type>Primary</Type>
					</CreatePartition>
					<CreatePartition wcm:action="add">
						<Order>2</Order>
						<Size>30000</Size>
						<Type>Primary</Type>
					</CreatePartition>
					<CreatePartition wcm:action="add">
						<Order>3</Order>
						<Size>100</Size>
						<Type>Primary</Type>
					</CreatePartition>
				</CreatePartitions>
				<WillWipeDisk>true</WillWipeDisk>
			</Disk>
		</DiskConfiguration>
		<ImageInstall>
			<OSImage>
				<InstallTo>
					<DiskID>0</DiskID>
					<PartitionID>1</PartitionID>
				</InstallTo>
				<InstallFrom>
					<MetaData wcm:action="add">
						<Value>Windows Longhorn SERVERENTERPRISE</Value>
						<Key>/IMAGE/NAME</Key>
					</MetaData>
				</InstallFrom>
			</OSImage>
		</ImageInstall>
		<UserData>
			<AcceptEula>true</AcceptEula>
			<FullName>windows-noob</FullName>
			<Organization>windows-noob</Organization>
		</UserData>
		<UseConfigurationSet>true</UseConfigurationSet>
	</component>

 

once the deployment is complete, you can see your partitions listed in Explorer

 

cde.jpg

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi anyweb,

 

Once again great tutorials. One question tho about partitioning HDD via WSIM, how can you do this with XP images? the problem I have is that I have to deploy two images, one that has one big partition, while another has two partitions in it. I know you can use the unattended.xml files and create a different one for each image, but this only seems to work for Vista images and not XP ones. If there is another way of doing this or is this only possible with Vista images?

If I am missing a step some-where please let me know? I am so close to fully deploying things with WDS that it would be a shame to have to go back to some other imaging software.

 

Thanks in advance.... ;)

Share this post


Link to post
Share on other sites

  • 0

Is there a way of formating the whole HDD with WSIM? so that we only have one partition. The reason I ask is that the PC's we want to image have already 3 partitions on them and if you select the wrong one, WDS goes belly up!... any assistance would be greatly appreciated :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.