How do I partition the mac drive into two partitions at deployment?
Hello All,
I'm currently using the "Create Single HFS+ Partition on disk0 & Format System Drive as HFS+" to prep the mac machines before deploying the mac image. So far, it's been successful. What I need to do now, is create two partitions. One being the mac partition for the mac image and a secondary as a MS-DOS (FAT). I would like it to split the drives in half. 50/50.
This is the Preinstallation Tasks
Create Single HFS+ Partition on disk0
#!/bin/bash
if [ `arch` = 'ppc' -o `arch` = 'ppc64' ]; then
PartitionType=APMFormat
else
PartitionType=GPTFormat
fi
/usr/sbin/diskutil partitionDisk disk0 $PartitionType "Journaled HFS+" "$KACE_SYSTEM_DRIVE_NAME" "100%"
&
Format System Drive as HFS+
#!/bin/bash
/usr/sbin/diskutil eraseVolume JHFS+ "${KACE_SYSTEM_DRIVE_NAME}" "${KACE_SYSTEM_DRIVE_PATH}"
exit 0
What do I need to change on the scripts above?
Thank you,
Answers (2)
Create Two Partitions on disk0 (80GB KACE, Scratch Remainder)
Sets up a blank system partition for KACE to image of 80GB, and a blank scratch disk partition of the remainder of the disk, on disk0 (primary hard disk).
#!/bin/bash
if [ `arch` = 'ppc' -o `arch` = 'ppc64' ]; then
PartitionType=APMFormat
else
PartitionType=GPTFormat
fi
/usr/sbin/diskutil partitionDisk disk0 $PartitionType "Journaled HFS+" "$KACE_SYSTEM_DRIVE_NAME" "80G" "Journaled HFS+" "Scratch Disk" "R"
Comments:
-
here is also the one we used for 200gig mac hdd
#!/bin/bash
if [ `arch` = 'ppc' -o `arch` = 'ppc64' ]; then
PartitionType=APMFormat
else
PartitionType=GPTFormat
fi
/usr/sbin/diskutil partitionDisk disk0 $PartitionType "Journaled HFS+" "$KACE_SYSTEM_DRIVE_NAME" "200G" "Journaled HFS+" "Scratch Disk" "R" - SMal.tmcc 11 years ago-
I added "/usr/sbin/diskutil partitionDisk disk0 $PartitionType "Journaled HFS+" "$KACE_SYSTEM_DRIVE_NAME" "60G" "MS-DOS FAT32" "Data" "R"
Gives me an error - "Data does not appear to be a valid volume name for its file system"
I tried - MS-DOS/MS-DOS (FAT)/ MS-DOS (FAT32),
Am I missing something?
Thanks for your quick response - joeysparrow 11 years ago-
fat 32 does not do dashes or slashes call it like DOS_VOL - SMal.tmcc 11 years ago
-
Don't you want to use HFS for a MAC? - Timi 11 years ago
-
not to put windows on the other part - SMal.tmcc 11 years ago
-
I want the script to create two partitions. The first one will be Journaled HFS+ and the second one to be MS-DOS FAT. The first one will be for the MAC OS of course. - joeysparrow 11 years ago
Reading through the comments, this is what you'll want to paste as your shell script:
#!/bin/bash
if [ `arch` = 'ppc' -o `arch` = 'ppc64' ]; then
PartitionType=APMFormat
else
PartitionType=GPTFormat
fi
/usr/sbin/diskutil partitionDisk disk0 $PartitionType "Journaled HFS+" "$KACE_SYSTEM_DRIVE_NAME" "60G" "FAT32" "Data" "R"