Microsoft KB Archive/821303

= HOW TO: Create Multiple Partitions by Using the Bmpart.exe Tool in Automated Deployment Services =

Article ID: 821303

Article Last Modified on 1/30/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)

-



IN THIS TASK
 SUMMARY 

Overview

 

Use Bmpart.exe to Create Multiple Partitions

 

Best Practice Methods

 REFERENCES



SUMMARY
This article describes how to create multiple partitions by using the Deployment Agent and the Bmpart.exe command-line tool when you deploy images by using Automated Deployment Services (ADS).

Overview
The default templates and samples that are included with ADS create only one partition. When you deploy an image to a computer by using ADS, you may want to create more than one partition in certain scenarios. For example, you may want to install the operating system on drive C and store program data on drive D. This article describes how to use Bmpart.exe to create multiple partitions on a computer when the Deployment Agent is running on the computer.

back to the top

Use Bmpart.exe to Create Multiple Partitions
The Deployment Agent uses Bmpart.exe to create partitions. You can use the following parameters with Bmpart.exe:
 *  : Use this parameter to specify the device name -- for example, \device\harddisk \Partition0, where  is the number of the hard disk that you want to create the partition on.
 * /init: Use this parameter to initialize the master boot record (MBR) on the hard disk.
 * /t: : Use this parameter to specify the type of partition that you want to create. Use this parameter only when you create an original equipment manufacturer (OEM) partition. If you use this parameter, it must be specified before the /c parameter.
 * /c: : Use this parameter to specify the size, in megabytes (MB), of the partition that you want to create. If you omit this parameter, Bmpart.exe uses the remaining free space on the hard disk to create the partition.
 * /a: Use this parameter to set a partition as the active partition.

The following example shows how you can use Bmpart.exe to create multiple partitions when you run the Deployment Agent on the computer. To create multiple partitions by using Bmpart.exe, follow these steps.

Note The following example demonstrates how to create two partitions, and it assumes that you want to install the operating system on drive C (the first partition of HardDisk0) and store program data on drive D (the second partition of HardDisk0).  Create the first partition on HardDisk0. <ol style="list-style-type: lower-alpha;"> Initialize the master boot record (MBR).</li> Set the size of the partition to 5 gigabytes (GB).</li> Set the partition as the active partition.</li></ol> </li> Create the second partition on HardDisk0. <ol style="list-style-type: lower-alpha;"> Use the remaining free space on the hard disk to create the partition.</li> Do not set the partition as the active partition.</li></ol> </li></ol>

This task sequence is represented in XML as follows:

<pre class="fixed_text"><task description=&quot;Partition Disk- create first partition&quot; doesReboot=&quot;false&quot;> /BMONITOR/bmpart.exe \device\harddisk0\partition0 -init -c:5000 -a <task description=&quot;create 2nd partition using rest of disk 0&quot; doesReboot=&quot;false&quot;> /BMONITOR/bmpart.exe \device\harddisk0\partition0 -c

Note that the following considerations apply when you use Bmpart.exe to create multiple partitions:
 * In the example provided earlier in this article, the  parameter uses \device\harddisk0\partition0 for both partitions. Note that a device name of \device\harddisk0\partition1 is not used to create the second partition. The   parameter, \device\harddisk0\partition0, refers to the whole hard disk.

Bmpart.exe creates the partition in the next available raw space on the hard disk. You use a device name other than \device\harddisk0\partition0 only when you start copying the image to each partition. At this point, the tasks refer to either \device\harddisk0\partition1 or \device\harddisk0\partition2, as appropriate to the contents of the image.
 * The /init parameter is used only for the first partition that is created on the hard disk. You cannot use this parameter with other partitions except for the first partition that you create.

back to the top

Best Practice Methods
The following are best practice methods to use when you create multiple partitions by using Bmpart.exe:  Create partitions under the Deployment Agent where you want to deploy the images. Note that Bmpart.exe only creates the partition. Bmpart.exe does not create the underlying file system for the partition. The image that is deployed to the partition contains the file system.</li> If you want to automatically create the partitions for the operating system, you may want to use the Diskpart.exe command-line tool. For more information about Diskpart.exe, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0FD9788A-5D64-4F57-949F-EF62DE7AB1AE

</li></ul>

back to the top

<div class="references_section">