Dual boot Fusion Partitioning script

tijones
New Contributor II

Hey Guys,

Had to roll out several labs of dual boot fusions and wanted some way to automate the partitioning, Some people dont like my script i wrote as it (Deletes the og Apple Fusion) however it works for me untill i find a better way, Thought i might share (have shared on DS forum as well) I have hardcoded the Part Sizes as we still use DS to deploy and for some reason it wouldn't pass a variable for me there possibly a bug in my netboot set. We only order the 1tb drives anyway. Welcome to improvements

#!/bin/sh
VolumeGroup=`diskutil coreStorage list | grep Logical Volume Group | sed -e "s/^.* //"`
echo $VolumeGroup
diskutil coreStorage delete $VolumeGroup
sleep 2
diskutil coreStorage create Fusion disk0 disk1
sleep 2
VolumeGroupNew=`diskutil coreStorage list | grep Logical Volume Group | sed -e "s/^.* //"`
echo $VolumeGroupNew
sleep 2
diskutil coreStorage createVolume $VolumeGroupNew jhfs+ OSX 1100G
sleep 4
VolumeShrink=`diskutil cs list | grep Logical Volume | tail -1 |sed -e "s/^.* //" `
diskutil cs resizeStack $VolumeShrink 600g ms-dos WINDOWS 500G
exit 0
1 REPLY 1

jwojda
Valued Contributor II

I'm interested in this, because I prefer to have our deployment group take systems down to bare metal for a reimage/net new deployment.

I'd be interested in seeing if there's a way to adapt this to 1) not do the dual boot and 2) have logic to determine if it's a regular drive or a fusion drive and wipe and reload partitions accordingly.

Then what would be icing on teh cake is have the script turned into somethign that the techs can more easily use or get it in the workflow of casper...