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

What's the installer called and which folder is it in?

oh, i installed it in my harddrive. My bad. Let me try again. Sorry:P

is it normal for installing files to disk to take long?

Boot up takes a long while... it is also normal?

okay.. managed to boot. So, I selected install OS X, but which disk should I install it to?

If you're using a USB2 memory stick then, yes it's normal for it to take quite a while.


You're not installing anwhere - it was just a way to boot up without using the internal drive, which has to be unmounted to remove the partition with gpt. So, once you're booted into the installer, go to the Utilities Menu > Terminal and carefully type the following:


  • diskutil unmountDisk force disk0
  • gpt remove -i 4 disk0
  • gpt remove -b 173816328 disk0


Then open Disk Utility and see if you can expand into the free space.

I managed to go all the way to the third step, where there was an error gpt remove: unable to open device 'disk0': Resource busy

Press the up arrow a couple of times to repeat the

diskutil unmountDisk force disk0

command, then press the up arrow a couple of times to repeat the

gpt remove -b 173816328 disk0

command.

The Bootcamp-related partitions should have gone now. Are you able to expand the Macintosh HD partition back into the free space?

Apparently ,now my disk has a maximum of 86 GB... which 30+ GB is missing.... my mac is 128GB.


On the other hand, the BOOTCAMP partition is gone, and i merged the 2 paritions.

i ran first aid on the whole ssd, heres what was the problem

checking volume bitmap

checking volume information

invalid volume free block count

(it should be 7974992 instead of 6499034)

the volume Clarence's Macintosh HD was found corrupt and needs to be repaired.

File system check exit code is 8

Operation sucessful

That's good - I was going to suggest that you may need to run the

sudo diskutil repairDisk disk0

command again, but the "first aid" option does the same thing.

hmm but now my disk doesnt have its full 121.33 GB, but only has 87.48GB. Where did the rest go?

I tried running first aid, but it did not get back my extra 33.85 GB. I really need the extra GB to do my movie editing😐

I was hopeful there for a sec but, as I mentioned earlier in this thread, I was concerned that this would be an issue. There's no guarantee that it can be resolved without taking a backup and reformatting the whole internal drive (reformatting the internal drive can only be done from the installer you made) and then restoring to the backup again.


Before going that far though there are a few things you can try. First try expanding with the diskutil command (copy this into Terminal while booted normally):

  • diskutil resizeVolume disk0s2 R

    There's an outside chance this will work but, assuing it doesn't, then run the following and post the output:

  • tail -f /var/log/system.log

Last login: Mon Aug 24 19:08:31 on ttys000

Clarences-MacBook-Pro:~ Clarence$ diskutil resizeVolume disk0s2 R

Resizing to full size (fit to fill)

Started partitioning on disk0s2 Clarence's Macintosh HD

Verifying the disk

Verifying file system

Using live mode

Performing live verification

Checking Journaled HFS Plus volume

(It should be 5432 instead of 1481390)

Checking catalog hierarchy

Checking extended attributes file

Checking volume bitmap

Volume bitmap needs minor repair for orphaned blocks

Checking volume information

The volume Clarence's Macintosh HD was found corrupt and needs to be repaired

File system check exit code is 8

Error: -69803: Couldn't modify partition map because file system verification failed; please verify and repair each volume individually and then try again

Clarences-MacBook-Pro:~ Clarence$ tail -f /var/log/system.log

Aug 24 20:57:18 Clarences-MacBook-Pro smd[164]: Could not remove job "com.apple.mrt": 150: Operation not permitted while System Integrity Protection is engaged

Aug 24 20:57:18 Clarences-MacBook-Pro MRT[2823]: Error: SMJobRemove: The operation couldn’t be completed. (CFErrorDomainLaunchd error 2.)

Aug 24 20:57:18 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mrt[2823]): Service exited with abnormal code: 2

Aug 24 20:57:18 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mrt): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Aug 24 20:57:26 Clarences-MacBook-Pro networkd[178]: -[NETPowerManager powerPolicyForTimeslot:workload:] failed to find policy for workload 144792657 timeslot 1 / 5

Aug 24 20:57:28 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.system): Caller not allowed to perform action: smd.164, action = service removal, code = 150: Operation not permitted while System Integrity Protection is engaged, uid = 0, euid = 0, gid = 0, egid = 0, asid = 100000

Aug 24 20:57:28 Clarences-MacBook-Pro smd[164]: Could not remove job "com.apple.mrt": 150: Operation not permitted while System Integrity Protection is engaged

Aug 24 20:57:28 Clarences-MacBook-Pro MRT[2824]: Error: SMJobRemove: The operation couldn’t be completed. (CFErrorDomainLaunchd error 2.)

Aug 24 20:57:28 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mrt[2824]): Service exited with abnormal code: 2

Aug 24 20:57:28 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mrt): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Aug 24 20:57:38 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.system): Caller not allowed to perform action: smd.164, action = service removal, code = 150: Operation not permitted while System Integrity Protection is engaged, uid = 0, euid = 0, gid = 0, egid = 0, asid = 100000

Aug 24 20:57:38 Clarences-MacBook-Pro smd[164]: Could not remove job "com.apple.mrt": 150: Operation not permitted while System Integrity Protection is engaged

Aug 24 20:57:38 Clarences-MacBook-Pro MRT[2826]: Error: SMJobRemove: The operation couldn’t be completed. (CFErrorDomainLaunchd error 2.)

Aug 24 20:57:38 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mrt[2826]): Service exited with abnormal code: 2

Aug 24 20:57:38 Clarences-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mrt): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Problems with merging 2 partitions on El Capitan
 
 
Q