reformat apm drive to guid via script in casper

Eric_linneweber
New Contributor

I am trying to find a way to reformat a large number of intel drives that were set up with APM formatting while they go through the imaging process. Anybody else run into this one in the past. I have played around trying to get diskutil to do it but no luck changing the underlying formatting.

1 ACCEPTED SOLUTION

jarednichols
Honored Contributor

You want something like:

diskutil partitionDisk /dev/disk0 1 GPTFormat jhfs+ "Macintosh HD" 100%

One thing that sticks out is that you say "change the underlying formatting." You do realize the disk must be wiped to change the partition table format, correct?

View solution in original post

3 REPLIES 3

jarednichols
Honored Contributor

You want something like:

diskutil partitionDisk /dev/disk0 1 GPTFormat jhfs+ "Macintosh HD" 100%

One thing that sticks out is that you say "change the underlying formatting." You do realize the disk must be wiped to change the partition table format, correct?

Eric_linneweber
New Contributor

I understand that the disk has to be reformatted. I am just looking to avoid having to manually reformat the drives on some our older hardware that had been setup to use APM in order to prevent windows installs at the time. I had been trying diskutil partitionDisk disk0 1 GPTFormat "jhfs+" "Macintosh HD" but it did not remove the APM mapping. I will give the new version a try thanks.

jarednichols
Honored Contributor

Yeah specifying that GPTFormat flag is what you're looking for. Hit up man diskutil for all the gory details.