Skip to main content
Answer

reformat apm drive to guid via script in casper

  • April 10, 2012
  • 3 replies
  • 34 views

Forum|alt.badge.img+3

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.

Best answer by jarednichols

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?

3 replies

Forum|alt.badge.img+24
  • Valued Contributor
  • Answer
  • April 10, 2012

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?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • April 11, 2012

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.


Forum|alt.badge.img+24
  • Valued Contributor
  • April 11, 2012

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