Create UEFI-based Hard-Disk Partitions by Using Windows SIM
Applies To: Windows 7, Windows Server 2008 R2
Note
This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.
This topic describes how to configure disk partitions for a Unified Extensible Firmware Interface (UEFI)-based computer.
In this topic:
Plan Your Partition Structure
To prepare the hard disks
To create the partitions
To modify the partitions
To identify the Windows partition
XML Example
Plan Your Partition Structure
Plan your partition structure using information from the topic: Understanding Disk Partitions.
For examples of partition structures, see Recommended UEFI-Based Disk-Partition Configurations.
In your plan, include details such as the Type, Order, and PartitionID of each partition. You will need these details to complete your partition structure, as explained later in this document.
To prepare the hard disks
In this section, you identify each of the hard disks you will be using on your system.
Open Windows System Image Manager (Windows SIM), and open an answer file.
Add the setting
Microsoft-Windows-Setup\DiskConfiguration\Disk
to the windowsPE configuration pass.For each additional hard disk, right-click DiskConfiguration, and select Insert New Disk.
For each disk, set
DiskID
. The first hard disk has the value of 0 (zero), the second has the value of 1, and so on.For each disk, set
WillWipeDisk
totrue
.
To create the partitions
In this section, you create the partition structure.
Add the settingMicrosoft-Windows-Setup
\DiskConfiguration\Disk\CreatePartitions
to the windowsPE configuration pass.Right-click CreatePartitions, and select CreatePartition. Repeat this step for each partition.
In the
CreatePartition
setting, add anOrder
value for each partition. The first partition on a disk has the value of 1, the second, 2, and so on.In
CreatePartition
, specify the type of each partition.Set the EFI System Partition (ESP) as
Type=EFI
.Set the Microsoft Reserved partition (MSR) as
Type=MSR
.Set other partitions as
Type=Primary
.
In
CreatePartition
, configure the size of the partitions. Use eitherSize=<size>
orExtend=True
for each partition; do not use both.Use
Size
to specify the partition size in megabytes. For example: 15000.For the last primary partition, use
Extend = True
to instruct Windows Setup to set the partition to fill the remainder of the hard disk.
To modify the partitions
In this section, you modify the partitions.
Add the setting Microsoft-Windows-Setup
\DiskConfiguration\Disk\ModifyPartitions
to the windowsPE configuration pass.Right-click ModifyPartitions, and select ModifyPartition. Repeat this step for each partition you want to modify.
Note
Add a ModifyPartition
element for every partition. With this structure, you can use the same values for CreatePartition\Order
, ModifyPartition\Order
, and PartitionID
.
In
ModifyPartition
, useOrder
to specify a sequence that partition modifications will follow. The first partition modification has the value of 1, the second, 2, and so on.In
ModifyPartition
, usePartitionID
to identify each partition. ThePartitionID
value will be the same as theCreatePartition | Order
value.In
ModifyPartition
, useLabel
to label to each primary partition.In
ModifyPartition
, useLetter
to specify drive letters for Windows and data partitions. For the Windows partition, we recommend usingLetter = C
. If you do not specify a letter, the default setting is the first available letter from C through Z.
To identify the Windows partition
In this section, you identify a single partition where Windows will be installed.
In the setting Microsoft-Windows-Setup
\ImageInstall\OSImage
, either clear the componentInstallToAvailablePartition
, or set it toFalse
.Add the setting Microsoft-Windows-Setup
\ImageInstall\OSImage\InstallTo
.In
InstallTo
, setDiskID
to the hard disk where you want to install Windows.In
InstallTo
, setPartitionID
to the partition where you want to install Windows.
XML Example
Default Configuration
The following diagram and XML output show the Autounattend.xml disk configuration settings for a system with the default configuration: a system partition, an MSR partition, and a Windows partition.
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- EFI system partition (ESP) -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>EFI</Type>
<Size>100</Size>
</CreatePartition>
<!-- Microsoft reserved partition (MSR) -->
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>MSR</Type>
<Size>128</Size>
</CreatePartition>
<!-- Windows partition -->
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- EFI system partition (ESP) -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>System</Label>
<Format>FAT32</Format>
</ModifyPartition>
<!-- MSR partition does not need to be modified -->
<!-- Windows partition -->
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>3</PartitionID>
<Label>Windows</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>3</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
The following diagram and XML output show the Autounattend.xml disk configuration settings for a system with the recommended configuration: a Windows RE tools partition, a system partition, an MSR partition, and a recovery image partition.
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- WinRE tools partition -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>300</Size>
</CreatePartition>
<!-- EFI system partition (ESP) -->
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>EFI</Type>
<Size>100</Size>
</CreatePartition>
<!-- Microsoft reserved partition (MSR) -->
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>MSR</Type>
<Size>128</Size>
</CreatePartition>
<!-- Windows partition -->
<CreatePartition wcm:action="add">
<Order>4</Order>
<Type>Primary</Type>
<Size>75000</Size>
</CreatePartition>
<!-- Recovery image partition -->
<CreatePartition wcm:action="add">
<Order>5</Order>
<Type>Primary</Type>
<Size>15000</Size>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- WinRE tools partition -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>WinRE</Label>
<Format>NTFS</Format>
<TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
</ModifyPartition>
<!-- EFI system partition (ESP) -->
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Label>System</Label>
<Format>FAT32</Format>
</ModifyPartition>
<!-- MSR partition does not need to be modified -->
<Order>3</Order>
<PartitionID>3</PartitionID>
<!-- Windows partition -->
<ModifyPartition wcm:action="add">
<Order>4</Order>
<PartitionID>4</PartitionID>
<Label>Windows</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
</ModifyPartition>
<!—Recovery image partition -->
<ModifyPartition wcm:action="add">
<Order>5</Order>
<PartitionID>5</PartitionID>
<Label>Recovery image</Label>
<Format>NTFS</Format>
<TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>4</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>