[BULK] Re: Casper Imaging Errors

tlarkin
Honored Contributor

It is a very simple one liner...

#!/bin/bash

/usr/sbin/diskutil eraseDisk "HFS+ Journaled" "Macintosh HD" disk0

exit 0

That runs as preflight so it wipes out the whole partition and names it Macintosh HD. You could get fancy and create multiple partitions from this script as well.

1 REPLY 1

tlarkin
Honored Contributor

Ooops I wrote that from memory and there is a syntax error, I should have checked it before I wrote it down.....

it should be:

/usr/sbin/diskutil eraseDisk "Journaled HFS+" "Macintosh HD" disk0

I had the journaled part flopped around, likewise you can just also put HFS+ as well or whatever file system you want it to be formatted in. The Journaled goes first though, FYI

-T