Q: Merge Partitions disk0s2 and disk0s4 (leaving disk0s3)
Dear all,
As the title says, I need to merge disk0s2 and disk0s4 without touching disk0s3 as the latter is my recovery partition. I have not dared to try, but I guess I cannot use this command in terminal since it also merges disk0s3:
diskutil mergePartitions JHFS+ NewName disk0s2 disk0s4
right now when I type the "diskutil list" command I get this:
asger$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *320.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 278.5 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Apple_HFS BOOTCAMP 40.6 GB disk0s4
As I am using El Capitan, disk utility does not work either because apple changed it to a useless poor beta like program on El Capitan.
I have considered just typing the above merge command and then somehow reinstall the Apple_Boot Recovery HD, But I really don't want to go down that road if possible.
And no, Bootcamp assistant can't do it since the Bootcamp partition is already erased and formatted into JHFS+.
Any suggestions?
MacBook Pro, OS X El Capitan (10.11.1), early 2011
Posted on Feb 24, 2016 4:01 AM
If you have the Install OS X El Capitan.app file hang onto it. Otherwise download it but don't install it. Quit the installer instead. Download the Recreate Recovery Creator 3.8 utility. This will recreate your Recovery HD from the Install OS X El Capitan.app file. Note - this utility does not work with Fusion drives or Corestorage volumes.
Back up your system first!
You can try to erase both disk0s3 and disk0s4 with Terminal.
diskutil eraseVolume JHFS+ ErasedDisk1 disk0s3
diskutil eraseVolume JHFS+ ErasedDisk2 disk0s4
Then merge the partitions with Terminal.
diskutil mergePartitions JHFS+ ErasedDisk3 disk0s3 disk0s4 <---- this should show ErasedDisk3 as disk0s3 afterwards. Do a diskutil list afterwards to confirm.
diskutil mergePartitions JHFS+ "Macintosh HD" disk0s2 disk0s3
Last, run the Recreate Recovery Creator utility using your Install OS X El Capitan.app file. This utility will ask where you want to create the Recovery HD - select the Macintosh HD and ask where the installer app is. You will also see some buttons to click 10.7 10.8 button and 10.9 button. Click the 10.9 button. The developer has never updated the 10.9 button to include 10.10 and 10.11. After you run this utility and Quit it do a diskutil list again and hopefully you see your Macintosh HD and Recovery HD without the Bootcamp partition.
Posted on Feb 24, 2016 10:01 AM