/bundles/itninjaweb/img/Breadcrumb_cap_w.png

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,

Answer Summary:
Cancel
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Community Chosen Answer


Answers

1

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"

Answered 05/10/2013 by: SMal.tmcc
Red Belt

  • 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"
    • 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
      • fat 32 does not do dashes or slashes call it like DOS_VOL
  • Don't you want to use HFS for a MAC?
    • not to put windows on the other part
  • 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.
Please log in to comment
Answer this question or Comment on this question for clarity

Answers

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"
Answered 05/13/2013 by: mpace
Red Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share