[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.
| Entry | Description |
|---|---|
| DiskN | 指定要配置的磁盘,根据[description.Config]指定的部分来指定. N 是从1开始的磁盘号. |
[description.Config]
The [description.Config] subsection contains entries for configuring partitions located on the physical disk DiskN.
| Entry | Description |
|---|---|
| FileSystemN | 指定格式化分区N时所用的文件系统类型 |
| ForceFormat | Specifies that Setup does not prompt the user before formatting Disk1 with the same file system. |
| PartitionTypeN | 指定分区N的类型 |
| QuickFormatN | Specifies 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. |
| WipeDisk | Specifies 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 disk | Partition | Size | File system | Type of format | Active partition | Partition type | Disk type |
|---|---|---|---|---|---|---|---|
| Disk 1 | Partition 1 | 30 GB | Fat32 | Quick | Active | Primary | MBR |
| Disk 1 | Partition 2 | 2 GB | NTFS | Standard | Not active | Extended | MBR |
| Disk 1 | Partition 2 | 2 GB | NTFS | Standard | Not active | Logical, contained within Partition2 on Disk1 | MBR |
| Disk 2 | Partition 1 | 32 GB | NTFS | Quick | Active | Primary | MBR |
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 disk | Partition | Size | File system | Type of format | Active partition | Partition type | Disk type |
|---|---|---|---|---|---|---|---|
| Disk 1 | Partition 1 | Entire disk | NTFS | Quick | Active | Primary | MBR |
| Disk 2 | Partition 1 | 4 GB | NTFS | Standard | Active | Primary | MBR |
| Disk 2 | Partition 2 | 4 GB | FAT32 | Quick | Not Active | Primary | MBR |
| Disk 2 | Partition 3 | Remainder of drive | NTFS | Standard | Not Active | Primary | MBR |
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 disk | Partition | Size | File system | Type of format | Active partition | Partition type | Disk type |
|---|---|---|---|---|---|---|---|
| Disk 1 | Partition 1 | 100 MB | FAT | Quick | Not Active | EFI | MBR |
| Disk 2 | Partition 2 | 32 MB | none | Standard | Not Active | MSR | MBR |
| Disk 2 | Partition 3 | 31 GB | NTFS | Quick | Active | Primary | MBR |
DiskN
Specifies the disk to configure, according to the specifications of [description.Config].
| Syntax | DiskN = description.config |
|---|---|
| Value | description.config |
| Example | Disk1 = Disk1.config |
| Comments | N is the (1-based) index of the physical disk. |
[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.
| Syntax | FileSystemN = NTFS | FAT32 |
|---|---|
| Values | NTFS Uses the NTFS file system. FAT32Uses the FAT32 file system. |
| Default Value | NTFS |
| Example | FileSystem1 = NTFS |
ForceFormat
Specifies that Setup does not prompt the user before formatting Disk1 with the same file system.
| Syntax | ForceFormat = Yes | No |
|---|---|
| Values | Yes Does not prompt the end user before reformatting Disk1. NoPrompts the end user before reformatting Disk1. |
| Default Value | No |
| Example | ForceFormat = Yes |
| Comments | ForceFormat is valid only for Disk1 under the following conditions:
|
PartitionTypeN
Specifies the type of partition N.
| Syntax | PartitionTypeN = EFI | Extended | Logical | MSR | Primary |
|---|---|
| Values | EFI 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. ExtendedConfigures DiskN as an extended partition. A physical disk can contain only one extended partition. LogicalConfigures DiskN as a logical drive. An extended partition can contain one or more logical drives. MSRConfigures 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. PrimaryConfigures 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 Value | Primary |
| Example | PartitionType1 = Logical |
QuickFormatN
Specifies whether to use Quick Format when formatting partition N.
| Syntax | QuickFormatN = Yes | No |
|---|---|
| Values | Yes 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. NoScans the disk for bad sectors. |
| Default Value | Yes |
| Example | QuickFormat1 = Yes |
SetActiveN
Specifies whether partition N is the active partition.
| Syntax | SetActiveN = Yes | No |
|---|---|
| Values | Yes Sets partition N as the active partition. NoDoes not set partition N as the active partition. |
| Default Value | No |
| 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
|
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.
| Syntax | SizeN = partition_size_in_MB | * |
|---|---|
| Values | partition_size_in_MB Specifies the size of partition N in megabytes. *使用所有可用的磁盘空间.. |
| Example | Size1 = * |
| Comment | If 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. |
WipeDisk
Specifies whether to erase all partitions on the physical disk before configuring the disk with the remaining configuration options.
| Syntax | WipeDisk = Yes | No |
|---|---|
| Values | Yes Erases all existing partitions before configuring the disk. NoDoes not erase any existing partitions. |
| Default Values | No on hard disks of 32-bit systems Yes on hard disks of 64-bit systems |
| Example | WipeDisk = Yes |
| Comments | WipeDisk = 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
|

博客介绍了在Windows预安装环境(WinPE)中使用Diskpart命令行工具对磁盘进行配置和分区。涵盖了[DiskConfig]和[description.Config]部分,包含多个配置示例,还介绍了文件系统类型、分区类型、格式化方式等配置项。

被折叠的 条评论
为什么被折叠?



