I left some unallocated space on my external HD (around 200 GB) and now I would like to create a partition on it using gpt in terminal since the Disk Utility tool on El Capitan is not even showing the free space, though it did show on Yosemite, but nothing would happen after clicking apply. Does it look ok? Which line indicates the free space? Thank you!
sudo gpt -r show disk2
disk2: Suspicious MBR at sector 0
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 585937504 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
586347144 262144 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
586609288 1400
586610688 976562176 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
1563172864 390352270
1953525134 32 Sec GPT table
1953525166 1 Sec GPT header
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage Macintosh HD 120.5 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (internal, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD +120.1 GB disk1
Logical Volume on disk0s2
A0CB7732-E8FC-48BB-B3DB-919A1F0E731E
Unlocked Encrypted
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_CoreStorage Mac Backup 2 300.0 GB disk2s2
3: Apple_Boot Boot OS X 134.2 MB disk2s3
4: Microsoft Basic Data FAT 500.0 GB disk2s4
/dev/disk3 (external, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Mac Backup 2 +299.6 GB disk3
Logical Volume on disk2s2
95D2FFB0-FDB0-4133-A407-849A654D82A6
Unlocked Encrypted
diskutil info /dev/disk2
Device Identifier: disk2
Device Node: /dev/disk2
Whole: Yes
Part of Whole: disk2
Device / Media Name: Seagate BUP Slim Mac SL Media
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Content (IOContent): GUID_partition_scheme
OS Can Be Installed: No
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Total Size: 1.0 TB (1000204885504 Bytes) (exactly 1953525167 512-Byte-Units)
Volume Free Space: Not applicable (no file system)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Device Location: External
Removable Media: No
Virtual: No
OS 9 Drivers: No
Low Level Format: Not supported
sudo fdisk /dev/disk2
Disk: /dev/disk2 geometry: 121601/255/63 [1953525167 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
2: AC 1023 254 63 - 1023 254 63 [ 409640 - 585937504] <Unknown ID>
3: AB 1023 254 63 - 1023 254 63 [ 586347144 - 262144] Darwin Boot
4: 0B 1023 254 63 - 1023 254 63 [ 586610688 - 976562176] Win95 FAT-32
Best Answer
The empty space is on disk2 right behind your FAT32 partition (index number 4) with the start block 1563172864 and the size 390352270 blocks (visible in your
sudo gpt -r show disk2
output right at the beginning of your listings).First backup all your volumes.
To create a new volume with
gpt
boot from a different disk (e.g. disk0s2/disk1: "Macintosh HD").After booting open Terminal.app.
Enter
diskutil list
to get an overview.Then identify the DiskIdentifier (e.g disk2) of the disk you want to add a volume to and enter
sudo gpt -r show /dev/disk2
to get the partition table of disk2.Unmount all disks related to disk2. This is disk2 itself and any inlying and mounted CoreStorage volume (e.g. disk3 aka "Mac Backup 2") on this disk:
diskutil umountDisk /dev/disk3
diskutil umountDisk /dev/disk2
To create a new partition enter:
StartBlock is the number of the first block in the unallocated space and NumberOfBlocks is the number of free blocks or smaller. NumberOfBlocks has to be dividable through 8!. As IndexNumber use (biggest index number already there + 1). Then enter a GUIDType.
One valid command would be:
If you want to leave a gap of 100 MiB between your Windows partition and the new volume use the following command instead:
Quit Terminal and open Disk Utility. Erase the newly created partition, format the volume (JHFS+) and rename it.