<DiskConfig> and Sub-elements (Required)

2/16/2009

The <DiskConfig> element is required in every Windows Embedded POSReady 2009 answer file. Each sub-element of <DiskConfig> and its function is listed in this section.

Element Description

Disk

Specifies information about disk configuration. This element is required.

CreatePartition

Specifies information about how to create a new partition. Either this element or <ModifyPartition> is required.

ModifyPartition

Specifies information about how to modify an existing partition. Either this element or <CreatePartition> is required.

Sample <DiskConfig> Elements

<DiskConfig>
<!--This element contains information for prepopulating disk configuration settings-->
<Disk ID="0" WipeDisk="Yes">
<CreatePartition Label="Windows Partition" Size="3000" Letter="C" FileSystem="NTFS" AllocationUnit="1024" QuickFormat="Yes" FileCompression="Yes" />
</Disk>
</DiskConfig>

—or—

<DiskConfig>
<!--This section contains elements for pre-populating information about disk configuration settings-->
<Disk ID="0" WipeDisk="Yes">
<ModifyPartition ID="1" Label="System Partition" Letter="X" FileSystem="NTFS" AllocationUnit="1024" QuickFormat="Yes" FileCompression="Yes" />
</Disk>
</DiskConfig>

The &lt;Disk&gt; Element

Syntax:

<Disk ID="ID_Value" WipeDisk="Yes|No" />

ID_Value is the identification of the disk that is to be configured. This value must be an integer of 0 or larger.

WipeDisk="Yes" allows the POSReady installer to modify non-empty space on a disk; WipeDisk="No" prevents the POSReady installer from modifying non-empty space on a disk.

If WipeDisk is not specified and the <CreatePartition> element is specified, the POSReady installer checks whether the destination disk has unallocated space. If the disk has unallocated space, the installer creates partitions as specified in the <CreatePartition> element, starting on the first available contiguous unallocated space on the disk.

If WipeDisk="No", the <CreatePartition> element is missing, and the <ModifyPartition> element is present, the POSReady installer starts modifying the partitions specified.

If WipeDisk="Yes" and the <CreatePartition> element has no attributes, the POSReady installer will wipe the disk and create a single partition for the product to be installed on.

Example:

<Disk ID="O" WipeDisk="Yes" >
<CreatePartition />
</Disk>

The &lt;CreatePartition&gt; Element

You cannot create a partition size larger than 9,999,999,999,999 MB.

Syntax:

<CreatePartition Label="Partition_Name" Size="Size_in_MBs" Letter="Partition_Letter" FileSystem="File_System_Type" AllocationUnit="AllocationUnit_Integer" QuickFormat="Yes|No" FileCompression ="Yes|No" />

Partition_Name is the name of the partition. The name can contain any character except the asterisk (*), the single quotation mark ('), and the double quotation mark ("). To specify the default name ("New Volume {0}", where {0} is the first unused number), use an asterisk (*).

Size_in_MBs is the size of the partition in megabytes. This must be a positive number. To specify the default size, use an asterisk (*). The default size is the largest free space available. If the WipeDisk attribute of the <Disk> element is "Yes", the POSReady installer will wipe the disk and use the whole disk.

Partition_Letter is the drive letter assigned to a particular partition. It must be a letter from C through Z, in either uppercase or lowercase letters. To specify the default drive (C:), use an asterisk (*).

File_System_Type is the kind of file system the partition will be formatted with. There are two options: FAT32 and NTFS. The default is the NTFS file system.

AllocationUnit_Integer is the allocation unit size used to create the partition. To specify the default size, use an asterisk (*).

There are four size options for the NTFS file system, as follows:

  • 512 (default if Size is set to 512 MB or less)
  • 1024 (default if Size is set to 1 GB or less, but more than 512 MB)
  • 2048 (default if Size is set to 2 GB or less, but more than 1 GB)
  • 4096 (default if Size is set to more than 2 GB)

There are six size options for the FAT32 file system, as follows:

  • 512 (default if Size is set to 64 MB or less)
  • 1024 (default if Size is set to 128 MB or less, but more than 64 MB)
  • 2048 (default if Size is set to 256 MB or less, but more than 128 MB)
  • 4096 (default if Size is set to 8 GB or less, but more than 256 MB)
  • 8192 (default if Size is set to 16 GB or less, but more than 8 GB)
  • 16K (default if Size is set to 32 GB or less, but more than 16 GB)

QuickFormat="Yes" performs a quick format, removing files from the volume without checking for bad sectors using the chkdsk command. QuickFormat="No" will check for bad sectors before formatting.

FileCompression="Yes" enables file compression; FileCompression="No" does not. File compression should be used only when disk space is scarce because file compression will slow down the device. File compression cannot be used for the FAT32 file system.

Example:

<CreatePartition Label="Windows Partition" Size="3000" Letter="C" Format="Yes" FileSystem ="NTFS" AllocationUnit="1024" QuickFormat="Yes" FileCompression ="Yes" />

The &lt;ModifyPartition&gt; Element

Syntax:

<ModifyPartition ID="ID_Value" Label="Partition_Name" Letter="Partition_Letter" FileSystem="File_System_Type" AllocationUnit="Size" QuickFormat="Yes|No" FileCompression="Yes|No" />

ID_Value is the ID of the partition that will be modified. This value must be an integer of 0 or larger.

Partition_Name is the name of the partition. The name can contain any character except the asterisk (*), the single quotation mark ('), and the double quotation mark (").

Partition_Letter is the drive letter assigned to the partition to be modified. The characters C through Z are allowed, in uppercase or lowercase letters.

File_System_Type is the kind of file system the partition will be formatted with. There are two options: FAT32 and NTFS.

Size is the allocation unit size in MBs used to create the partition. There are eight options, as follows:

  • 512
  • 1024
  • 2K
  • 4K
  • 8K
  • 16K
  • 32K
  • 64K

QuickFormat="Yes" performs a quick format, removing files from the volume without checking for bad sectors using the chkdsk command. QuickFormat="No" will check for bad sectors before formatting.

FileCompression="Yes" enables file compression; FileCompression="No" does not. File compression should be used only when disk space is scarce, because file compression will slow down the device. File compression cannot be used for the FAT32 file system.

Example:

<ModifyPartition ID="1" Label="System Partition" Letter="X" FileSystem="NTFS" AllocationUnit="1024" QuickFormat="Yes" FileCompression="Yes" />