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
create partition primary
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:
create partition primary size=20000
format FS=NTFS QUICK
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
Select disk 1
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 :-)