Published on

Disk partition manipulation on OSX 10.11

🐡 💢

tl;dr

For clean installation of OSX, there might be some problems for erasing BootCamp partition and getting it merged with main partition using El Capitan’s DiskUtility.app. In my case, erasing Recovery partition is needed.

Just a private log of my struggle...

Trace

  • Saw how people are disappointed with new Macbook Pro
  • Start thinking to re-use my old MBP 2011 (clean install)
  • Found BootCamp partition of 70GB which I won’t use anymore :soon: Erase partition via DiskUtility.app
  • Reboot, and enter the recovery mode of El Capitan using Recovery HD partition
  • Enter DiskUtility, and try merging the system partition with free-space which is formally BootCamp partition via Partition menu
  • “Operation failed …”
  • Leave DiskUtility, enter Terminal, and play with diskutil command.
  • diskutil mergePartitions or some commands failed.
  • Found Recovery HD partition, which is right next to system partition, was then merged free-space of BootCamp partition
  • Delete Recovery HD partition to get continuous free-space
  • "OK, let’s start from zero."
  • Create El Capitan’s install drive from another mac using sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
  • Reboot MBP with that disk, erase Macintosh HD again, and this worked normally.
  • Perform clean install.

Thoughts

  • What if I need to merge scattered partitions which cannot be merged easily? :soon: Some features of CoreStorage can be used like LVM, I guess.