locked
How to automaticaly make 2 partitions? RRS feed

  • Question

  • We have made a vista image, and are using a boot windows PE disc to install on a new machine.

    It all works fine but i want to find out how to get it to automatically make a C & D Drive when it installs on the new machine instead of just the C drive we are getting?

     

    We know we can make the D drive afterwards but as we are deploying to about 200 machines would take a long time to do manually.

     

    Any help would be appreciated

     

    Thanks

    Monday, September 3, 2007 11:35 AM

All replies

  • Hi Mate,

    I'm gonna be doing the same thing shortly with my image, once I've finished with my customizations. I came across this as I'll be creating partitions aswell.

     

    Hope it helps, let me know if it works for you

    Multiple Partitions in BDD 2007

    Have had a couple of requests to cover creating multiple partitions using BDD 2007. By default BDD 2007 creates a single partition (CSmile that then builds out with your required OS and applications via the task sequencer. The partition and format information is not done by the unattend.xml file (WinPE section) as you might expect, but via ZTIDiskpart.wsf. This script uses ZTIDiskpart.txt to describe how the drive should be wiped, re-partitioned and formatted.

    The default ZTIDiskpart.txt use DiskPart commands and looks like this:

    select disk 0

    clean

    create partition primary

    assign letter=c:

    active

    exit

    In the default settings, the first disk (disk 0) is selected and then cleaned (wiped). A primary partition is then created (using all available space) and assigned drive letter C: The partition is then set as active. ZTIDiskpart.wsf takes care of formatting this single partiton.

    To have the ZTIDiskpart.wsf script apply different settings (in this case - create two partitons on the same disk) then we can edit ZTIDiskpart.txt as follows:

    select disk 0

    clean

    create partition primary size=20000

    assign letter=c:

    active

    create partition primary

    assign letter=d:

    format FS=NTFS QUICK

    exit

    In this example, the first disk is selected (disk 0) and cleaned as it was in the default script. A primary partition of 20GB is then created (specified in MBs) assigned letter C: and made active. A second partition is then created (by not specifying a size on this second entry, all remaining available space is used) and assigned letter D: This partition is then formatted with NTFS using the QUICK switch (ZTIDiskpart.wsf will take care of formatting the C: drive, however it won't format the second partition, so we include a command for this in ZTIDiskpart.txt)

    There is however a gotcha...The allocation of drive letters from within the Windows PE environment doesn't carry over to the installed operating system if you are trying to create partitons on different physical disks. When the operating system has finished installing, the disk letters can be out of sync. To enable the ZTIDiskpart.wsf script to correctly add drive letters and create two partitions on different disks (usefull if using BDD 2007 to create server builds), use the

    Select disk 0

    Create partition primary

    Assign letter=c:

    Active

    Select disk 1

    Create partition primary

    Assign

    Exit

     

    The key to this working is that no letter is assigned to the second partition (that will be created on the 2nd disk). When the operating system starts you will find that D: will be assigned to the second disk by the OS.

     

     

    Wednesday, September 5, 2007 2:50 PM