/build/static/layout/Breadcrumb_cap_w.png

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,


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: SMal.tmcc 11 years ago
Red Belt
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
Posted by: mpace 11 years ago
Red Belt
0

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"

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ