It appears you have space to image the entire DISK0S4 partition to a compressed img file that would be stored on Macintosh HD.
From there you will be free to delete the partition, upsize Macintosh HD on the fly, and then make a new DISK0S4 FAT.
To start, just select the DISK0S4 and then go to the menu:
- New ▶ Disk Image from "DISK0S4"...
You'll want to mount and verify the image well before erasing anything. Also consider it will be at least twice as slow to move data from one part of the drive to another if you have a HDD with physical heads that have to move. Dumping that partition to an external drive is far faster - you can still use Disk Utility to compress the image to save space and time since the CPU can usually out compress any external disk at less that 25% usage - the bottleneck is the write speed of the drive.
UPDATE:
There are three partitioning schemes used by both Windows and OS X. The first is MBR, which has been around since the 1980’s. The second is GPT, which is fairly new. The third is a hybrid scheme which combines the first two. OS X’s Disk Utility application allows you to select either MBR or GPT. If MBR is selected, then you get the traditional MBR scheme. On the other hand, if you select GPT, you will get either the GPT or the hybrid MBR/GPT scheme. Normally, the GPT scheme is used, but if one or more partitions have a MS-DOS (FAT) or ExFAT format then the MBR/GPT scheme is employed. If an external drive is hybrid, Windows will see the drive as MBR. If Windows is used to change the partitioning on such as drive, the results are unpredictable. This is why Apple recommends only using MBR to partition an external drive to be used by both OS X and Windows.
I believe your external drive was partitioned as an hybrid drive. The output you posted from the gpt command shows both GPT and MBR partitions.
To review, here is the output you posted from the command sudo fdisk /dev/disk1
. It is the content of the MBR table.
Disk: /dev/disk1 geometry: 45600/255/63 [732566645 sectors]
Sector size: 4096 bytes
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 76805] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 76806 - 461468854] HFS+
3: 07 1023 254 63 - 1023 254 63 [ 534820616 - 73242187] HPFS/QNX/AUX
4: 0C 1023 254 63 - 1023 254 63 [ 608062976 - 124503552] Win95 FAT32L
We want to remove partition 3 (Yosemite) from the table. When done, the output should appear as shown below.
Disk: /dev/disk1 geometry: 45600/255/63 [732566645 sectors]
Sector size: 4096 bytes
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 76805] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 76806 - 461468854] HFS+
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 0C 1023 254 63 - 1023 254 63 [ 608062976 - 124503552] Win95 FAT32L
Start by entering the following command in a Terminal window. The command is interactive. When completed, the Yosemite partition will be removed from the MBR tables. Windows will show the space as unallocated. Other than having a Safari window open to this page, make sure all other windows are closed.
sudo fdisk -e /dev/disk1
Below is the input to the above command. Note: Your password may be required. I did not include this in the input below.
edit 3
0
write
y
exit
I thought it might be helpful to include an example. This is what I saw as I entered the above input. Remember, what you will see can differ slightly. Certainly, the integers will be different.
Steelhead:~ davidanderson$ sudo fdisk -e /dev/disk1
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> edit 3
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
3: 07 1023 254 63 - 1023 254 63 [ 253328280 - 250708632] HPFS/QNX/AUX
Partition id ('0' to disable) [0 - FF]: [7] (? for help) 0
Partition 3 is disabled.
fdisk:*1> write
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
Writing MBR at offset 0.
fdisk: 1> exit
The next set of commands remove the Yosemite partition from the GPT tables, then add the partition back in with the correct UUID. These commands do not alter the content of the partition. Enter the following at the Terminal window.
diskutil unmountDisk /dev/disk1
sudo gpt remove -i 3 /dev/disk1
diskutil unmountDisk /dev/disk1
sudo gpt add -i 3 -b 534820616 -s 73242187 -t hfs /dev/disk1
And you are done.
Let me know how things work out.
You will need to edit your question to post the results. Don't worry about the format, I can clean that up for you. From the Terminal application enter the following commands. Some may require your login password. This is normal.
diskutil list
diskutil cs list
sudo gpt -r -vvv show -l /dev/disk0
sudo gpt -r -vvv show -l /dev/disk1
sudo fdisk /dev/disk0
sudo fdisk /dev/disk1
Best Answer
iPartition
For all my partitioning, I use and recommend iPartition. It will allow you to resize partitions without deleting any data. It will automatically move partitions if necessary to allow resizing into free space that is located after the partition.