I installed and then un-installed Ubuntu 16.04 on my Macbook Air (OS X El Capitan 10.11.6). I had split the hard drive into 2 partitions - Macintosh partition of 60.6 GB and now I have a free space partition of 59.6 GB. I'm unable to merge these 2 partitions. I have included some screenshots below:

Output from diskutil list:

Output from diskutil cs list:

Output from sudo gpt -r show /dev/disk0:

I'd greatly appreciate any help.




Before issuing the command to merge the free space, you will need to fix an error in the GUID Partition Table (GPT). The "Recovery HD" labeled partition with the identifier disk0s3 has a GUID of 48465300-0000-11AA-AA11-00306543ECAC. The correct value should be 426F6F74-0000-11AA-AA11-00306543ECAC.

One way, to correct this error, would be to boot from OS X Internet Recovery and enter the following commands in a Terminal application window.

diskutil unmountdisk /dev/disk0
gpt remove -i 3 /dev/disk0
diskutil unmountdisk /dev/disk0
gpt add -i 3 -b 119050312 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk0

Note: The three keys you need to hold down to start "OS X Internet Recovery" are OptionCommand ⌘R.

Once the above commands have been entered, you can restart the computer back to El Capitan.

The Terminal application command to merge the free space is given below.

diskutil  resizevolume  /dev/disk0s2  R

This command will move /dev/disk0s3 to the bottom of disk0 while resizing /dev/disk0s2 to maximum size.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .