Active (microsoft-windows-setup-diskconfiguration-disk-modifypartitions-modifypartition-active)

Active specifies whether to mark the partition as active. On a BIOS-based system, the active partition is the partition the system will boot to. This partition must be a primary partition.

On a Unified Extensible Firmware Interface (UEFI)-based system, this setting is not used. The system will always boot to the EFI System Partition (ESP). If Active is set for this partition type, it is ignored.

Only one active partition can be set on a hard disk. If an active partition already exists on the disk when this setting is changed to true, the existing active setting is removed and the selected partition is marked as active.

Only primary partitions can be marked as active. If Active is set for other partition types, the setting is ignored.

Values

true

Marks the partition as active.

false

Does not mark the partition as active.

Valid Configuration Passes

windowsPE

Parent Hierarchy

microsoft-windows-setup- | DiskConfiguration | Disk | ModifyPartitions | ModifyPartition | Active

Applies To

For a list of the supported Windows editions and architectures that this component supports, see microsoft-windows-setup-.

XML Example

The following XML output for the DiskConfiguration setting shows how to set the first partition as the active partition.

<DiskConfiguration>

  <Disk wcm:action="add">
    <DiskID>0</DiskID> 
    <WillWipeDisk>true</WillWipeDisk> 
    <CreatePartitions>

      <!-- System partition -->
      <CreatePartition wcm:action="add">
        <Order>1</Order> 
        <Type>Primary</Type> 
        <Size>300</Size> 
      </CreatePartition>

      <!-- Windows partition -->
      <CreatePartition wcm:action="add">
        <Order>2</Order> 
        <Type>Primary</Type> 
        <Extend>true</Extend> 
      </CreatePartition>

    </CreatePartitions>
    <ModifyPartitions>

      <!-- System partition -->
      <ModifyPartition wcm:action="add">
        <Order>1</Order> 
        <PartitionID>1</PartitionID> 
        <Label>System</Label>
        <Format>NTFS</Format> 
        <Active>true</Active> 
      </ModifyPartition>

      <!-- Windows partition -->
      <ModifyPartition wcm:action="add">
        <Order>2</Order> 
        <PartitionID>2</PartitionID> 
        <Label>Windows</Label> 
        <Letter>C</Letter> 
        <Format>NTFS</Format> 
      </ModifyPartition>
    </ModifyPartitions>
  </Disk>


  <WillShowUI>OnError</WillShowUI> 
</DiskConfiguration>


<ImageInstall>
  <OSImage>
    <InstallTo>
      <DiskID>0</DiskID> 
      <PartitionID>2</PartitionID> 
    </InstallTo>
  </OSImage>
</ImageInstall>

For full XML examples and recommended partition configurations, see How to Configure UEFI/GPT-Based Hard Disk Partitions or How to Configure BIOS/MBR-Based Hard Disk Partitions.

ModifyPartition