Creating two partitions on a USB Disk using Mac - rajivkanaujia/alphaworks GitHub Wiki

Creating two partitions on a USB Disk using Mac

Caution - Doing this activity will erase everything on your USB drive

  • Mac will be used for creating these partitions
  • At the end of this exercise, on your external USB drive, you will have two partition
  • Both the partition will use FAT32 format
  • Therefore, they can be used as two separate drives on Mac or Windows
  • You can use one of the partition for Mac's TimeMachine. And the other partition can be used to transferring files using both Mac and Windows operating system.

Steps

Step 1 Attach the USB Drive

Attach the USB drive that you want to use to create two partitions. My Mac already has two disks. This USB drive will become the third disk. This example uses a Mac that has two disks, and the third one is the USB drive.

Step 2 Find information about all the disk/drives on your Mac

Open Terminal. Find out details about all the disks using the command diskutil list

$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Untitled                249.9 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:          Apple_CoreStorage disk2                   749.2 GB   disk0s4
   5:                 Apple_Boot Boot OS X               134.2 MB   disk0s5

/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS disk1                  +249.5 GB   disk1
                                 Logical Volume on disk0s2
                                 21111116-B31C-41F0-A0E0-511111183735
                                 Unlocked Encrypted

/dev/disk2 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS disk2                  +748.8 GB   disk2
                                 Logical Volume on disk0s4
                                 02222220-CDFD-47D1-85C7-F222222867E6
                                 Unlocked Encrypted

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *750.2 GB   disk3
   1:               Windows_NTFS Secure_HDD              750.2 GB   disk3s1

Note: disk3 is the one in which I want to create two FAT32 partitions. Note: disk3 was formatted as NTFS. You can first use Mac Disk Utility to erase the disk, reformat it using right format. Note: disk3 currently cannot be partitioned. See the icon being grayed out. At the end of the exercise, you will be able to partition it.

If you get prompted to use the drive for Time Machine, select "Decide Later"

Step 3 Reformat from NTFS to FAT32

Using the command like one below, erase the disk

$ diskutil eraseDisk JHFS+ <volume name> <disk_name>
$ diskutil eraseDisk JHFS+ Secure_HDD disk3
Started erase on disk3
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk3s2 as Mac OS Extended (Journaled) with name BlackDrive
Initialized /dev/rdisk3s2 as a 931 GB case-insensitive HFS Plus volume with a 81920k journal
Mounting disk
Finished erase on disk3

Step 4 Partition the USB Drive (disk3)

Now, you will be able to partition the disk using Disk Utility.


Note

If you get an error like MediaKit reports not enough space on device for requested operation.

Then run command like

$ diskutil unmountDisk force disk3
Forced unmount of all volumes on disk3 was successful

Write zeros to the boot sector:

$ sudo dd if=/dev/zero of=/dev/disk3 bs=1024 count=1024
Password:
1024+0 records in
1024+0 records out
1048576 bytes transferred in 0.516867 secs (2028716 bytes/sec)

Remove the disk (detach the USB) and plug it in.

You will get message like The disk you inserted was not readable by this computer.

Initialize the Disk


Note: If you like the instructions here, please refer it on your posts/documentation. Contact me if there are corrections needed.

⚠️ **GitHub.com Fallback** ⚠️