Manually re-partition a drive from Terminal
Follow this guide if you attempt to image a computer and you receive the following notification:
Step-by-step guide
To re-partition the system disk, boot the system in NetBoot or off of a tech drive before following the below steps:
- Open /Application/Utilities/Terminal.app
- We need to determine if the computer has a two internal disks ("Fusion drive") or a single internal disk (HDD/SSD). Type the following command:
diskutil list | grep "internal"
Make note of the "disk" identifier(s) in the output, since we'll use that later. - If you see only one disk listed in the output, proceed to Step 4. If you see two disks listed in the output, proceed to Step 5.
- To re-partition a single disk, enter the below two commands, replacing "disk#" with the identifier from Step 2:
diskutil partitionDisk disk# jhfs+ "Macintosh HD" 100%
diskutil cs convert disk#s2- Proceed to Step 6.
To re-partition a Fusion drive, enter the below commands, replacing "disk#" with the identifiers from Step 2.
- On the first disk run:
diskutil partitionDisk disk# jhfs+ temp 100%
- On the second disk run:
diskutil partitionDisk disk# jhfs+ temp2 100%
- Join the two partitions together and enable CoreStorage, replacing BOTH "disk#" with each of the identifiers from Step 2:
diskutil cs create "Internal Disk" disk#s2 disk#s2
- Format the new volume:
diskutil cs createVolume "Internal Disk" jhfs+ "Macintosh HD" 100%
- Proceed to Step 6.
- On the first disk run:
- Still in Terminal, type the following command to verify that conversion was successful:
diskutil info disk#s2
- Look at the field labeled "Partition Type". If it says "Apple_CoreStorage", then the procedure was completed successfully. Look at the graphic below for an example of a correctly-made CoreStorage LVG.
- Look at the field labeled "Partition Type". If it says "Apple_CoreStorage", then the procedure was completed successfully. Look at the graphic below for an example of a correctly-made CoreStorage LVG.
- You may now quit Terminal and proceed with imaging the computer as typical.
Related articles