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

Article translations Article translations
Article ID: 821303 - View products that this article applies to.
Expand all | Collapse all

On This Page

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.

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:
  • DeviceName: Use this parameter to specify the device name -- for example, \device\harddiskX\Partition0, where X 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:Type: 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:Size: 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).
  1. Create the first partition on HardDisk0.
    1. Initialize the master boot record (MBR).
    2. Set the size of the partition to 5 gigabytes (GB).
    3. Set the partition as the active partition.
  2. Create the second partition on HardDisk0.
    1. Use the remaining free space on the hard disk to create the partition.
    2. Do not set the partition as the active partition.
This task sequence is represented in XML as follows:
<task description="Partition Disk- create first partition" doesReboot="false">
    <command>/BMONITOR/bmpart.exe</command>
    <parameters>
      <parameter>\device\harddisk0\partition0</parameter>
      <parameter>-init</parameter>
      <parameter>-c:5000</parameter>
      <parameter>-a</parameter>
    </parameters>
  </task>
<task description="create 2nd partition using rest of disk 0" doesReboot="false">
    <command>/BMONITOR/bmpart.exe</command>
    <parameters>
      <parameter>\device\harddisk0\partition0</parameter>
      <parameter>-c</parameter>
    </parameters>
  </task>
Note that the following considerations apply when you use Bmpart.exe to create multiple partitions:
  • In the example provided earlier in this article, the DeviceName 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 DeviceName 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.

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.
  • 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

REFERENCES

For more information about ADS, visit the following Microsoft Web site:
http://www.microsoft.com/windowsserver2003/techinfo/overview/ads.mspx

Properties

Article ID: 821303 - Last Review: January 30, 2007 - Revision: 4.1
APPLIES TO
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
Keywords: 
kbadsv1 kbhowtomaster KB821303

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com