Windows 预安装环境配置文件-磁盘配置[DiskConfig]

[DiskConfig]

Answer File = Winbom.ini

[DiskConfig] 部分包含了对一个或多个物理硬盘进行配置和分区的值 when Factory tool runs in the Windows 预安装环境(WinPE). 这部分使用 Diskpart 命令行工具实现对磁盘配置.

使用这发来配置所有的运行32位和64位操作系统的硬盘. The format of hard disks on 32-bit systems is always master boot record (MBR); the format of hard disks on 64-bit systems is always GUID Partition Table (GPT).

Setup ignores all entries in this section unless you run factory -winpe.

EntryDescription
DiskN指定要配置的磁盘,根据[description.Config]指定的部分来指定. N 是从1开始的磁盘号.

[description.Config]

The [description.Config] subsection contains entries for configuring partitions located on the physical disk DiskN.

EntryDescription
FileSystemN指定格式化分区N时所用的文件系统类型
ForceFormatSpecifies that Setup does not prompt the user before formatting Disk1 with the same file system.
PartitionTypeN指定分区N的类型
QuickFormatNSpecifies whether to use Quick Format when formatting partition N.
SetActiveN指定N分区是否为活动分区.
SizeN指定分区N的容量(MB). The partitioning logic adjusts this size to align the partitions on the disk and allow for future conversion to dynamic disks.
WipeDiskSpecifies whether to erase all partitions on the physical disk before configuring the disk with the remaining configuration options.

Sample

This sample demonstrates three uses of the [DiskConfig] section of Winbom.ini.

Example 1

The following example configures two physical hard disks, each 32 GB. The operating system is Microsoft® Windows® XP Home Edition or another 32-bit edition of Windows.

[DiskConfig]
Disk1 = First.Config
Disk2 = Data.Config

[First.Config]
Size1 = 30000
FileSystem1 = FAT32
SetActive1 = Yes
PartitionType1 = Primary
Size2 = *
PartitionType2 = Extended
Size3 = *
PartitionType3 = Logical

[Data.Config]
Size1 = *
FileSystem1 = NTFS

Hard diskPartitionSizeFile systemType of formatActive partitionPartition typeDisk type
Disk 1Partition 130 GBFat32QuickActivePrimaryMBR
Disk 1Partition 22 GBNTFSStandardNot activeExtendedMBR
Disk 1Partition 22 GBNTFSStandardNot activeLogical, contained within Partition2 on Disk1MBR
Disk 2Partition 132 GBNTFSQuickActivePrimaryMBR

Return to top

Example 2

The following example configures two physical hard disks, creating a full-size partition on the first disk and three partitions on the second disk.

[DiskConfig]
Disk1 = Disk1.Config
Disk2 = Disk2.Config

[Disk1.Config]
WipeDisk = Yes
Size1 = *
PartitionType1 = Primary
FileSystem1 = NTFS
QuickFormat1 = Yes

[Disk2.Config]
Size1 = 4000
Size2 = 4000
Size3 = *
PartitionType1 = Primary
FileSystem1 = NTFS
FileSystem2 = FAT32
QuickFormat2 = Yes

Hard diskPartitionSizeFile systemType of formatActive partitionPartition typeDisk type
Disk 1Partition 1Entire diskNTFSQuickActivePrimaryMBR
Disk 2Partition 14 GBNTFSStandardActivePrimaryMBR
Disk 2Partition 24 GBFAT32QuickNot ActivePrimaryMBR
Disk 2Partition 3Remainder of driveNTFSStandardNot ActivePrimaryMBR

Return to top

Example 3

The following example configures a 32-GB hard disk. The operating system is Windows XP 64-Bit Edition.

[DiskConfig]
Disk1 = Disk1.config

[Disk1.config]
WipeDisk = Yes

Size1 = 100
PartitionType1 = EFI
FileSystem1 = FAT
QuickFormat1 = Yes

Size2 = 32
PartitionType2 = MSR

Size3 = *
SetActive3 = Yes
PartitionType3 = Primary
FileSystem3 = NTFS
QuickFormat3 = Yes

Hard diskPartitionSizeFile systemType of formatActive partitionPartition typeDisk type
Disk 1Partition 1100 MBFATQuickNot ActiveEFIMBR
Disk 2Partition 232 MBnoneStandardNot ActiveMSRMBR
Disk 2Partition 331 GBNTFSQuickActivePrimaryMBR

Return to top

DiskN

Specifies the disk to configure, according to the specifications of [description.Config].

SyntaxDiskN = description.config
Valuedescription.config
Example
Disk1 = Disk1.config
CommentsN is the (1-based) index of the physical disk.

Return to top

[description.Config]

The [description.Config] subsection contains entries for configuring partitions located on the physical disk DiskN.

FileSystemN

Specifies the type of file system to use when formatting partition N.

SyntaxFileSystemN = NTFS | FAT32
ValuesNTFS

Uses the NTFS file system.

FAT32

Uses the FAT32 file system.

Default ValueNTFS
Example
FileSystem1 = NTFS

Return to top

ForceFormat

Specifies that Setup does not prompt the user before formatting Disk1 with the same file system.

SyntaxForceFormat = Yes | No
ValuesYes

Does not prompt the end user before reformatting Disk1.

No

Prompts the end user before reformatting Disk1.

Default ValueNo
Example
ForceFormat = Yes
CommentsForceFormat is valid only for Disk1 under the following conditions:
  • You already formatted Disk1, and it contains files.
  • The value of WipeDisk is No.

Return to top

PartitionTypeN

Specifies the type of partition N.

SyntaxPartitionTypeN = EFI | Extended | Logical | MSR | Primary
ValuesEFI

Configures DiskN as a GUID partition table (GPT) disk that you format with the FAT file system, and that contains the files necessary to start the computer. The EFI system partition serves the same purpose as the system volume found on x86-based computers.

Extended

Configures DiskN as an extended partition. A physical disk can contain only one extended partition.

Logical

Configures DiskN as a logical drive. An extended partition can contain one or more logical drives.

MSR

Configures DiskN as a GPT partition reserved for Windows system components. The MSR partition varies in size based on the size of the GPT disk. For disks smaller than 16 GB, the MSR partition is 32 MB. For disks larger than 16 GB, the MSR partition is 128 MB. The MSR partition is not visible in Disk Management, and you cannot store data on the MSR partition or delete it.

Primary

Configures DiskN as a primary partition. An MBR physical disk can contain only four primary partitions; a GPT physical disk can contain up to 128 primary partitions. The Windows operating system must be installed on a primary partition.

Default ValuePrimary
Example
PartitionType1 = Logical

Return to top

QuickFormatN

Specifies whether to use Quick Format when formatting partition N.

SyntaxQuickFormatN = Yes | No
ValuesYes

Removes files from the disk without scanning the disk for bad sectors. Use this option only if you previously formatted the disk and you are sure the disk is not damaged.

No

Scans the disk for bad sectors.

Default ValueYes
Example
QuickFormat1 = Yes

Return to top

SetActiveN

Specifies whether partition N is the active partition.

SyntaxSetActiveN = Yes | No
ValuesYes

Sets partition N as the active partition.

No

Does not set partition N as the active partition.

Default ValueNo
Example
SetActiveN = Yes
Comments

A disk can contain only one active partition. If you do not explicitly specify a partition as active, the first partition becomes active by default.

Note

  • SetActiveN is valid only for 32-bit hardware. It does not apply to GPT disks.

Return to top

SizeN

Specifies the size of partition N in megabytes. The partitioning logic adjusts this size to align the partitions on the disk and allow for future conversion to dynamic disks.

SyntaxSizeN = partition_size_in_MB | *
Valuespartition_size_in_MB

Specifies the size of partition N in megabytes.

*

使用所有可用的磁盘空间..

Example
Size1 = *
CommentIf the value of partition_size_in_MB is larger than the available size of the disk, partition N becomes the maximum size available. For example, if the physical size of the disk is 5,000 MB and Size1 = 10000, then Setup creates one large partition on the disk.

Return to top

WipeDisk

Specifies whether to erase all partitions on the physical disk before configuring the disk with the remaining configuration options.

SyntaxWipeDisk = Yes | No
ValuesYes

Erases all existing partitions before configuring the disk.

No

Does not erase any existing partitions.

Default ValuesNo on hard disks of 32-bit systems
Yes on hard disks of 64-bit systems
Example
WipeDisk = Yes
CommentsWipeDisk = Yes is equivalent to the Clean command of the DiskPart utility. Both commands remove all partition and volume formatting, including master boot record (MBR) and hidden sector information.

Important

  • In the entries of [description.Config], N is the (1-based) index of the partition on the physical disk. You must specify partition indices in numerical order; you cannot skip a given partition in an [description.Config] section.

Return to top

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值