Scripting multiple partitions

msardes
New Contributor III

I need assistance in scripting multiple partions in casper

1) Macintosh HD 50gb (Primary OS and applications)
2) Recovery HD 1gb
3) Restore Partion 15gb
3) Data resizable dependent on remaining space. (Home folders will live here)

Any help would be appreciated.

8 REPLIES 8

msardes
New Contributor III

I understand I can probly have casper do the first 3 then have a script after for the fourth , is this the case?

jarednichols
Honored Contributor

For "Recovery HD" I assume you mean the actual Lion Recovery partition?

msardes
New Contributor III

Correct.

What I currently have:

Macintosh HD and Recovery Partition with script.

jarednichols
Honored Contributor

You want something like this:

diskutil partitionDisk /dev/disk0 3 GPTFormat jhfs+ "Macintosh HD" 50G jhfs+ "Restore Partition" 15G jhfs+ "Data" R

Test test test, I am not a lawyer, your mileage may vary, past performance is not indicative of future gains etc etc.

hit up the diskutil man page to decipher if you don't understand.

msardes
New Contributor III

And thats run as a before script without the erase option in casper imaging?

jarednichols
Honored Contributor

Run it before Casper Imaging, yes. You still want the erase option if you're block copying your image.

msardes
New Contributor III

Thanks, I thought I saw that command somewhere else in the forums but couldn't find it again. Testing now.

msardes
New Contributor III

Thanks, I thought I saw that command somewhere else in the forums but couldn't find it again. Testing now.