Richard Smith

Consultant - Microsoft Services - United Kingdom

Multiple Partitions in BDD 2007

Multiple Partitions in BDD 2007

  • Comments 6
  • Likes

Have had a couple of requests to cover creating multiple partitions using BDD 2007. By default BDD 2007 creates a single partition (C:) 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.

 

I am greatful (as ever) to Ben Hunter and Michael Niehaus for their input and guidance :-)

Comments
  • PingBack from http://blog.sebastian-foss.com/2007/07/22/multiple-partitions-in-bdd-2007/

  • This is not working for me. I am trying to image a Dell 690 with 2 drives. It seems to blow up at partitioning and I have not been able to get the log files to save back to distribution location and can't find them on the build ws. I do have my Profiles set to D:\Profiles in my unattend.txt file

  • Is there any how to keep one of partitions on disk 0? I would like to distribute OS on one partition (lets say 20GB) and then keep partition D with user's data. Any suggestions?

    Thank you very much.

    Mike

  • WinPE starts from CDROM and keeps "d:" for it  regardless "Assign letter=D:" for the second partition in the script. Actually diskpart fails and BDD stops with error in Task Sequence.

    I am not sure if there is any way to start WinPE with any different letter.

    Any idea?

    -Alex

  • How can I partition using percentage?  I would like to do 70% C: and 30% D:.  I have different computers and different hdd sizes so would like to make it a consistant formula.  thanks

  • Hey guys,

    I was wondering what could cause ztidiskpart not to gather any of the initial data. Because the machine for the first log didn’t gather any of the information, a few things didn’t run at the end.

    Thanks

    ie:  This is the ztidiskpart log for the machine in question:

    <![LOG[Ready to Restore variables.]LOG]!><time="12:39:58.000+000" date="05-16-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Diskpartition and formatting  completed successfully.]LOG]!><time="12:39:58.000+000" date="05-16-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    This is a ztidiskpart log for a machine that ran properly:

    <![LOG[Property DEPLOYROOT is now = \\SMSSERVER\SMSDISTPT\SMSPKG\NS100129]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DEPLOYSYSTEMDRIVE is now = C:]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DEPLOYMENTMETHOD is now = OSD]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DEPLOYMENTTYPE is now = NEWCOMPUTER]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property PHASE is now = PREINSTALL]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSVERSION is now = WinPE]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property ISSERVEROS is now = False]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSCURRENTVERSION is now = 5.2.3790]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSCURRENTBUILD is now = 3790]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property ISSERVERCOREOS is now = True]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property HALNAME is now = acpiapic_up]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property HOSTNAME is now = MININT-SEDJNMP5]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property ASSETTAG is now = xxxxxxx]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property SERIALNUMBER is now = xxxxxxxxxx]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property MAKE is now = Hewlett-Packard]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property MODEL is now = HP Compaq nc6230 (PU984AW#ABA)]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property PRODUCT is now = 0944]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property UUID is now = D26180A6-7A59-11DA-0890-6D990A3xxxx]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property MEMORY is now = 1023]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property ARCHITECTURE is now = X86]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property PROCESSORSPEED is now = 1862]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property CAPABLEARCHITECTURE is now = X86]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property ISLAPTOP is now = True]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property ISDESKTOP is now = False]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property ISSERVER is now = False]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property IPADDRESS001 is now = xx.xx.xx.xx]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property MACADDRESS001 is now = 00:14:38:15:FC:2D]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property MACADDRESS002 is now = 00:12:F0:DF:9E:E1]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DEFAULTGATEWAY001 is now = xx.xx.xx.xx]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property SMSDP is now = SMSSERVER]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSDCOMPUTERNAME is now = MININT-SEDJNMP5]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSINSTALL is now = YES]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property TIMEZONE is now = 050]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DRIVERGROUP001 is now = NC6230]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property APPLICATIONS001 is now = {5c096037-0d11-4b44-913d-594a1823fc56}]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property APPLICATIONS002 is now = {01a4b3f5-d839-448c-ac49-76ad85f32d58}]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property APPLICATIONS003 is now = {04cce405-f23f-4eaa-8b8a-f02b0279ff45}]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property APPLICATIONS004 is now = {3f9e49fc-edba-49a6-9564-baaf5185a954}]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property RESOURCEROOT is now = \\smsserver\Resource$]LOG]!><time="13:58:08.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property SLSHARE is now = \\SMSSERVER\LOGS$]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DOMAINADMIN is now = domain\imageaccount]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DOMAINADMINDOMAIN is now = domain]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[<Message containing password has been suppressed>]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSDINSTALLSILENT is now = 1]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSDINSTALLPACKAGE is now = nsxxxx]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property OSDINSTALLPROGRAM is now = ZTIMDXP_APRIL2008]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property SCANSTATEARGS is now = /v:5 /o /c]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property LOADSTATEARGS is now = /v:5 /c /lac]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property USERDATALOCATION is now = NONE]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property DRIVERPATHS001 is now = \\smsserver\models$\HP Compaq nc6230 (PU984AW#ABA)]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

    <![LOG[Property _SMSTSPACKAGENAME is now = Zero Touch Installation]LOG]!><time="13:58:09.000+000" date="05-08-2008" component="ZTIDiskpart" context="" type="1" thread="" file="ZTIDiskpart">

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment