Problems with merging 2 partitions on El Capitan

Hey. I am running El Captain Beta on my Macbook Pro retina mid 2014. I decided to run windows using bootcamp, and managed to install it. However, i thought i selected the wrong disk to format, so i rebooted my mac. Now, there is a partition that i want to remove, but the thing is that when i read other solved problems, they said to head over to bootcamp. However, my boot camp does not have the 'install or remove content.' So how do i merge the 2 partitions?


Also, i tried using the fsck- fy and the sbin/fsck -fy method, and they did not work

Have you tried using Disk Utility to remove the unwanted partiton?

Yes, but it failed.

I'm have same problem.


I'm read what need enter to Recovery Mode after run ( push CMD+R buttons)

Select Disk Utility and merge partitions.

But i'm have problem, i'm cant enter to Recovery Mode, because that locked by password.

In Terminal, type:

diskutil list


and post the output

Last login: Sat Aug 22 16:10:47 on ttys000

Clarences-MacBook-Pro:~ Clarence$ 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_HFS Clarence's Macintosh HD 88.0 GB disk0s2

3: Microsoft Reserved 16.8 MB disk0s3

4: Apple_Boot Recovery HD 650.0 MB disk0s4

5: Apple_HFS BOOTCAMP 32.2 GB disk0s5

/dev/disk1 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: FDisk_partition_scheme *63.4 GB disk1

1: Windows_NTFS Homework 63.4 GB disk1s1

Clarences-MacBook-Pro:~ Clarence$

Looks like your internal drive is a 128GB SSD. Seems you have a 64GB drive attached too. Is it the Bootcamp partition that you want to remove and merge? If so, the first thing to try is the Boot Camp Assistant app > Remove Windows 7 or later version.

Yes, i want to merge the disk. I know that, but it does not have the option to do so.

Okay, well the following should do that - there are risks with manipulating partitions via the command line however and so you should backup your data before starting. Depending on exactly what happened when you rebooted your Mac after being concerned that you had selected the wrong disk to format there is also the possibility that the partitions can be deleted but that Disk Utility will refuse to expand your Macintosh HD partition to reclaim the free space. Also, if one of the commands returns an error message, stop and copy the error output to your reply to this post.


Open Terminal and copy-paste in the following commands:

  • sudo diskutil eraseVolume JHFS+ deleteme /dev/disk0s3
  • sudo diskutil eraseVolume JHFS+ deleteme /dev/disk0s5
  • sudo diskutil repairDisk disk0


Then close the Terminal window and return to the Disk Utility app. Remove the "deleteme" partitions and, hopefully, you will be able to expand your Macintosh HD partition to reclaim the free space.

It manage to get rid of bootcamp parition! but there is a delete me parition, which gives the following error:


running operation 1 of 1

merging paritions

mediakit reports not enough space on device for requested operation

operation failed

The last possibility that can be addressed (as far as I'm aware) is that your MBR and GPT partiton tables are oos. To see if that's the case, paste the output of the following commands to your reply:


  • sudo gpt -r show disk0
  • sudo fdisk /dev/disk0

Here you go

Clarences-MacBook-Pro:~ Clarence$ sudo gpt -r show disk0

Password:

Sorry, try again.

Password:

start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Pri GPT table

34 6

40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

409640 172137152 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

172546792 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

173816328 1528

173817856 62898136 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

236715992 262151

236978143 32 Sec GPT table

236978175 1 Sec GPT header

Clarences-MacBook-Pro:~ Clarence$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 14751/255/63 [236978176 sectors]

Signature: 0xAA55

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: EE 1023 254 63 - 1023 254 63 [ 1 - 236978175] <Unknown ID>

2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

Clarences-MacBook-Pro:~ Clarence$

That looks like the issue. To fix it you'll need to boot from an external media (you can't work on the disk while any partitions are mounted). Do you have an USB installer for Yosemite or El Capitan? If not, refer to this: https://support.apple.com/en-us/HT201372

Are the steps of Yosemite applicable to El Capitan?

In principle, yes. Assuming you've already downloaded the Beta and it's sitting in your applications directory:


  1. Connect the USB drive (must be at least 8GB) to the Mac and launch Disk Utility, then select the USB drive from the left side menu and go to the “Erase” tab
  2. Format the USB flash drive as “Mac OS Extended (Journaled)” and choose Erase to confirm the process.
  3. Now go to the “Partition” tab and change the partition layout to “1 Partition”, then change the name of the partition to “El Capitan Installer” or another name of your choosing (I'll assume "El Capitan Installer" for the rest of these steps).
  4. Click on “Options” and select “GUID Partition Table”, and click “OK”, followed by “Apply”, then quit out of Disk Utility
  5. Launch the Terminal application and paste the following string into the command line:
    • If you have the Developer Beta:

      sudo /Applications/Install\ OS\ X\ 10.11\ Developer\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/El\ Capitan\ Installer --applicationpath /Applications/Install\ OS\ X\ 10.11\ Developer\ Beta.app --nointeraction

    • OR, If you have the Public Beta:

      sudo /Applications/Install\ OS\ X\ El\ Capitan\ Public\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/El\ Capitan\ Installer --applicationpath /Applications/Install\ OS\ X\ El\ Capitan\ Public\ Beta.app --nointeraction

  6. You’ll then see numerous progress indicators as the process completes, it will be finished when the last messages is “Done.”
    “Erasing Disk: 0%… 10%… 20%… 30%…100%…
    Copying installer files to disk…
    Copy complete.
    Making disk bootable…
    Copying boot files…
    Copy complete.
    Done.”


When completed, the USB bootable installer will be created and you have an OS X El Capitan installer drive, exit out of Terminal and you’re ready to go. You can boot from the drive by holding down the Option key and selecting “Install OS X El Capitan” from the boot volume menu.

There is an error.


Last login: Sun Aug 23 19:23:12 on ttys000

Clarences-MacBook-Pro:~ Clarence$ sudo /Applications/Install\ OS\ X\ El\ Capitan\ Public\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/El\ Capitan\ Installer --applicationpath /Applications/Install\ OS\ X\ El\ Capitan\ Public\ Beta.app --nointeraction

sudo: /Applications/Install OS X El Capitan Public Beta.app/Contents/Resources/createinstallmedia: command not found

Clarences-MacBook-Pro:~ Clarence$

Problems with merging 2 partitions on El Capitan
 
 
Q