Just found out that there is a command – ExtendOEMPartition – in sysprep that will allow you to expand NTFS disk partitions. From the Microsoft site:
Using Sysprep to Extend Disk PartitionsWhen installing Windows XP Professional, you might find it necessary to extend the partition of the destination computer. You can use Sysprep with the appropriate entries in the answer file to extend an NTFS partition. You might want to extend an NTFS partition for the following reasons:
- To create images that can be extended into larger disk partitions and take advantage of hard disks that might have greater capacity than the original hard disk on the reference computer.
- To create images on smaller hard disks.
Review the following steps and choose the method that works best for you, based on the third-party tools that you are using to create an image of the operating system.
- Make sure that you do not accidentally delete the Setupapi.log and Hyberfil.sys files (if applicable) when modifying the image. These files are recreated when the MiniSetup Wizard runs on the destination computer. Deleting these files on an active system can cause the system to function improperly.
When used in an answer file, the ExtendOemPartition key causes Setup to extend the destination partition into any available unpartitioned space that physically follows it on the hard disk.
The values for ExtendOemPartition are 0, 1, and extra size in MB
- 0 Setup does not extend the partition.
- 1 Setup extends the partition to fill out the hard disk.
- extra size in MB Setup increases the current partition size by this amount.
ExtendOemPartition automatically leaves the last cylinder on the hard disk free to allow dynamic disk support. ExtendOemPartition can be set to a number other than 1 to indicate a specific disk size for extending the hard disk. This is useful if more than one partition is requested on a computer.
- Only NTFS partitions can be extended. If the destination partition you plan to extend is FAT or FAT32, run convert.exe /fs:ntfs from the command line before running Sysprep. The file system is converted when the image is applied to the destination computer before the MiniSetup Wizard starts. Setup does not extend FAT16 and FAT32 partitions.
- ExtendOemPartition can be used with both the Unattend.txt and Sysprep.inf Setup files.
- When used in Sysprep.inf for imaged computers, the destination computer’s hard disk must be the same size or larger than the reference computer’s hard disk.
- To enable the extension, the partition to be extended must have contiguous unpartitioned space available.
To extend a hard disk partition when using a third-party disk-imaging product or a hardware-imaging device that supports the version of NTFS that is used by Windows XP Professional
- Create a partition on the reference computer hard disk that is just large enough to install Windows XP Professional with all the components and applications that you intend to add. This helps keep the size of the reference image file to a minimum.
- If the destination partition you plan to extend is FAT or FAT32, run convert.exe /fs:ntfs from the command line before running Sysprep. The file system is converted when the image is applied to the destination computer before the MiniSetup Wizard starts.
- ConvertNTFS does not work in Sysprep.inf because this is a text mode-only function and Sysprep does not go through text mode.
ExtendOemPartition = 1
You can also set the additional size in megabytes to extend the partition.
When you place the reference image on a destination computer, drive C is converted to NTFS when the computer starts. The computer then restarts and starts MiniSetup. During MiniSetup, Windows extends drive C to the rest of the unpartitioned space on the hard disk. The destination computer then restarts, and the end user can log on and begin using Windows XP Professional.
The MiniSetup Wizard starts and the partition is extended.
To extend a hard disk partition when using a disk-imaging product that does not support NTFS used by Windows XP Professional
- In the [Unattended] section of Sysprep.inf, include the statement:
ExtendOemPartition = 1
Or additional size in megabytes to extend the partition.
- Use Cmdlines.txt to convert short file names.
- Run Sysprep.
The following actions occur when you restart the destination computer:
- The computer initially starts in conversion mode to convert the system partition on the destination computer to NTFS.
- The computer automatically restarts.
- The MiniSetup Wizard starts, and the partition is extended almost instantaneously.