Skip to content

Instantly share code, notes, and snippets.

@marians
Created December 19, 2019 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marians/69ab5b91b11fcb539f6b71f6b8f830a6 to your computer and use it in GitHub Desktop.
Save marians/69ab5b91b11fcb539f6b71f6b8f830a6 to your computer and use it in GitHub Desktop.
How to re-partition an external drive from a Mac

WARNING: This erases all data stored on the drive.

I couldn't re-partition a freshly bought USB SSD via the Apple Disk Utility app. With the help of a Stack Overflow thread I came up with this method to create two partitions on the disk.

After this process, the disk can be re-partitioned interactively using Disk Utility.

  1. Plug in the drive to the Computer.

  2. When asked if the drive should be used with Time Machine for backups, decline ("Don't use").

  3. Open a terminal

  4. Run the diskutil list command to find the device name of the disk you want to partition. E. g. /dev/disk5.

  5. Execute a command like this, making sure that the third argument actually fits the disk device name:

    diskutil partitionDisk /dev/disk5 2 GPT "MS-DOS FAT32" SYSTEM 10G "MS-DOS FAT32" DATA 0

    This will create two partitions. The first (SYSTEM) with 10 GB, the second (DATA) using all the remaining space. Both will be formatted using the MS-DOS FAT file system.

  6. When asked again if the drive should be used with Time Machine for backups, decline ("Don't use").

Now you can open Disk Utility and use the Partition function on the drive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment