Fixed Size Partitions via Configurations

New Contributor III

Hello Folks,

In Casper Admin 7.21, I want to create a Configuration and use the "Additional Partitions" feature to set the target drive (Macintosh HD) to a fixed size, then create two additional partitions, one with a fixed size and one taking the remainder of the disk.

Ideally, the partitioning would look like this: - Macintosh HD, 45 GB - Fixed size - Restore, 20 GB - Fixed size - Data, Remainder of disk - Variable size, obviously.

In the Additional Partitions list, the <target drive> partition will always be a floating value based on the percentage left over after other partitions are created. I don't see a way to specify the <target drive> to always be 45 GB, no matter what.

When adding Restore a partition to the configuration, I can - Set the Partition Name to Restore; - Set the Size to 20 GB; - Set the Max Percentage of Drive to some guesstimated percentage of the drive; - Set the Format to Journaled HFS+; - Specify that This is a Restore Partition; - Specify an OS package to install; - Reimage the partition if it exists; and - Append a value (-Restore) to the Computer Name.

I don't see a way to specify that I want the Restore partition to always be 20 GB, no matter what.

The same problem presents itself when adding a Data partition - I can set the size to some number of gigabytes, and to some guesstimated percentage of the drive, but I can't easily tell it to be the remainder of the disk.

Using guesstimated percentages works well enough on drives over a couple hundred GB in size, but for an 80 GB drive, it fails. The guesstimates which work for large drives don't work well for small drives.

I threw together a super simple script to partition /dev/disk0 into a "Macintosh HD" partition of 45 GB, a "Restore" partition of 20 GB, and a "Data" partition as the remainder of the disk. Seriously, the script just contains:

diskutil partitionDisk /dev/disk0 3 GPT JHFS+ "Macintosh HD" 45G JHFS+ "Restore" 20G JHFS+ "Data" R

The Configuration's partitioning scheme has the ability install an OS on a partition flagged as "Restore," and configure the partition to auto-boot and run Casper Imaging. I like this feature. It is a good thing. I want to use it.

I added the script to the configuration and set it to run "Before." The script works great to always partition a drive as 45GB/20GB/Remainder every time. However, if the <target drive> has only one partition when Casper Imaging runs, then Casper Imaging will invoke the Configuration's partitioning scheme. Because the script is set to run "Before," it runs before the Configuration's partitioning scheme. In other words, my script partitions the drive exactly the way I want it, and then the Configuration's partitioning scheme kicks in and screws it up.

Is it really that difficult to specify fixed sizes for <target disk> and/or for any given partition? Am I just missing something painfully obvious?

Your comments and suggestions are welcome. :)

Thanks all!
Bryan Vines
bkvines at